Spring Boot backend core for Devfolio, a campus-focused portfolio and collaboration platform. This service powers user profiles, content posts (projects, questions, articles), group collaboration, messaging, notifications, and admin workflows.
- Java + Spring Boot
- Spring Data JPA
- PostgreSQL
- MinIO (object storage)
- RabbitMQ (events + notifications)
- Docker Compose
docker compose up -d./mvnw spring-boot:runMain settings live in src/main/resources/application.yaml.
Common values you may need to set:
spring.datasource.*for database connectionspring.jpa.*for Hibernate settingsminio.*for object storagespring.rabbitmq.*for messaging
If you use environment variables, keep names aligned with the YAML keys.
Please update the Draw.io diagram when the database changes:
admin_panelfor admin-specific workflowscontrollerfor public endpointsservicefor business logicrepositoryfor data accessdtofor request/response modelsconfigfor security, CORS, and infrastructure
Controllers are located under src/main/java/com/ucsy/devfolio_core/controller. Start with:
ProjectPostControllerQuestionPostControllerRoutesControllerVoteControllerFollowControllernewsFeedControllers/ContentController
- Unified vote target model using
targetType+targetId. - Endpoints:
POST /votes/{targetType}/{targetId}/upvotePOST /votes/{targetType}/{targetId}/downvoteDELETE /votes/{targetType}/{targetId}GET /votes/{targetType}/{targetId}/count
- All vote mutations require authentication.
- Each upvote adds +1 and each downvote adds -1 to the target owner's
reputationPoints. - Changes are applied on vote update/unvote using delta logic.
- Displayed in the profile right panel (reputation field).
- Create answer:
POST /content/question-post/{questionPostId}/answer - List answers:
GET /content/question-post/{questionPostId}/answers - Accept answer (question author only):
PATCH /content/question-post/{questionPostId}/answer/{answerId}/accept
- Follow:
POST /users/{targetUserId}/follow - Unfollow:
DELETE /users/{targetUserId}/follow - Followers:
GET /users/{userId}/followers - Following:
GET /users/{userId}/following - Follow status:
GET /users/{userId}/follow-status?targetUserId=... - Follow/unfollow requires authentication.
- This service publishes notification events for:
- comments
- votes
- project applications
- question answers
- follows
- The notification service consumes these events via the shared exchange (
notification.exchange).
- Use the Maven wrapper (
./mvnw) to keep versions consistent. - Keep entity changes in sync with the ER diagram.
- Prefer DTOs for external payloads; avoid exposing entities directly.
- If you add a new notification type, mirror the event in the notification service.