Skip to content

Blog app with Astro πŸš€ on the front and Go 🐹 on the back

License

Notifications You must be signed in to change notification settings

takanome-dev/astro.go.blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

90 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Astro Blog with Golang

GitHub license CodeQL Action

🚧 Status 🚧

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 ;)
Screenshots

πŸ–₯️ Local development

Prerequisite

You will need to have installed the following:

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 [email protected]:<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.

🐳 Running the migrations with Docker

(TODO: Add instructions for running the client with Docker)

🀝 Contributing

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.

βš–οΈ License

The scripts and documentation in this project are released under the MIT LICENSE