A RESTful API that connects people who want to share skills with those who want to learn them. No money involved — just community members helping each other for free.
Base URL: https://skill-exchange-production.up.railway.app
- Java 21
- Spring Boot 3.5
- Spring Security + JWT for authentication
- Spring Data JPA + Hibernate for database access
- PostgreSQL for the database
- Maven for dependency management
- Deployed on Railway
- Register as a MEMBER
- Browse available skills by category
- Post a skill offer — "I can teach Guitar"
- Post a skill request — "I want to learn Guitar"
- When matched, request status updates to MATCHED
- Community members help each other for free
src/main/java/com/iggy/skillexchange/
├── controller/ # REST API endpoints
├── service/ # Business logic
├── repository/ # Database access
├── entity/ # JPA entities
├── security/ # JWT and Spring Security config
- Java 21
- PostgreSQL
- Maven
- Clone the repository
git clone https://github.com/erdkash1/Skill-Exchange.git
cd Skill-Exchange- Create a PostgreSQL database
CREATE DATABASE skillexchange_db;- Update
src/main/resources/application.properties:
spring.datasource.url=jdbc:postgresql://localhost:5432/skillexchange_db
spring.datasource.username=your_username
spring.datasource.password=your_password
jwt.secret=your_base64_encoded_secret
jwt.expiration=86400000- Run the application
./mvnw spring-boot:runThe API will start on http://localhost:8080
This API uses JWT authentication. To access protected endpoints:
- Register or login to get a token
- Add the token to the
Authorizationheader of every request:
Authorization: Bearer your_token_here
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /auth/register |
Register as a member | No |
| POST | /auth/login |
Login and get JWT token | No |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /skills |
Browse all skills | Yes |
| GET | /skills/{id} |
Get skill by ID | Yes |
| GET | /skills/category/{category} |
Find skills by category | Yes |
| POST | /skills |
Create a skill | Yes |
| DELETE | /skills/{id} |
Delete a skill | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /offers |
See all offers | Yes |
| GET | /offers/{id} |
Get offer by ID | Yes |
| POST | /offers |
Post a skill you can teach | Yes |
| DELETE | /offers/{id} |
Remove your offer | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /requests |
See all requests | Yes |
| GET | /requests/{id} |
Get request by ID | Yes |
| POST | /requests |
Post a skill you want to learn | Yes |
| PATCH | /requests/{id}/status |
Update status (OPEN/MATCHED/CLOSED) | Yes |
| DELETE | /requests/{id} |
Remove your request | Yes |
POST https://skill-exchange-production.up.railway.app/auth/register
{
"name": "John Doe",
"email": "john@example.com",
"password": "password123"
}POST https://skill-exchange-production.up.railway.app/offers
{
"skillId": 1,
"description": "I can teach beginner guitar lessons online"
}POST https://skill-exchange-production.up.railway.app/requests
{
"skillId": 1,
"description": "Looking to learn basic guitar chords"
}Erdenesuren Shirmen — Senior Computer Science Student GitHub: @erdkash1
---
Copy those into the respective `README.md` files and commit with:
docs: improve README with full documentation