RateMyUBProf

RateMyUBProf is a web application designed to help students rate and review professors at their university precisely Brawijaya University so other students could prepare the best for their upcomming class professor.
This application is using Go v1.24, PostgreSQL 16 and RabbitMQ, make sure you already installed the required dependency for this application.
For client side repository, you can find it right in this github repository
Backend Architecture
This golang backend repository use Clean Architecture for these reasons.
-
Clear separation of concerns.
Every layer in this repository has their own responsibility from controller (REST API), service (Business Logic) and repository (Database Interaction) so it's easier to develop and test individually
-
Independent of Framework/Database.
The application will work as expected even with different HTTP Framework, ORM Framework or Database since the business logic are isolated from these external concerns through dependency inversion.
-
Enhanced Testability.
Business logic can be tested in isolation using mock implementations, enabling fast unit tests without spinning up databases or web servers.
Development Setup
You can use devcontainer to setup project development, just make sure you have installed docker already! Some commands that need root access like docker cli and running unit test (use testcontainer-go) need root access in devcontainer so make sure you run it with sudo if needed.
- Clone the repository:
git clone https://github.com/devanfer02/ratemyubprof.git
cd ratemyubprof
-
Setup environment variables file env.json from env.example.json.
-
Setup database environment variables file .db.env from .db.env.example.
-
Run the migration with migrate cli or application main entry and makefile
make migrate-up # use migrate cli
make migrate # use defined method in main
- Run the application
make run # Basic go run
make air # Live reload with air
-
Access the application at http://localhost:{PORT}.
-
To run unit tests, just run the command
make test
Deployment
Docker
- Edit database credentials in
docker-compose.yml file
- Spin up the containers with
docker compose
docker compose up -d
- Access the application at
http://localhost.
Kubernetes
- Edit image name, configmap in
deploy/kube and other configurations
- Apply the Kubernetes manifests
kubectl apply -f deploy/kube
- Access the application via the Kubernetes service.
API Documentation
To view or access API Documentation, you can look up with below link
Postman Documentation : API Doc
Contributing
Contributions are welcome! Please fork the repository and submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Tech Stacks
