Development Guide
Development Guide
Section titled “Development Guide”This guide explains how to set up and run the Sports Live project locally for development.
Follow these steps to ensure your environment is consistent with the rest of the team.
A. Prerequisites
Section titled “A. Prerequisites”Before starting, make sure you have these tools installed:
- Git (version control) → Download
- Node.js (LTS) → Download
- npm (comes with Node.js)
- VS Code (recommended IDE) → Download
- MongoDB Atlas account for cloud database → Sign Up
- Docker (optional, for containerized setup) → Download
B. Clone the Repository
Section titled “B. Clone the Repository”git clone https://github.com/DevHackerGamer/sports-live.gitcd sports-liveRunning the Project
Section titled “Running the Project”Environment Variables
Section titled “Environment Variables”Create a .env file in the root
MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/sports-livePORT=5000CLERK_SECRET_KEY=your_clerk_secret_keyFOOTBALL_API_TOKEN=your_api_keyFrontend (React) + Backend(Express + MongoDB)
Section titled “Frontend (React) + Backend(Express + MongoDB)”cd backendnpm installnpm run devAuthentication
Section titled “Authentication”Sports Live Uses Clerk for authentication
- Login Page ->
/LoginPage.js - Protected routes → Reports, Players, and Admin pages
- Clerk session tokens are automatically included in API requests
Deployment
Section titled “Deployment”The app is deployed on Render with automatic builds from the GitHub repo.
Backend
Section titled “Backend”Type: Web Service
Build Command: npm install && npm run build
Start Command: npm run start
Frontend
Section titled “Frontend”Type: Static Site
Build Command: npm install && npm run build
Continuous Improvement
Section titled “Continuous Improvement”-
Code is linted and formatted before commits (ESLint + Prettier).
-
Pull requests require successful test runs before merging.
-
Sprint reviews collect feedback for improving dev workflows.
References
Section titled “References”- Render Docs: https://render.com/docs
- Express Docs: https://expressjs.com
- Node.js Docs: [ttps://nodejs.org/docs](ttps://nodejs.org/docs
- MongoDB Docs: https://www.mongodb.com/docs
- MongoDB Node.js Driver: https://www.mongodb.com/docs/drivers/node/current