SquidSpirit 2eae8c2667
All checks were successful
Frontend CI / build (push) Successful in 1m29s
BLOG-43 docs: environment setup
2025-03-28 00:36:20 +08:00
2025-03-28 00:36:20 +08:00

Blog

Development

  • Frontend: Typescript (Next.js)
  • Backend: Go (gqlgen)
  • Database: PostgreSQL

Despite Next.js being a full-stack framework, I still decided to adopt a separate front-end and back-end architecture for this blog project. I believe that this separation makes the project cleaner, reduces coupling, and aligns with modern development practices. Furthermore, I wanted to practice developing a purely back-end API.

As for the more detailed development approach, I plan to use Clean Architecture for the overall structure and ATDD for testing. Of course, such a small project may not necessarily require such complex design patterns, but I want to give myself an opportunity to practice them.

These will allow me to become more proficient in these modern development practices and leave a lot of flexibility and room for adjustments in the future.

Environment

Database Instance

Using docker to run a database instance.

podman run -d -p 127.0.0.1:5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust --rm --name postgres --replace postgres:alpine

For more infomation, please refer to PostgreSQL Docker Hub.

Database Migration

Using golang-migrate to manage database migration.

  • Create a new migration file

    migrate create -ext sql -dir backend/internal/framework/db/postgres/migration -seq migration
    
  • Run migration

    migrate -path db/migrations -database "postgresql://postgres@localhost:5432/postgres?sslmode=disable" up
    

For more information, please refer to golang-migrate GitHub.

License

This project uses a combination of the MIT License and a custom license. Based on the MIT License, anyone is permitted to use the code. However, before deploying the code, they must first replace any information belonging to "me" or any content that could identify "me," such as logos, names, and "about me" sections.

Description
📕 My personal blog
https://squidspirit.com
Readme 1.4 MiB
v0.1.1 Latest
2025-01-28 13:31:40 +08:00
Languages
TypeScript 92.3%
Dockerfile 3.6%
JavaScript 2.9%
CSS 1.2%