Eventra is a full-stack event registration system. Users can discover events, register for them, and manage their profiles. Administrators can participate in events as users while also managing events and reviewing activity from a dedicated dashboard.
The repository is organized as two applications:
- Frontend - a React and Vite single-page application.
- Backend - an Express and MongoDB REST API with JWT authentication, role-based authorization, Swagger documentation, and Gemini-powered event descriptions.
- User registration, login, logout, profile updates, and password changes
- JWT access and refresh token authentication
- User and admin role-based route protection
- Event browsing and event details
- Admin event creation, editing, deletion, and capacity management
- Event registration with duplicate and capacity checks
- Registration history and cancellation
- Admin views for users and read-only registration activity
- AI-generated event descriptions with Google Gemini
- Interactive OpenAPI documentation
- Responsive dark red and black interface
| Area | Technologies |
|---|---|
| Frontend | React 18, Vite, React Router, Tailwind CSS v4, Axios |
| Backend | Node.js, Express, Mongoose, MongoDB |
| Authentication | JSON Web Tokens, bcryptjs, cookies |
| Documentation | Swagger UI, OpenAPI 3.0.3 |
| AI | Google Gemini API |
eventra/
├── backend/
│ ├── src/
│ │ ├── config/ # Database and OpenAPI configuration
│ │ ├── controllers/ # Request handlers
│ │ ├── middleware/ # Authentication, admin, and validation middleware
│ │ ├── models/ # Mongoose models
│ │ ├── routes/ # API route definitions
│ │ ├── utils/ # Shared API and Gemini helpers
│ │ └── validations/ # Zod request schemas
│ ├── public/ # Backend public assets
│ └── README.md # Backend setup and API reference
├── frontend/
│ ├── src/
│ │ ├── components/ # Shared and layout components
│ │ ├── context/ # Authentication and toast state
│ │ ├── lib/ # API client, endpoints, and formatters
│ │ └── pages/ # Public, authenticated, and admin pages
│ ├── public/ # Frontend assets
│ └── README.md # Frontend setup and architecture
├── package.json # Root development script
└── README.md
- Node.js 18 or later
- npm
- A MongoDB database, local or hosted with MongoDB Atlas
- A Google Gemini API key for AI description generation
Both users and admins can browse events, register for events, cancel their own registrations, and view their personal registration history.
Admins additionally can:
- Create, edit, and delete events
- View all registered users
- View all registration activity in the read-only, searchable Activity page
The admin Activity page does not provide status-changing or deletion actions. An admin cannot delete their own account.
Clone the repository and install dependencies for all three package manifests:
git clone https://github.com/abmdevx/eventra.git
cd eventra
npm install
npm install --prefix backend
npm install --prefix frontendCreate backend/.env:
PORT=8000
MONGO_URI=mongodb://127.0.0.1:27017/eventra
FRONT_END_ORIGIN=http://localhost:5173
ACCESS_TOKEN_SECRET=replace_with_a_long_random_secret
ACCESS_TOKEN_EXPIRY=1d
REFRESH_TOKEN_SECRET=replace_with_another_long_random_secret
REFRESH_TOKEN_EXPIRY=10d
GEMINI_API_KEY=your_gemini_api_keyCreate frontend/.env only when the API is not using its default URL:
VITE_API_URL=http://localhost:8000/api/v1Do not commit either .env file or real credentials.
From the repository root, run both development servers:
npm run devOr run them separately:
npm run dev --prefix backend
npm run dev --prefix frontendThe default local URLs are:
- Frontend: http://localhost:5173
- API: http://localhost:8000/api/v1
- Swagger UI: http://localhost:8000/api-docs
The backend's FRONT_END_ORIGIN must match the URL used by the frontend so
that browser requests pass CORS validation.
More focused documentation is available in:
No license file is currently included in this repository.