Skip to content

Repository files navigation

Markdown Note-taking App

note-app

A REST API for managing Markdown notes with HTML rendering and grammar checking.
https://roadmap.sh/projects/markdown-note-taking-app

Requirements

Stack

  • Go: 1.26
  • MySQL: 8.4
  • Chi: HTTP router
  • Goldmark: Markdown to HTML
  • LanguageTool: Grammar verification
  • Infra: Docker, Docker Compose

Getting Started

  1. Clone and configure:

    git clone git@github.com:fdotoliveira/go-notes.git
    cd go-notes
    cp .env.example .env
  2. Start containers:

    make docker-up
  3. Enter the API container:

    docker exec -it go_notes_api sh
  4. Run migrations:

    make migrate-up
  5. Start the API:

    make run

The API will be available at localhost:3200. API docs at http://localhost:3200/docs/index.html

API Endpoints

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

Architecture

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

About

Markdown Note-taking App

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages