Skip to content

ikrik/Event-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Management System

A microservices-based application built with Nest.js (TypeScript, Node.js) for the backend and Next.js (React, Typescript) for the frontend. 🗓️
It allows users to:

  • View a list of events
  • Search for events based on location
  • Paginate through event results
  • Add new events
  • Edit existing events

The backend consists of two Nest.js services:

  • 📌 API Gateway: Acts as a single entry point for the frontend and routes requests to the appropriate microservice.
  • 📌 Event Management Microservice: Handles event-related operations such as retrieving, creating, and updating events.

The frontend consists of one Next.js services:

  • 📌 Event Management: Application that interacts with the backend to provide a seamless user experience.

Tech Stack Used

Technology Usage
Nest.js 🚀 Backend Framework (Node.js)
Next.js Frontend Framework (React/Next 15)
TypeScript 🔆 Strongly-typed JavaScript
Communication: 📡 Microservices architecture with TCP transport
Docker 🐳 Containerization
SWR 🔄 Data fetching (React)
TailwindCSS 🎨 Styling


🚀 Getting Started

Prerequisites

Running the Application with Docker Compose

  • The application is fully containerized and can be run using Docker Compose 📝.

Steps to Run the Application

  1. Clone the repository:

    git clone git@github.com:ikrik/Event-management.git
    cd Event-management
  2. Add a .env file inside frontend folder with the following defaults

    NEXT_PUBLIC_BASE_URL=http://localhost:3000
    NEXT_PUBLIC_API_URL=http://api-gateway:3001/api/v1
  3. Build and start the containers:

    docker-compose up --build
    (new version) docker compose up --build

    This will build the images and start the services.

  4. Access the application:

    • 🖥️ Frontend: http://localhost:3000
    • 🔐 API Gateway: http://localhost:3001
    • 🎮 Event Management Microservice: Runs on port 3002 but is accessed internally via the API Gateway.
  5. Stop the containers:

    docker-compose down
    (new version) docker compose down

    This stops and removes the containers.



Project Structure

backend/
  apps/
    api-gateway/        # API Gateway (Nest.js - Typescript)
    event-management/   # Event Management Microservice (Nest.js - Typescript)
  libs/
    contracts/          # Shared DTOs and constants
  ...
frontend/
  src/app/             # Next.js Frontend
.dockerignore
.gitignore
.nvmrc
.prettierrc
...


API Endpoints

Method Endpoint Description
GET /api/v1/events Fetch all events
GET /api/v1/events/autocomplete?query=Ber Return all locations that contain the substring 'Ber'
GET /api/v1/events?searchLocation=Berlin&page=2 Search for events based on location or paginate
POST /api/v1/events Create a new event
PUT /api/v1/events/:id Update an existing event



Development Workflow with Hot Reloading

To ensure hot reloading during development, volumes are mounted so that changes made to the code are reflected inside the running containers.

  • Start with hot reloading:
    docker-compose up
    (new version) docker compose up
  • Any changes made to the backend or frontend will automatically be updated without needing to restart the containers.


Troubleshooting

  • Port already in use error: Ensure no other applications are running on ports 3000, 3001, or 3002.
  • Docker build issues: Try clearing Docker's cache and rebuilding:
    docker-compose down --rmi all --volumes --remove-orphans
    docker-compose up --build

License

MIT License © 2025

About

An Event Management microservices-based application showcasing Nest.js for the backend & Next.js for the frontend

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors