Prerequisites
Before you begin, ensure you have the following installed:- Node.js 20.x or later
- Python 3.9 or later
- Redis 5.x or later
- Git
Clone the Repository
Backend Setup
Install Python dependencies
- FastAPI 0.115.6 - Web framework
- Uvicorn 0.32.1 - ASGI server
- Redis 5.2.0 - Redis client
- aiohttp 3.11.9 - Async HTTP client
- APScheduler 3.11.0 - Task scheduling
- python-dotenv 1.0.1 - Environment variable management
Set up environment variables
Create a Add the following configuration:
.env file in the backend/ directory:The backend uses
python-dotenv to load environment variables. These variables are defined in backend/config.py and are required for Redis connection and API configuration.Frontend Setup
Install Node.js dependencies
- Next.js 15.5.9 - React framework
- React 19.0.0 - UI library
- TypeScript 5.x - Type safety
- Tailwind CSS 3.4.1 - Styling
- @radix-ui/react-accordion 1.2.3 - Accordion component
- @vercel/analytics 1.5.0 - Analytics
Configure environment variables
Create a Add the backend API URL:
.env.local file in the frontend/ directory:Next.js requires the
NEXT_PUBLIC_ prefix for environment variables that need to be accessible in the browser.Verify Installation
Once both servers are running, verify the setup:Test the API endpoint
Development Scripts
Frontend Scripts
Backend Scripts
The backend uses Uvicorn directly. For production deployment, theProcfile defines:
Troubleshooting
Common Issues
Redis Connection Failed- Verify Redis is running:
redis-cli ping - Check the
REDIS_URLinbackend/.env - Default should be:
redis://localhost:6379
- Ensure backend is running on port 8000
- Verify
NEXT_PUBLIC_API_URLinfrontend/.env.local - Check CORS settings in
backend/main.py(currently allows all origins in development)
- Frontend: Change port with
npm run dev -- -p 3001 - Backend: Change port with
uvicorn main:app --reload --port 8001
Next Steps
Now that your environment is set up, you can:- Learn about Frontend Development
- Learn about Backend Development
- Start contributing to the project