This blog app is currently early in the development cycle. It's not yet functional but is being actively developed.
If there are no posts visible, my Supabase instance may be offline. Feel free to create an issue, and I'll bring it back online for testing. Alternatively, you can clone the repo and set it up for your own use. π
If you like this project, please leave a star β It's free and makes me happy ;)
Prerequisite
You will need to have installed the following:
- Golang (version 1.21 or higher)
- PNPM (version 8.6.0 or higher)
- PostgreSQL (version 13 or higher)
- Make (version 4.3 or higher)
- Docker (optional) (version 20.10.8 or higher)
Once you have installed the prerequisites, you can follow the steps below to start the app locally.
Step 1: Fork the repo on GitHub.
Step 2. Clone your forked repository to your local machine.
# using https
git clone https://github.com/<your_username>/astro.go.blog.git
# using ssh
git clone git@github.com:<your_username>/astro.go.blog.git
Step 3. Navigate to the cloned directory and install the dependencies.
cd astro.go.blog
# install dependencies for the client
cd client && pnpm install
# install dependencies for the server
cd server && make install
Step 4. Create a .env
file
# create a .env file for the client
cd client && cp .env.example .env
# create a .env file for the server
cd server && cp .env.example .env
Replace the placeholder values in the .env
file with your own values.
Step 5. You will need to run the migrations to create the database tables.
# first, create a database called `blog` or whatever you want to call it
# run `psql` to open the postgres shell
psql
# create the database
CREATE DATABASE blog;
# exit the shell
\q
# --------------------------------- OR ---------------------------------
# you can also use a GUI tool like pgAdmin to create the database
# --------------------------------- \ ---------------------------------
# run the migrations
cd server && make migrate DB_URL="<your_database_url>"
# i.e. make migrate DB_URL="postgres://<user>:<pwd>@localhost:5432/blog"
See the next section for how to run the migrations using Docker (easier).
Step 6. Run the development server.
# run the client
cd client && pnpm dev
# run the server
cd server && make run
This will start the web app at http://localhost:4321 and the server at http://localhost:5000.
(TODO: Add instructions for running the client with Docker)
We welcome contributions of all sizes, from small bug fixes to new features. Just check out the open issues and pull requests to see where you can make an impact. Don't forget to read our Contributing Guide to learn how you can get involved.
The scripts and documentation in this project are released under the MIT LICENSE