Categorygithub.com/AlejandroJorge/forum-rest-api
module
0.0.0-20240201033540-b7e0fa2ac2ed
Repository: https://github.com/alejandrojorge/forum-rest-api.git
Documentation: pkg.go.dev

# README

Forum REST Api

A simple REST Api for a forum like Reddit built in Go

How to run locally

This project requires go and gcc installed in your system

First, clone this repository

git clone https://github.com/AlejandroJorge/Forum-REST-api.git
cd Forum-REST-api

Then, create a .env file on project folder with the following environment variables:

  • SQLITE_DB_FOLDER_NAME
  • SQLITE_DB_FILE_NAME
  • PORT
  • AUTH_SECRET

Build natively

This will build and test the project

make

To run it then simply:

./build/server

Build docker image

This will build the docker image

docker build -t forum-rest-api:latest .

To run it then simply:

docker run forum-rest-api:latest

Development Roadmap

Where is development going right now

Code quality and reliability improvement

  • Reorganize testing
  • Check exported functions / types / constants
  • Custom errors for data / repository layer (include default error)
  • Logging for data / repository layer errors
  • Remove unnecesary transactions
  • Custom errors for domain / service layer (include default error)
  • Logging for domain / service layer errors
  • Expand update methods for services (decompress)
  • Documentation in comments for repositories (errors, optional args, etc)
  • Documentation in comments for services (errors, optional args, etc)
  • Refactor controllers with error handling
  • Implement auth for every necessary operation
  • Remake tests for repositories
  • Repository level validation for tests
  • Make tests for services
  • Make tests for controllers / routes

Next features

  • Auth expiration
  • CORS fix
  • Pagination for profiles
  • Pagination for posts
  • Pagination for comments
  • Searching for posts
  • Multiple subforums
  • Different auth levels
  • Admin dashboard

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author