A robust, scalable backend for a modern social platform — enabling users to post, comment, and engage with content while ensuring secure authentication, privacy controls, and role-based access. Built with integration and analytics in mind.
- 🧑🤝🧑 User Authentication with email verification
- 🔐 Privacy & Role-based Access Control
- 📝 Post & Comment System with likes
- 📊 Full REST API
- 🔧 Easy local development setup
- 💬 RESTful API Design
All API endpoints are available as .http files in the http/ directory for easy testing with VS Code REST Client extension.
👉 Install REST Client extension and click "Send Request" on any file.
- Backend: Spring Boot 3
- Database: PostgreSQL
- Authentication: JWT
- Email: MailHog (local development)
- Build: Gradle
- Java 17+
- PostgreSQL (running locally)
- Gradle (included with
./gradlew) - Docker (optional, for MailHog)
git clone https://github.com/jomariabejo/connectly-api.git
cd connectly-api# Create database
createdb connectly_db
# If using different credentials, update src/main/resources/application.propertiesFor development, we use MailHog to capture emails locally:
Option A: Using Docker (easiest)
docker run -d --name mailhog -p 1025:1025 -p 8025:8025 mailpit/mailpitOption B: Direct Install (requires Go)
go install github.com/mailhog/MailHog@latest
MailHogOnce running:
- 📧 SMTP Server:
localhost:1025(app sends emails here) - 🌐 Web UI: http://localhost:8025 (view sent emails)
./gradlew bootRunThe API will be running at http://localhost:8080
POST /auth/registration- Register new userPOST /auth/login- Login userGET /auth/verify?token=TOKEN- Verify email
GET /api/users/me- Get current user profilePUT /api/users/me- Update profile
POST /api/posts- Create postGET /api/posts- Get all postsGET /api/posts/{id}- Get single postPUT /api/posts/{id}- Update postDELETE /api/posts/{id}- Delete postPOST /api/posts/{id}/like- Like postDELETE /api/posts/{id}/like- Unlike post
POST /api/comments- Create commentGET /api/comments/post/{postId}- Get post commentsPUT /api/comments/{id}- Update commentDELETE /api/comments/{id}- Delete comment
- Install REST Client extension in VS Code
- Open any file in
http/folder - Click "Send Request" button above the request
- View response in the sidebar
Example: http/auth/register.http
Feel free to submit issues and enhancement requests!