This document provides instructions for deploying the SpiceCode Dashboard to Render.
- A Render account
- A GitHub account with OAuth App credentials
- PostgreSQL database (can be provisioned on Render)
- Log in to your Render account
- Navigate to "New" > "PostgreSQL"
- Configure your database:
- Name:
spicecode-dashboard-db - Database:
spicecode_dashboard - User:
spicecode_user - Region: Choose the closest to your users
- Name:
- Click "Create Database"
- Once created, note the "Internal Database URL" for later use
-
Navigate to "New" > "Web Service"
-
Connect your GitHub repository containing the SpiceCode Dashboard code
-
Configure the web service:
- Name:
spicecode-dashboard - Environment:
Node - Build Command:
npm install && npm run install-client && npm run build - Start Command:
npm start - Instance Type: Choose based on your needs (starter is fine for testing)
- Name:
-
Add the following environment variables:
NODE_ENV=production PORT=10000 SESSION_SECRET=your_secure_session_secret GITHUB_CLIENT_ID=your_github_oauth_app_client_id GITHUB_CLIENT_SECRET=your_github_oauth_app_client_secret GITHUB_CALLBACK_URL=https://your-render-app-url.onrender.com/api/auth/github/callback DATABASE_URL=your_internal_database_url_from_step_1 JWT_SECRET=your_secure_jwt_secret CLIENT_URL=https://your-render-app-url.onrender.com -
Click "Create Web Service"
- Go to GitHub > Settings > Developer settings > OAuth Apps
- Create a new OAuth App:
- Application name:
SpiceCode Dashboard - Homepage URL:
https://your-render-app-url.onrender.com - Authorization callback URL:
https://your-render-app-url.onrender.com/api/auth/github/callback
- Application name:
- Generate a new client secret
- Update the environment variables in your Render web service with the GitHub Client ID and Secret
- Once deployment is complete, visit your Render app URL
- You should see the SpiceCode Dashboard login page
- Test the GitHub authentication flow
- Verify that you can generate an API key and view your profile
To run the application locally:
- Clone the repository
- Install dependencies:
npm install cd client && npm install cd ..
- Create a
.envfile in the root directory with the required environment variables - Create a
.envfile in the client directory with:REACT_APP_API_URL=http://localhost:5000 - Start the development server:
npm run dev
If you encounter issues with the deployment:
- Check the Render logs for any error messages
- Verify that all environment variables are correctly set
- Ensure your GitHub OAuth App is properly configured
- Check that your database connection string is correct
For local development issues:
- Check that PostgreSQL is running and accessible
- Verify that your
.envfiles contain the correct configuration - Check the console for any error messages