XCore Tasks API is a secure, production-style RESTful backend service built with Spring Boot. It demonstrates modern backend development practices, including JWT authentication, role-based access control, and relational data modeling with PostgreSQL.
This project is designed as a demonstration of professional backend engineering skills, showcasing clean architecture, secure authentication, and deployment-ready configuration.
- User registration and login with JWT authentication
- Role-based access control (USER and ADMIN)
- CRUD operations for tasks, scoped per user
- PostgreSQL database integration for persistent storage
- Input validation using Spring's
@Validannotations - Global exception handling for standardized API responses
- Pagination support for task listings
- Docker-ready configuration for consistent deployment
- Java 17+
- Spring Boot 4.0.2
- Spring Security
- Spring Data JPA / Hibernate
- PostgreSQL (local or cloud-hosted, e.g., Supabase, Render)
- JWT (jjwt) for stateless authentication
- BCrypt for password hashing
- Docker for deployment
- Java 17 or higher
- Maven 3.9+ (or use the included Maven wrapper
./mvnw) - A running PostgreSQL database (local or cloud-hosted)
git clone https://github.com/TechAngelX/xcore-tasks-api.git
cd xcore-tasks-apiCreate a .env file in the project root with the following variables:
DB_HOST=your_database_host
DB_PORT=5432
DB_NAME=postgres
DB_USERNAME=postgres
DB_PASSWORD=your_database_password
JWT_SECRET=your-randomly-generated-secret-key-at-least-256-bitsGenerate a secure JWT secret:
openssl rand -hex 32Important: The .env file is gitignored and will not be committed to version control. This keeps your secrets safe.
Load environment variables and start the application:
export $(cat .env | xargs) && ./mvnw spring-boot:runWhy this command?
Spring Boot does not automatically read .env files. The export command loads your environment variables into your terminal session, making them available to the application at runtime.
The API will start at http://localhost:8080.
Alternative (IntelliJ IDEA):
Install the EnvFile plugin to automatically load .env when running from the IDE.
./mvnw test # Run all tests
./mvnw clean package # Build JAR artifact
./mvnw clean package -DskipTests # Build without running testsThe application loads this file automatically via Spring Boot's spring.config.import.
./mvnw spring-boot:runThe API will start at http://localhost:8080.
./mvnw test # Run all tests
./mvnw test -Dtest=ClassName # Run a single test class
./mvnw clean package # Build JAR artifactdocker build -t xcore .
docker run -p 8080:8080 \
-e DB_HOST=your_db_host \
-e DB_PORT=5432 \
-e DB_NAME=xcore_tasks \
-e DB_USERNAME=your_username \
-e DB_PASSWORD=your_password \
-e JWT_SECRET=your-secret-key \
xcoreOr using an env file:
docker run -p 8080:8080 --env-file .env xcore| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/register |
Register a new user |
| POST | /auth/login |
Login and receive a JWT |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/tasks |
List tasks (paginated) |
| POST | /api/tasks |
Create a new task |
| PUT | /api/tasks/{id} |
Update a task |
| DELETE | /api/tasks/{id} |
Delete a task |
Users can only access their own tasks. Admins can access any user's tasks.
This project demonstrates:
- Professional backend design with layered architecture
- Security best practices including password hashing, JWT authentication, and role-based access
- Cloud-deployable architecture that can be tested by others
- Ability to handle relational data and user-specific resource access
Creative Commons: © Ricki Angel 2026 | TechAngelX
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
This project is for personal or educational use only and comes without any warranty.
Built by Ricki Angel • Tech Angel X