Skip to content

Latest commit

 

History

History
94 lines (68 loc) · 1.94 KB

README.md

File metadata and controls

94 lines (68 loc) · 1.94 KB

nextjs-golang-crud-app

🚨Simple full-stack project with nextjs and golang

The purpose of creating this project is to learn for junior programmers how to implement a full stack application and create the best structure for the application. HomePage

Technology list in this project

in back-end:

  • Fiber
  • JWT token
  • Validator
  • Godotenv
  • Paginate
  • Postgres
  • GORM

in front-end:

  • React hook form
  • Axios
  • React-toastify
  • Tailwindcss
  • Typescript
  • Next-auth

How to run

🚦I included the .env file intentionally in the project so that you can see how the services work and with what settings. Otherwise, it should not be displayed in the project.

With Docker🐳:

1-Run DB and API service

  docker compose up -d

2- Run nextjs

  cd ./frontend
  yarn install
  yarn run dev

Manaul✌️:

1-Create DB based on .env file(you can change it in .env file)

2-In root of source you should run your go project

  go mod tidy
  go run main.go

3-In root frontend directory you should run your next project

  yarn install
  yarn run dev

API Reference

Local address

  http://127.0.0.1:8080

All endpoints

  GET /api/users -> get all users
  POST /api/user -> create new user
  PATCH /api/user/:id -> update user
  GET /api/user/:id -> get single user
  DELETE /api/user/:id -> delete user
  POST /api/login -> login to account

TODO Checklist

This section tracks the progress of implemented features in project.

  • Add swagger to project.
  • Add Next-auth to project -> frontend directory.
  • Add all api response states(success,failure).
  • Dockerize project.

Screenshots

App SignUp Form

App SignIn Form