Skip to content

Getting Started

Lavesh Paryani edited this page Sep 26, 2026 · 1 revision

Getting Started

Requirements

  • 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

1. Clone

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 euphoric

Without 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.

2. Install

The root package.json is an npm workspace for frontend and backend:

npm install            # installs root, frontend and backend
# alternative: npm run install:all

3. Run the frontend

cd 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.

4. Run the backend (optional)

  1. Create a database, for example CREATE DATABASE euphoric_db;

  2. Create backend/.env:

    Variable Default in code Purpose
    PORT 5000 API port
    NODE_ENV - development allows any CORS origin
    FRONTEND_URL http://localhost:3000 Allowed CORS origin
    DB_HOST, DB_USER, DB_PASSWORD, DB_NAME localhost, root, empty, euphoric_db MySQL connection
    DB_SSL - true to connect over SSL
    EMAIL_HOST, EMAIL_PORT, EMAIL_USER, EMAIL_PASS port 587 SMTP for enquiry notifications (optional)
    REDIS_ENABLED, REDIS_URL disabled Optional Redis cache
  3. 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).

5. Both at once

From the repository root:

npm run dev            # concurrently runs backend and frontend

6. Build

npm run build:frontend        # from the root, or: cd frontend && npm run build
cd frontend && npm run preview

The output is frontend/dist/. The backend has no build step (npm run build only prints a message).

Clone this wiki locally