YaLoTengo is a collaborative economy platform that facilitates the lending and borrowing of occasional-use items between users, aiming to promote conscious consumption and reduce unnecessary purchases.
The backend is being developed using Java 21, Spring Boot 3.5.3 and Spring Security.
- Java 21
- Spring Boot 3.5.3
- Maven
- MySQL 8.0
- Lombok
- JUnit & Mockito (5.2.0)
- Postman (API testing)
- 📦 Domain modeling of
UserandItementities with JPA. - 🔗 One-to-Many relationship: one user can register multiple items.
- 🔐 User authentication and authorization:
- Secure registration and login
- JWT-based stateless authentication
- Role-based access control
- 📤 Item sharing functionality:
- Authenticated users can publish items available for lending
- Items are linked to their owner (user)
- 🧱 CRUD operations:
- Full RESTful endpoints for users and items
- Input validation with meaningful HTTP responses
- ✅ Testing:
- Unit and integration tests using JUnit and Mockito
- Minimum of 70% code coverage
- 🐳 Containerization:
- Docker support for local development and deployment
- 📁 Image management:
- Automated image upload and storage integration (planned)
Our goal is to build a secure, efficient, and easy-to-maintain platform that encourages responsible sharing through a point-based system, fostering community and sustainability.
This guide shows how to run the Spring Boot API using Docker and Docker Compose. It includes example config files you can copy–paste.
git clone https://github.com/yalotengoapp/backend.git
cd backend
DB_URL=jdbc:mysql://(name db):3306/yalotengo?createDatabaseIfNotExist=true
DB_USER=(your user)
DB_PASSWORD=(your password)
SERVER_PORT=8080
spring.application.name=yolatengo
spring.output.ansi.enabled=ALWAYS
spring.config.import=optional:file:.env[.properties]
spring.datasource.url=${DB_URL}
spring.datasource.username=${DB_USER}
spring.datasource.password=${DB_PASSWORD}
spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true
server.port=${SERVER_PORT}
docker run --name mysql-yalotengo -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=yalotengo -p 3306:3306 -d mysql:8.0
./mvnw spring-boot:run
Port already in use → change SERVER_PORT in .env and restart.
Access denied for user → make sure DB_USER and DB_PASSWORD in .env match your MySQL setup.
Schema not created → for development, set spring.jpa.hibernate.ddl-auto=create or update in application.properties.
Database logs → check MySQL health with:
docker compose logs db
✨ That’s it! Clone → configure .env → run docker compose up --build → open http://localhost:8080.
Contributions are welcome! If you want to contribute:
-
Fork this repository.
-
Create a feature branch (git checkout -b feature/your-feature-name).
-
Commit your changes (git commit -m "Add your message here").
-
Push to your branch (git push origin feature/your-feature-name).
-
Open a Pull Request with a clear title and description of your changes.
Please make sure to add a short comment in your Pull Request explaining the motivation behind your contribution. 🚀
