Skip to content

shironxn/gocrud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 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

Database Schema

database-schema

Built With

  • Go
  • Fiber
  • GORM
  • PostgreSQL

Getting Started

Installation

Clone the repository

git clone https://github.com/shironxn/gocrud

Backend

  1. Navigate to the folder

    cd gocrud/backend
  2. Copy or rename .env.example to .env

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

    make help

Running Application

Run without docker

make run

Run with docker

make docker-up

Run test

make test

Frontend

  1. Navigate to the folder

    cd gocrud/frontend
  2. Copy or rename .env.example to .env

    cp .env.example .env
  3. Install package

    npm install
  4. Run

    npm run dev

API Docs

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

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages