This project is a single-page application built with Next.js, and an Express.js backend server. The goal is to create a dynamic event page based on the provided Figma design, with content managed through API endpoints.
Deployed Version: https://gradient.idkuri.com
- Dynamic event sections populated via API:
- Event title, date, description, location
- Event introduction
- Agenda
- Speakers (images, names, titles – limited to 3 per event)
- Event detail description
- Mock "previous events" section
- FAQ section
- Two mock pages/routes to demonstrate API functionality
- Placeholder for "Get Tickets" section
- Reusable hero image for all events
BluePrint/ # Frontend (Next.js)
BluePrint-Backend/ # Backend (Express.js)
docker-compose-dev.yml
docker-compose-prod.yml
NEXT_PUBLIC_API_URL=
NEXT_PUBLIC_IMAGE_URL=-
Development:
NEXT_PUBLIC_API_URLandNEXT_PUBLIC_IMAGE_URLare different to handle client-side vs server-side requests.- Example values:
localhost:3000,docker.internal:5000or container hostnamebackend.
-
Production:
- Both URLs should point to your deployed domain.
The backend server also uses a .env file to configure runtime settings. Create a file at ./BluePrint-Backend/.env with the following:
PORT=5050PORT– The port on which the Express.js server will run.- In development with Docker, this should match the port mapping in
docker-compose-dev.yml(5050:5050). - In production, adjust if your hosting environment requires a different port.
- In development with Docker, this should match the port mapping in
Note: Do not commit your real
.envfile with secrets. Only example or placeholder files (e.g.,.env.example) should be version controlled.
- Populate
.envin./BluePrintwith appropriate URLs. - Run the development Docker setup:
docker-compose -f docker-compose-dev.yml up --build- Populate
.envin./BluePrintwith your production domain. - Run the production Docker setup:
docker-compose -f docker-compose-prod.yml up --build- The backend serves API endpoints that provide event data for the frontend.
- The frontend fetches data using these endpoints and dynamically renders content.
Event data for the application is stored in JSON format. This allows the frontend to dynamically fetch and render content via the backend API. The sample JSON includes:
title– Event titlepicture– Hero image for the eventdate– Event dateintroduction– Short introduction textlocation– Venue/locationdescription– Detailed event descriptionagenda– Array of agenda items withtime,title,description, andlocationspeakers– Array of speakers withname,title, andpicturefaq– Array of frequently asked questions withquestionandanswer
Example snippet from events.json:
{
"title": "The BluePrint Series: A Fireside Chat with Rich Tu",
"picture": "/event_pictures/event.png",
"date": "2025-05-14",
"introduction": "Join us for an exclusive evening with Rich Tu...",
"location": "Soho House, New York",
"description": "Presented as part of The Gradient's Blueprint Series...",
"agenda": [
{
"time": "10:30 AM - 11:00 AM",
"title": "WELCOME AND OPENING",
"description": "...",
"location": "Ground Floor"
}
],
"speakers": [
{
"name": "Rich Tu",
"title": "Artist",
"picture": "/speaker_pictures/RichTu.png"
}
],
"faq": [
{
"question": "What is the schedule for the event?",
"answer": "..."
}
]
}
To properly render images for events and speakers:
- All speaker pictures must be stored in the
./speaker_pictures/folder. - File paths referenced in JSON should match the filename.
- Example:
"picture": "/speaker_pictures/RichTu.png"
- All event hero images must be stored in the
./event_pictures/folder. - File paths in JSON should match the filename.
- Example:
"picture": "/event_pictures/event.png"
This structure ensures that both the frontend and backend can correctly locate and serve images when rendering the pages dynamically.