API backend for the Artventuria application, enabling the management of artworks, badges, points, and social interactions.
- Authentication and authorization with JWT
- Artwork and collection management
- Points system and ranking
- NFC tag validation
- Firebase notification system
- API documentation with Swagger
- Java 21
- Spring Boot 3.x
- PostgreSQL 16
- MongoDB 5
- Kafka & Zookeeper
- Firebase
- Spring Security
- Spring Data JPA/MongoDB
- Logback
- Swagger/OpenAPI
- Terraform
- Docker
- AWS
- Java 21
- Maven 4.0.0 or higher
- Docker and Docker Compose
- AWS CLI (for deployment)
- Clone the repository:
git clone https://github.com/Artventuria/API.git
cd API
- Install dependencies:
make deps
# or manually: ./mvnw dependency:resolve
- Set up development environment:
# Start required services (PostgreSQL, MongoDB)
docker-compose up -d
- Configure environment variables in
.env
file (for local development)
To run the application in development mode:
make dev
# or manually: ./mvnw spring-boot:run -Pdev
To run the application in production mode:
make run
# or manually: ./mvnw spring-boot:run -Pprod
To build the application:
make build
# or manually: ./mvnw package
To build for Linux (for deployment):
make linux64
Run tests:
make test
# or manually: ./mvnw test
With code coverage:
make test_coverage
# or manually: ./mvnw verify
Swagger documentation is automatically generated and available at:
http://localhost:8081/swagger-ui.html
To generate OpenAPI docs:
make openapi
To run code quality checks:
make lint
# or manually: ./mvnw checkstyle:check
Run migrations:
make migrate
# or manually: ./mvnw flyway:migrate
View migration info:
make migrate_info
Clean and reapply migrations:
make migrate_clean
Build and run with Docker:
# Development environment
docker-compose up -d
# Production environment
docker-compose -f docker-compose.prod.yml up -d
The project uses GitHub Actions for CI/CD. To deploy:
- Create a tag with version number:
git tag v1.0.0
git push origin v1.0.0
- GitHub Actions will automatically:
- Build the application
- Create a Docker image
- Push to Docker Hub
- Deploy to the production server
.
├── .deploy/ # Deployment configuration
├── .github/ # GitHub workflows (CI/CD)
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ ├── com/artventuria/api/
│ │ │ │ ├── config/ # Application configuration
│ │ │ │ ├── controller/ # REST controllers
│ │ │ │ ├── dto/ # Data Transfer Objects
│ │ │ │ ├── exception/ # Custom exceptions
│ │ │ │ ├── domain/ # Domain models
│ │ │ │ ├── repository/ # Data access layer
│ │ │ │ ├── security/ # Security configuration
│ │ │ │ └── service/ # Business logic
│ │ ├── resources/ # Application resources
│ └── test/ # Test files
├── terraform/ # Infrastructure as Code
├── docker-compose.yml # Development services
├── docker-compose.prod.yml # Production services
├── Makefile # Development commands
└── pom.xml # Project dependencies
This project is licensed under the MIT License. See the LICENSE file for details.