Repository navigation
Getting Started
- Node.js 18 or newer (the deploy workflow uses 18)
- Git LFS, only if you need the video files
- MySQL, only if you run the backend
The videos in frontend/src/assets/ (*.MP4, *.MOV, *.mov, see .gitattributes) are stored in
Git LFS and total several hundred MB. The live site does not use them at the moment, so for most work
you can skip the download:
GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/stackified/euphoric.git
cd euphoricWithout the videos, the frontend still builds, because the only modules that import them
(pages/Videos.jsx and components/FeaturedVideos.jsx) are not mounted. If you re-enable either,
run git lfs pull first.
The root package.json is an npm workspace for frontend and backend:
npm install # installs root, frontend and backend
# alternative: npm run install:allcd frontend
npm run dev # http://localhost:3000/euphoric/To test the enquiry form, create frontend/.env:
VITE_EMAILJS_SERVICE_ID=...
VITE_EMAILJS_TEMPLATE_ID=...
VITE_EMAILJS_PUBLIC_KEY=...Without a public key the form shows an error instead of sending.
-
Create a database, for example
CREATE DATABASE euphoric_db; -
Create
backend/.env:Variable Default in code Purpose PORT5000API port NODE_ENV- developmentallows any CORS originFRONTEND_URLhttp://localhost:3000Allowed CORS origin DB_HOST,DB_USER,DB_PASSWORD,DB_NAMElocalhost,root, empty,euphoric_dbMySQL connection DB_SSL- trueto connect over SSLEMAIL_HOST,EMAIL_PORT,EMAIL_USER,EMAIL_PASSport 587SMTP for enquiry notifications (optional) REDIS_ENABLED,REDIS_URLdisabled Optional Redis cache -
Start it:
cd backend npm run dev # node --watch src/server.js
Tables are created on first start. Check
http://localhost:5000/api/health.
Note that the frontend does not call the API yet (see Architecture).
From the repository root:
npm run dev # concurrently runs backend and frontendnpm run build:frontend # from the root, or: cd frontend && npm run build
cd frontend && npm run previewThe output is frontend/dist/. The backend has no build step (npm run build only prints a message).
EUPHORIC LIVE