Skip to content

Sumit-2028/EventManagementBackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Event Management Backend API

A robust and scalable RESTful API backend for an Event Management Platform, built with Go.

✨ Features

  • User Authentication: Secure registration and login using JWT (JSON Web Tokens) and Bcrypt for password hashing.
  • Role-Based Authorization: Distinguishes between creator and attendee roles, controlling access to specific API endpoints.
    • creator: Can create, update, and delete events.
    • attendee: Can view events, register for, and unregister from events.
  • Event Management: Full CRUD (Create, Read, Update, Delete) operations for events.
  • Attendee Management: Functionality for attendees to register for and unregister from events.
  • CORS Support: Configured to allow cross-origin requests from frontend applications.

🚀 Technologies Used

  • Go (Golang): The primary programming language.
  • Gin Web Framework: High-performance HTTP web framework for routing and API handling.
  • MongoDB: NoSQL document database for flexible data storage.
  • JWT (JSON Web Tokens): For stateless authentication.
  • Bcrypt: For secure one-way password hashing.
  • Docker: (Optional, for running MongoDB locally) Containerization.

⚙️ Setup and Run

  1. Clone the repository:
    git clone [https://github.com/Sumit-2028/EventManagementBackend.git](https://github.com/Sumit-2028/EventManagementBackend.git)
    cd go-event-management-backend
  2. Create a .env file in the root directory with your MongoDB URI and JWT Secret:
    MONGO_URI="mongodb://localhost:27017" # Or your MongoDB Atlas connection string
    JWT_SECRET="YOUR_VERY_STRONG_RANDOM_JWT_SECRET_KEY"
    PORT="8080"
    
  3. Run MongoDB: Ensure a MongoDB instance is running (e.g., via Docker: docker run -d --name mongo-db -p 27017:27017 mongo).
  4. Install Go dependencies:
    go mod tidy
  5. Run the application:
    go run main.go
    The server will start on http://localhost:8080.

🤝 Contributing

Feel free to fork the repository, open issues, or submit pull requests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages