An open API service indexing awesome lists of open source software.

https://github.com/royroki/notetaker

NoteTaker - A simple Go-based backend demonstration for beginners, following Clean Architecture principles.ckend demonstration for beginners, following Clean Architecture principles.
https://github.com/royroki/notetaker

api backend beginner-project clean-architecture go-backend golang

Last synced: 5 months ago
JSON representation

NoteTaker - A simple Go-based backend demonstration for beginners, following Clean Architecture principles.ckend demonstration for beginners, following Clean Architecture principles.

Awesome Lists containing this project

README

          

# ๐Ÿ“ NoteTaker

![Go](https://img.shields.io/badge/Go-1.21-blue?style=for-the-badge&logo=go)
![Clean Architecture](https://img.shields.io/badge/Clean--Architecture-%F0%9F%92%AA-blueviolet?style=for-the-badge)
![SOLID](https://img.shields.io/badge/SOLID-Principles-ff69b4?style=for-the-badge)
![License](https://img.shields.io/github/license/RoyRoki/NoteTaker?style=for-the-badge)

A simple and modular ๐Ÿงฑ **Go-based Note Taking API** built with:

- ๐Ÿ’Ž **Clean Architecture**
- ๐Ÿ’ก **SOLID Principles**
- ๐Ÿงช **Testable structure**
- ๐Ÿ—ƒ๏ธ SQLite (can be easily swapped)
- โš™๏ธ Dependency Injection for better maintainability
- ๐ŸŒ Simple REST API

---

## ๐Ÿ“ฝ๏ธ Demo

Check out a quick walkthrough of the project setup and code structure:

[![NoteTaker Demo](https://img.youtube.com/vi/C6deIp21r5E/0.jpg)](https://youtu.be/C6deIp21r5E?si=LDtkRswd7m7gnUbH)

---

## ๐Ÿ“ฆ Project Structure

```bash
.
โ”œโ”€โ”€ cmd # App entrypoint
โ”‚ โ””โ”€โ”€ server # Main server file
โ”œโ”€โ”€ commons # Shared utilities (config, logging, DB, etc.)
โ”œโ”€โ”€ modules
โ”‚ โ””โ”€โ”€ notes
โ”‚ โ”œโ”€โ”€ data # Data layer (models, datasource, impls)
โ”‚ โ”œโ”€โ”€ domain # Domain layer (interfaces, usecases)
โ”‚ โ”œโ”€โ”€ di # Dependency injection
โ”‚ โ””โ”€โ”€ presentation # HTTP controllers and routers
โ”œโ”€โ”€ test.html # Quick test UI (excluded from stats)
โ”œโ”€โ”€ notes.db # SQLite database file
โ””โ”€โ”€ README.md # You're here!
```

---

## ๐Ÿง  Key Concepts

### ๐Ÿงผ Clean Architecture

- Separated concerns across data, domain, and presentation
- Easily testable and scalable

### ๐Ÿงฑ SOLID Principles

- Each layer has a single responsibility
- Interfaces are implemented explicitly
- High-level code is decoupled from low-level details

---

## ๐Ÿš€ Getting Started

### 1. Clone the repo

```bash
git clone https://github.com/RoyRoki/NoteTaker.git && cd NoteTaker
```

### 2. Run the server

```bash
go run cmd/server/main.go
```

### 3. Access the API

```bash
GET /notes
POST /notes
PUT /notes/:id
DELETE /notes/:id
```

You can use `test.html` locally to quickly test endpoints.

---

## ๐Ÿ› ๏ธ Tech Stack

- Go ๐Ÿน
- SQLite ๐Ÿ›ข๏ธ
- chi router ๐Ÿงญ
- sqlx (optionally pluggable)

---

## ๐Ÿค Contributions

PRs and stars are welcome! โญ If you're interested in Clean Architecture or Go backend design, this project is a great starting point!

---

## ๐Ÿ“„ License

ROCKET ยฉ [RoyRoki](https://github.com/RoyRoki)