-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This guide will help you set up your development environment for the MenuQR project. Please follow these instructions carefully to ensure a smooth setup process.
Before you begin, ensure you have the following installed on your system:
- Node.js 18.x or later
- npm, yarn, or pnpm
- Git
- A text editor (VS Code recommended)
git clone https://github.com/dustinwloring1988/menuqr.git
cd menuqr
Choose one of the following package managers:
# Using npm
npm install
# Using pnpm
pnpm install
# Using yarn
yarn install
-
Create your local environment file:
cp .env.example .env.local
-
Configure the following variables in
.env.local
:# Base URLs NEXT_PUBLIC_APP_URL=http://menuqr.local:3000 # Database Configuration DATABASE_URL=your_database_url_here # Authentication NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_key # Storage NEXT_PUBLIC_SUPABASE_STORAGE_URL=your_storage_url
To test restaurant-specific subdomains locally, you need to modify your system's hosts file:
- Open Notepad as Administrator
- Navigate to:
C:\Windows\System32\drivers\etc\hosts
- Add the following entries:
127.0.0.1 menuqr.local 127.0.0.1 joes-diner.menuqr.local 127.0.0.1 pizza-place.menuqr.local 127.0.0.1 cafe-bistro.menuqr.local 127.0.0.1 downtown-pub.menuqr.local 127.0.0.1 family-diner.menuqr.local
- Open Terminal
- Edit the hosts file:
sudo nano /etc/hosts
- Add the same entries as listed above
- Save with
Ctrl+O
, exit withCtrl+X
The project uses Supabase for the database. You can either:
A. Use a local Supabase instance:
# Install Supabase CLI
npm install -g supabase-cli
# Start local Supabase
supabase start
B. Or use a development project on Supabase cloud:
- Create a new project on Supabase
- Copy the SQL from
SQL.sql
file - Execute the SQL in Supabase's SQL editor
# Apply all migrations
npm run migrations:up
# Verify migrations
npm run migrations:status
-
Start the development server:
npm run dev # or pnpm dev # or yarn dev
-
Access the application:
- Main application: http://menuqr.local:3000
- Test restaurants:
Use these accounts for testing different subscription tiers:
Business | Password | Tier | |
---|---|---|---|
Joe's Diner | joe@joes-diner.com | Password123! | Professional |
Pizza Place | owner@pizza-place.com | Password123! | Starter |
Café Bistro | manager@cafe-bistro.com | Password123! | Professional |
Downtown Pub | pub@downtown-pub.com | Password123! | Professional |
Family Diner | admin@family-diner.com | Password123! | Enterprise |
- ESLint
- Prettier
- Tailwind CSS IntelliSense
- GitLens
- PostCSS Language Support
Create .vscode/settings.json
in your project:
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
]
}
-
Subdomain Not Working
- Verify hosts file entries
- Clear browser DNS cache
- Try using incognito mode
-
Database Connection Issues
- Check DATABASE_URL in
.env.local
- Verify Supabase is running
- Check network connectivity
- Check DATABASE_URL in
-
Build Errors
- Clear
.next
directory - Delete
node_modules
and reinstall - Verify Node.js version
- Clear
If you encounter issues:
- Check existing GitHub issues
- Join our Discord community
- Email support@menuqr.com
Please read our Contributing Guidelines before submitting changes.
- Create a feature branch
- Make your changes
- Run tests:
npm run test
- Run linting:
npm run lint
- Submit a pull request
Remember to keep your development environment updated:
git pull origin main
npm install