This is a backend for a platform that allows users to create adverts to find teams for their projects or join existing ones. The goal of the platform is to help users find opportunities to gain teamwork experience and improve their skills.
Anyone can participate and borrow code, but it's important to respect the license terms.
Currently Implemented:
- Create, edit, and delete ads.
- View ad listings.
- Add or remove ads from favorites.
- Integration with the ElasticSearch engine.
- Create, edit, and delete comments on ads.
- Add and manage reply comments.
- User registration and login.
- Edit user profile information.
- Update profile avatar.
- View user profile.
- Delete user account.
- User subscriptions.
- Access token validation.
- Issue a new access token using a refresh token.
- Submit complaints about users or ads.
- Admin privileges include:
- Viewing and removing complaints.
- User moderation (ban/unban, role adjustment).
- Admin registration key management.
- Sending messages to email (for password recovery or notifications).
🚀Quick Start:
- Fill in the
.env
file. - Start the containers.
- Create indices in ElasticSearch using the following configuration:
{
"settings": {
"analysis": {
"normalizer": {
"lowercase_normalizer": {
"type": "custom",
"filter": [
"lowercase"
]
}
},
"analyzer": {
"custom_russian_english": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"russian_stemmer",
"english_stemmer"
]
}
},
"filter": {
"russian_stemmer": {
"type": "stemmer",
"language": "russian"
},
"english_stemmer": {
"type": "stemmer",
"language": "english"
}
}
}
},
"mappings": {
"properties": {
"id": {
"type": "long"
},
"title": {
"type": "text",
"analyzer": "custom_russian_english"
},
"text": {
"type": "text",
"analyzer": "custom_russian_english"
},
"createTime": {
"type": "date"
},
"tags": {
"type": "keyword"
}
}
}
}
- Set up the SMTP service.
To download the required Docker images, run the following commands:
docker pull xusss/message_broker_microservice:latest
docker pull xusss/comment_microservice:latest
docker pull xusss/image_microservice:latest
docker pull xusss/ads_microservice:latest
docker pull xusss/authentication_microservice:latest
These commands will pull the latest versions of the respective images from Docker Hub.
Environment Variable | Description |
---|---|
X_API_KEY |
The key for connecting internal APIs to each other, which should not be accessible to outsiders |
ELASTIC_USERNAME |
Username for your ElasticSearch instance |
ELASTIC_PASSWORD |
Password for your ElasticSearch user |
POSTGRES_DB |
The name of your PostgreSQL database |
POSTGRES_USER |
Login for your PostgreSQL user |
POSTGRES_PASSWORD |
Password for your PostgreSQL user |
MINIO_ROOT_USER |
Login for your MinIO instance |
MINIO_ROOT_PASSWORD |
Password for your MinIO instance |
RABBITMQ_DEFAULT_USER |
Login for RabbitMQ |
RABBITMQ_DEFAULT_PASS |
Password for RabbitMQ |
SMTP_MAIL |
Email address for SMTP |
SMTP_PASSWORD |
Password for the SMTP email account |
SMTP_HOST |
Host for your SMTP server |
SMTP_PORT |
Port for your SMTP server |
REDIS_PASSWORD |
Password for your Redis |
SEND_EMAIL_MESSAGE |
Whether to send messages to the mail about successful publication of the advertisement (true/false ) |
⚠️ Note: The diagrams presented do not describe the work of all queries, but only those that are unique in their implementation. If there is no diagram for a query, it means that it is almost or completely described by a similar one. (Not all the diagrams are ready)
Manages announcements and their content, including user complaints
For detailed API documentation, visit the Swagger UI at: Swagger UI - Ads Microservice
Endpoints Scheme:
Request scheme for receiving an ad:
Request scheme for receiving a complaint:
Request to create an advertisement:
Request to delete an advertisement:
Manages user authentication and authorization
For detailed API documentation, visit the Swagger UI at: Swagger UI - Authentication Microservice
Responsible for comment management
For detailed API documentation, visit the Swagger UI at: Swagger UI - Comment Microservice
Necessary for working with images
For detailed API documentation, visit the Swagger UI at: Swagger UI - Image Microservice