Full-stack application with React + Vite frontend and Node.js + Express backend.
fip-bituin/
├── client/ # React + Vite frontend
│ ├── src/
│ │ ├── App.jsx
│ │ ├── App.css
│ │ ├── main.jsx
│ │ └── index.css
│ ├── index.html
│ └── package.json
├── server/ # Node.js + Express backend
│ ├── index.js
│ └── package.json
└── package.json # Root package.json with scripts
- Node.js (v18 or higher)
- npm
-
Install root dependencies:
npm install
-
Install client dependencies:
cd client && npm install
-
Install server dependencies:
cd server && npm install
This project uses different Supabase credentials in the browser and on the server.
Client-side auth in Vite must use the public anon key:
Create client/.env:
VITE_SUPABASE_URL=https://your-project-ref.supabase.co
VITE_SUPABASE_ANON_KEY=your-supabase-anon-keyServer-side API access should use the service role key:
Create server/.env:
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_SERVICE_KEY=your-supabase-service-role-key
LIBRETRANSLATE_URL=http://127.0.0.1:5000Notes:
- Do not put the service role or secret key in
client/.env. The frontend must useVITE_SUPABASE_ANON_KEY. - The server prefers
SUPABASE_SERVICE_KEY, but this repo also supportsSUPABASE_ANON_KEYorVITE_SUPABASE_ANON_KEYas fallbacks in development. - If the server logs
Missing Supabase credentials, the backend env is missing or not loaded. - If browser login fails with
401 Unauthorizedfrom/auth/v1/token?grant_type=password, first verify the client is using the anon key, not the service role key. - After changing env files, restart both the Vite client and the Express server.
The app is configured to use a self-hosted LibreTranslate instance by default instead of the paid public libretranslate.com endpoint.
Start LibreTranslate locally with Docker:
npm run translateThis starts a container on http://127.0.0.1:5000, which is the default URL used by the server translation service.
The command now waits until the LibreTranslate API is actually reachable before exiting. On the first run this may take a few minutes while models are downloaded.
This repo's bundled LibreTranslate setup has been verified with en, fr, and tl.
Stop it with:
npm run translate:stopIf Docker is already installed and you want the raw compose command, you can also run:
npm run translate:dockerNotes:
- If you host LibreTranslate elsewhere, set
LIBRETRANSLATE_URLinserver/.envto that internal or public URL. LIBRETRANSLATE_API_KEYis optional for self-hosting and should usually be left unset unless you enable API keys on your own instance.- The first container start may take longer while models are downloaded.
- The included Docker setup is currently intended for
en,fr, andtl. If you need more LibreTranslate-supported languages, add them toLT_LOAD_ONLYin docker-compose.libretranslate.yml and verify they are exposed by/languagesin your local image. - On Windows, Docker Desktop is the simplest way to run the included compose file.
- If
npm run translatesays Docker is not installed, install Docker Desktop and reopen your terminal before retrying. - If
npm run translatesays the Docker engine is not running, open Docker Desktop first and wait for it to finish starting before retrying. - If you prefer not to use Docker, install Python 3.8+ and run LibreTranslate yourself, then point
LIBRETRANSLATE_URLat that instance.
Run both client and server concurrently:
npm run devOr run them separately:
Client only (React + Vite on http://localhost:5173):
npm run clientServer only (Express on http://localhost:3000):
npm run serverGET /- Welcome messageGET /api/health- Health check endpoint
- Frontend: React, Vite, HTML, CSS, JavaScript
- Backend: Node.js, Express
- Development: Concurrently for running multiple processes