Hive-Backend is an educational social network application.
-
Install Docker for your system.
-
Clone the repository:
git clone https://github.com/your-username/hive-backend.git cd hive-backend
-
Build and run the application with Docker Compose:
docker-compose up --build
or use
make compose-up
. -
The application should now be running on http://localhost:8080.
-
To clean up everything, run either of the following commands:
docker-compose down -v --rmi all
or use
make compose-clean
.
- GET
/ping
: Check if the API is alive. - GET
/metrics
: Get Prometheus metrics about the API.
- GET
/v1/city/list
: Get a list of all cities.
- GET
/v1/randomizing-job/list
: Get a list of all user randomizing jobs. - POST
/v1/randomizing-job/create
: Create a new user randomizing job. - POST
/v1/randomizing-job/cancel
: Cancel a user randomizing job.
- POST
/v1/user/create
: Create a new user. - POST
/v1/user/login
: Authenticate a user and generate a JWT token. - POST
/v1/user/logout
: Logout a user and invalidate the JWT token. - GET
/v1/user/{id}
: Get a user by ID. - GET
/v1/user/search
: Search for users.
The Postman collection for this project is located at /postman/hive-backend.json
. You can import this file into Postman to test the endpoints.
To import the collection:
- Open Postman.
- Click on the "Import" button.
- Click "Choose Files" and select
hive-backend.json
. - The collection will now be available in Postman.