Installation
How to install and run the KhelaDekho Next.js frontend and FastAPI backend locally for development.
1. Backend Setup (FastAPI)
Clone the backend repository, create a virtual environment, and install the Python dependencies.
2. Frontend Setup (Next.js)
Navigate to the frontend directory, install NPM packages, and prepare your environment variables.
3. Environment Configuration
Now that you have copied the templates, edit your .env.local (Frontend) file.
4. Start Services
Open two separate terminal windows to run both servers simultaneously.
> The backend also ships as a Cloudflare Worker (the production API). To run it instead of FastAPI, start the Wrangler dev server and point the frontend at it via KHELADEKHO_API_URL=http://localhost:8787.
5. Verify Installation
> Open your browser and navigate to http://localhost:3000. You should see the KhelaDekho lobby. If the backend is running properly, the live matches and channels will populate automatically.