A REST API for managing Markdown notes with HTML rendering and grammar checking.
https://roadmap.sh/projects/markdown-note-taking-app
- Go: 1.26
- MySQL: 8.4
- Chi: HTTP router
- Goldmark: Markdown to HTML
- LanguageTool: Grammar verification
- Infra: Docker, Docker Compose
-
Clone and configure:
git clone git@github.com:fdotoliveira/go-notes.git cd go-notes cp .env.example .env -
Start containers:
make docker-up
-
Enter the API container:
docker exec -it go_notes_api sh -
Run migrations:
make migrate-up
-
Start the API:
make run
The API will be available at localhost:3200. API docs at http://localhost:3200/docs/index.html
| Method | Route | Auth | Description |
|---|---|---|---|
GET |
/health |
No | Health check |
POST |
/register |
No | Register user (email, password) |
POST |
/login |
No | Login, returns JWT |
POST |
/notes |
Bearer | Create a note |
GET |
/notes |
Bearer | List all notes |
GET |
/notes/{id} |
Bearer | Get a note by ID |
GET |
/notes/{id}/rendered |
Bearer | Get a note rendered as HTML |
POST |
/grammar/check |
Bearer | Check text grammar |
The project follows Clean Architecture with dependency injection:
- Domain defines contracts (interfaces) with no external dependencies
- Application implements business rules using domain interfaces
- Adapters provide concrete implementations (MySQL, Goldmark, LanguageTool)
- Handlers translate HTTP requests into application calls
- main.go wires everything together as the composition root