A simple REST Api for a forum like Reddit built in Go
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-apiThen, create a .env file on project folder with the following environment variables:
- SQLITE_DB_FOLDER_NAME
- SQLITE_DB_FILE_NAME
- PORT
- AUTH_SECRET
This will build and test the project
makeTo run it then simply:
./build/serverThis will build the docker image
docker build -t forum-rest-api:latest .To run it then simply:
docker run forum-rest-api:latestWhere is development going right now
- 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
- Auth expiration
- CORS fix
- Pagination for profiles
- Pagination for posts
- Pagination for comments
- Searching for posts
- Multiple subforums
- Different auth levels
- Admin dashboard