Skip to content

svjaime/backoffice-management-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 

Repository files navigation

Backoffice Management App

A full-stack system built with Next.js on Vercel (frontend) and Hono on Cloudflare Workers (backend).


Local Setup Instructions

1. Clone the Repository

2. Install Dependencies

cd backend
npm install

cd frontend
npm install

3. Setup Environment Variables

# Backend: Create .dev.vars and add JWT_SECRET
echo 'JWT_SECRET=your_secret_here' > backend/.dev.vars

# Frontend: Create .env.local and add the API base URL
echo 'NEXT_PUBLIC_API_BASE_URL=http://localhost:8787' > frontend/.env.local

3. Initialize the Database

cd backend
npx wrangler d1 migrations apply bma-db --local

This will set up the database with test users:

Note: These are also available in the live environment

4. Start the App

# Start backend
cd backend
npm run dev  # Runs on http://localhost:8787 (API Docs available on http://localhost:8787/docs)

# Start frontend
cd frontend
npm run dev  # Runs on http://localhost:3000