http://localhost:5000/api
Stores customer information from the biodata form.
users (id, fullName, email, phone, gender, address, createdAt)Stores event details for each user.
events (id, userId, eventType, eventDate, eventTime, guestCount, budget, venue, catering, decorations, photography, music, additionalNotes, status, createdAt)Stores uploaded event-related files.
files (id, eventId, userId, fileName, fileType, filePath, fileSize, uploadedAt)POST /api/users
Request Body:
{
"fullName": "John Doe",
"email": "john@example.com",
"phone": "1234567890",
"gender": "Male",
"address": "123 Main St, City, State"
}Response:
{
"success": true,
"message": "User created successfully",
"userId": "uuid-string"
}GET /api/users/:userId
Response:
{
"id": "uuid-string",
"fullName": "John Doe",
"email": "john@example.com",
"phone": "1234567890",
"gender": "Male",
"address": "123 Main St",
"createdAt": "2026-02-02T10:00:00.000Z"
}GET /api/users
Response:
[
{ "id": "...", "fullName": "..." },
{ "id": "...", "fullName": "..." }
]PUT /api/users/:userId
Request Body:
{
"fullName": "Jane Doe",
"email": "jane@example.com",
"phone": "0987654321",
"gender": "Female",
"address": "456 Oak Ave"
}DELETE /api/users/:userId
POST /api/events
Request Body:
{
"userId": "user-uuid",
"eventType": "Wedding",
"eventDate": "2026-06-15",
"eventTime": "18:00",
"guestCount": 200,
"budget": 50000,
"venue": "Grand Ballroom",
"catering": "5-star cuisine",
"decorations": "Floral arrangements",
"photography": "Professional photography",
"music": "Live band",
"additionalNotes": "Outdoor ceremony"
}Response:
{
"success": true,
"message": "Event created successfully",
"eventId": "uuid-string"
}GET /api/events/:eventId
GET /api/users/:userId/events
GET /api/events
PUT /api/events/:eventId
Request Body: Same as Create Event + status field
{
"eventType": "Wedding",
"eventDate": "2026-06-15",
"status": "confirmed",
...
}DELETE /api/events/:eventId
POST /api/events/:eventId/files
Request Type: Form-data Fields:
file(file) - The file to uploaduserId(text) - The user ID
Response:
{
"success": true,
"message": "File uploaded successfully",
"fileId": "uuid-string",
"fileName": "event-plan.pdf"
}GET /api/events/:eventId/files
Response:
[
{
"id": "uuid-string",
"fileName": "event-plan.pdf",
"fileType": "application/pdf",
"fileSize": 2048576,
"uploadedAt": "2026-02-02T10:00:00.000Z"
}
]GET /api/files/:fileId/download
Downloads the file directly.
DELETE /api/files/:fileId
GET /api/statistics
Response:
{
"totalUsers": 25,
"totalEvents": 15,
"totalFiles": 48
}GET /api/health
Response:
{
"status": "Server is running",
"timestamp": "2026-02-02T10:00:00.000Z"
}- Install dependencies:
npm install- Start the server:
npm startOr for development with auto-reload:
npm run dev- Server runs on
http://localhost:5000
The SQLite database is stored as eveplanner.db in the project root directory.
✅ User Management (CRUD operations) ✅ Event Management (CRUD operations) ✅ File Upload & Storage ✅ File Download & Deletion ✅ Event Status Tracking ✅ Dashboard Statistics ✅ CORS enabled for frontend integration ✅ Error handling ✅ Automatic database initialization
All endpoints return appropriate HTTP status codes:
200- Success201- Created400- Bad Request404- Not Found500- Server Error
Error responses:
{
"error": "Error message describing what went wrong"
}