Quickstart
Run Food Magic's frontend and backend locally
Get Food Magic running on your machine in a few minutes.
Go into the backend folder and run this command. It starts everything
you need at once: the API server, the queued-job worker, the task
scheduler, the log viewer, and the frontend build watcher.
cd backend
composer dev
Or run just the API server:
php artisan serve
This runs the API at http://localhost:8000.
cd frontend
npm run dev
This runs the app itself at http://localhost:3000. It automatically
sends its API requests to http://localhost:8000.
cd backend
php artisan migrate
php artisan db:seed
This sets up a starter restaurant so you have something to sign in and
work with: a restaurant called "My Restaurant", an outlet called "Main
Branch", an owner account ([email protected]), the standard roles
and permissions, and the standard GST tax rates. Sign in with that
account and you'll land on the dashboard. (This is different from the
optional demo data covered below, which adds extra sample menu items,
orders, and customers.)
The login screen always starts empty. It never fills in an email or
password for you, even for a brand-new Super Admin account. Use the
[email protected] account you just created above (or create your
own by running the seed command again). See Login and password
reset for the full sign-in, forgot-password and
reset-password walkthrough.
You can change the address the frontend uses to reach the API by setting
VITE_API_BASE_URL. By default it points to
http://localhost:8000/api/v1.
Running php artisan db:seed --class=DemoDataSeeder adds richer sample
data — more menu items, orders, and customers — on top of the starter
setup above. You have to run it yourself; it doesn't happen
automatically. It's meant for development and testing, not for a live
restaurant.