This repository contains the backend code for the Megaexe Screening Test Web Application. It was developed using Payload CMS, a headless CMS for managing page content and serving APIs.
-
Dynamic Content Management
- Collections created in Payload CMS to manage pages, ensuring easy content updates.
-
API Endpoints
- Exposed APIs for frontend consumption, including dynamic page content and metadata.
-
Payload CMS Configuration
- Configured environmental variables and collections to align with the frontend requirements.
-
Deployment
- Hosted on Railway with full backend functionality.
-
Payload CMS Configuration
- Problem Understanding the Payload CMS structure and configuration to align with the frontend requirements.
- Solution Read the documentation and experimented with different configurations to achieve the desired results.
-
API Endpoint Connection
- Problem Connecting the frontend to the backend API endpoints.
- Solution Implemented the API endpoints and tested them using Postman to ensure they return the expected data.
-
Deployment
- Problem Dockerfile configuration and deployment on Railway.
- Solution Observed the production logs and made necessary adjustments to the Dockerfile to ensure successful deployment.
-
Clone the repository:
git clone https://github.com/oladokun-o/payload-cms-megexe.git cd payload-cms-megexe
-
Install dependencies:
npm install
-
Configure environment variables:
Create a.env
file with the following keys:MONGODB_URI=[Your MongoDB URI] PAYLOAD_SECRET=[Your Secret Key] PAYLOAD_PUBLIC_SITE_URL=https://megaexe-dashboard.netlify.app/
-
Start the development server:
npm run dev
-
Build for production:
npm run build
-
Start production server:
npm start
To test the application, use the following credentials:
- Email:
oladipupooladokun@gmail.com
- Password:
TGidm62k@tbwiAn
The backend is deployed on [Deployment Platform] and accessible at:
Production Backend URL
- Payload CMS: For content management.
- MongoDB: For database storage.
- Deployment Platform: Railway.