Skip to content

shironxn/blanknotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Forks Stargazers Issues


Logo

GOCRUD

A simple Golang CRUD API

gorm

About The Project

GOCRUD is a simple CRUD (Create, Read, Update, Delete) API developed in Golang. It provides basic functionalities for managing notes.

Structure Project

├── assets
│   └── database-schema.png
├── cmd
│   └── main.go
├── docker-compose.yml
├── Dockerfile
├── docs
│   ├── docs.go
│   ├── swagger.json
│   └── swagger.yaml
├── go.mod
├── go.sum
├── internal
│   ├── adapter
│   │   ├── http
│   │   │   ├── handler
│   │   │   │   ├── note.go
│   │   │   │   ├── note_test.go
│   │   │   │   ├── user.go
│   │   │   │   └── user_test.go
│   │   │   ├── middleware
│   │   │   │   └── auth.go
│   │   │   └── route
│   │   │       ├── auth.go
│   │   │       ├── note.go
│   │   │       ├── user.go
│   │   │       └── welcome.go
│   │   └── repository
│   │       ├── note.go
│   │       └── user.go
│   ├── config
│   │   ├── config.go
│   │   ├── fiber.go
│   │   ├── gorm.go
│   │   └── gorm_test.go
│   ├── core
│   │   ├── domain
│   │   │   ├── claims.go
│   │   │   ├── note.go
│   │   │   ├── response.go
│   │   │   └── user.go
│   │   ├── port
│   │   │   ├── middleware.go
│   │   │   ├── note.go
│   │   │   └── user.go
│   │   └── service
│   │       ├── note.go
│   │       ├── note_test.go
│   │       ├── user.go
│   │       └── user_test.go
│   ├── mocks
│   │   ├── NoteRepository.go
│   │   ├── NoteService.go
│   │   ├── UserRepository.go
│   │   └── UserService.go
│   └── util
│       ├── bcrypt.go
│       ├── jwt.go
│       └── validator.go
├── Makefile
└── readme.md

Database Schema

database-schema

Built With

  • Go
  • Fiber
  • GORM
  • MySQL

Getting Started

Installation

  1. Clone the repository

    git clone https://github.com/shironxn/blanknotes.git
  2. Navigate to the project directory

    cd gocrud
  3. Copy or rename .env.example to .env

    cp .env.example .env
  4. Check available make commands

    make help

Running Application

Run without docker

make run

Run with docker

make docker-up

Run test

make test

API Docs

This API documentation is using Swagger. You can see it at http://localhost:3000/api/v1/docs