Deployment Instructions
Backend Deployment (Hugging Face Spaces)
Create a new Space on Hugging Face:
- Go to https://huggingface.co/spaces
- Click "Create new Space"
- Choose "Docker" as the SDK
- Name:
your-username/transcreation-backend
Upload files from
backend/folder:- All files in this directory
- Dockerfile
- package.json and package-lock.json
Set Environment Variables:
- MONGODB_URI=your_mongodb_atlas_connection_string
- NODE_ENV=production
- PORT=5000
Frontend Deployment (Hugging Face Spaces)
Create another Space:
- Name:
your-username/transcreation-frontend - Choose "Docker" as the SDK
- Name:
Upload files from
frontend/folder:- All files in this directory
- Dockerfile
- nginx.conf
Set Environment Variables:
- REACT_APP_API_URL=https://your-backend-space-url.hf.space/api
Database Setup
- Create MongoDB Atlas account
- Create a new cluster
- Get your connection string
- Add it as MONGODB_URI environment variable