A hacker news clone that I made while learning Go.
- This projects main motivation is to be an environment to help me learn Go and try new things.
- I intentionally didn't bother with things like security in order to speed up development.
- I tried to follow, the "standard" Go project structure but not too strictly.
- Someone wrote about how they only used one single git command
git add --all && git commit -m "yolo 😎" && git push
, so I decided to try it. - I tried making it "portable" | "easy to install". You should only need Go, Make, Docker and Docker Compose to run everything.
- I've used Jupyther notebooks to help with development in other languages but the kernels for Go are all broken. I've also tried interpreters but they are also not good enough.
docker-compose up
to run dependenciesmake db/tidy
creates, migrates, dumps the schema and generatesqlc
codemake run/live
runs the application in watch mode- OPTIONAL
make db/seed
seed the database with fake data
Read the Makefile
(make help
) and the docker-compose.yml
to understand how the project is put together.
.
├── app - Contains Web Application Code
├── cmd - Entry point for applications / scripts
│ ├── app-configuration-sync - script to update DAPR configuration
│ ├── baker-news - Web application
│ ├── db-utils - script to help with database management
│ └── seed - script to seed database with fake data
├── commands - Operations that mutate the domain
├── docker-compose - Dev environment docker-compose related things
│ ├── dapr
│ ├── gonb - Jupyther notebook kernel (not used anymore)
│ ├── pgadmin
│ ├── postgres
│ ├── redis
│ └── redis-insight
├── docs
│ └── screenshots
├── events - Domain events definitions
├── notebooks - I tried playing around with notebooks but I wasn't satisfied
├── scratch - Throwaway stuff
├── state - State (database) queries, models and migrations
│ ├── seed
│ └── sql
│ └── migrations
└── worker - Contains async worker code
- pgAdmin
- Redis Insight
- Redis Address:
redis:6379
- Redis Address:
- Dapr Dashboard
- Zipkin