Skip to content

RESTtful API where you can do event management, have users, and perform CRUD operations using auth mechanism by JWT, developed by Spring Boot, Java using Docker, Lombok, MongoDB and Redis.

Notifications You must be signed in to change notification settings

berkinozturk/Event-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Management API

This readme details a Spring Boot-based Event Management API utilizing MongoDB, Redis, Docker, Lombok and JWT.

Technologies

  • Backend: Spring Boot, Java
  • Database: MongoDB
  • Caching: Redis
  • Authentication: JWT
  • Containerization: Docker

Project Structure

  • controller: REST controllers managing events and users.
  • entity: Data models for events and users.
  • service: Business logic for event and user management.
  • config: Configuration files for JWT and other services.
  • docker: Dockerfile and docker-compose.yml for building and running the application.
  • tests: Unit tests for controllers and services.

Endpoints

EventController Endpoints

Endpoint Description Authentication Role
GET /api/v1/events Retrieve a list of all events. Public None
GET /api/v1/events/{id} Obtain an event by its ID. Public None
POST /api/v1/events/create Create a new event. Required Admin
PUT /api/v1/events/update/{id} Update an existing event. Required Admin
DELETE /api/v1/events/delete/{id} Delete an event. Required Admin

UserController Endpoints

Endpoint Description Authentication Role
POST /api/v1/users Register a new user. Public None
GET /api/v1/users/{id} Retrieve a user by their ID. Required User
PUT /api/v1/users/{id} Update a user's profile. Required User
DELETE /api/v1/users/{id} Delete a user. Required Admin

AuthenticationController Endpoints

Endpoint Description Authentication Role
POST /api/v1/auth/register Register a new user. Public None
POST /api/v1/auth/authenticate Authenticate a user and receive a JWT token. Public None

Authorization

Only users with the ADMIN role can create, update, and delete events.

Only authenticated users can access their own profile information.

Notes

  • This is a basic example and may require adjustments for your specific needs.
  • Configure your own MongoDB, Redis, and Docker environments.
  • Implement your own security measures to protect data.

Getting Started

  1. Clone the repository.
  2. Build and run the application using Docker: "docker-compose up -d"
  3. Open http://localhost:8081 in your browser to see Mongo Express.
  4. Refer to specific endpoint descriptions for API usage.
  5. You can use Postman or Swagger to send requests and take responses from endpoints.

Additional Information

  • This project utilizes Spring Security for authentication and authorization.
  • Spring Data MongoDB facilitates interaction with the MongoDB database.
  • Spring Cache enables caching frequently accessed data.

I hope this helps! Feel free to ask any further questions you may have.

Sample Images

Authorization Retrieving all events Creating User

About

RESTtful API where you can do event management, have users, and perform CRUD operations using auth mechanism by JWT, developed by Spring Boot, Java using Docker, Lombok, MongoDB and Redis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages