Skip to content

Repository files navigation

Sunrise Bakery

A complete website + merchant backoffice generated by LocalSite Studio. Storefront, admin panel, REST API, and database — all in this folder, all yours.

Quick start (zero keys needed)

npm install
npm run setup     # creates the SQLite database and seeds it
npm run dev       # → http://localhost:3000

Admin backoffice: http://localhost:3000/admin

Email owner@example.com
Password ADMIN_PASSWORD in this export's .env (generated for you; npm run setup prints it)

Change the password right after your first login (Admin → Settings).

Everything works immediately in mock mode: online ordering, reservations, appointments, reviews, coupons. Payments show a “Test mode” notice and auto-succeed; emails/SMS are logged to the database instead of sent.

Going live

  1. Payments — create a Stripe account, copy the secret + publishable keys into .env. Cards, Apple Pay, and Google Pay start working instantly. No webhook to set up: the site retrieves each payment intent from Stripe and matches the amount before it writes the order, so a charge is confirmed on the spot instead of on a callback. Start with the sk_test_/pk_test_ pair — the back office labels those orders TEST — and swap in the sk_live_/pk_live_ pair when you are ready to be paid.
  2. Email — create a Resend API key, verify your domain, set RESEND_API_KEY and EMAIL_FROM.
  3. SMS — optional: a Twilio number + credentials.
  4. Maps — optional: a Google Maps Embed API key for the live map card.
  5. Database — SQLite is fine for small shops. For Postgres (recommended in production): change provider = "postgresql" in prisma/schema.prisma, set DATABASE_URL, and run npm run setup again.
  6. Deploy — push to GitHub and import into Vercel. Set every value from .env in the Vercel project settings. Note: on Vercel use Postgres (SQLite files do not persist there), and file uploads should move to S3-compatible storage for production scale.

Copy .env.example to .env and fill in what you have — every key is optional except the database.

Self-hosting with Docker (no Vercel)

The export ships a complete VPS route: Dockerfile, docker-compose.yml, deploy.sh (rsync + docker compose up over SSH) and Caddyfile.example for automatic HTTPS.

  1. Copy .env.example to .env; set APP_URL, JWT_SECRET and ADMIN_PASSWORD (12+ characters — a production boot refuses to seed the admin account without it, so the container won't start).
  2. docker compose up -d --build — SQLite lives in the data volume, uploads in uploads.
  3. Point your domain's DNS at the box and copy Caddyfile.example to /etc/caddy/Caddyfile (then systemctl reload caddy).

After the first deploy, ./deploy.sh user@host re-syncs and restarts in one step. Admin login: owner@<your business domain> with the ADMIN_PASSWORD from .env — change it after the first login.

What's inside

  • Storefront — your design from the editor (app/(site)/)
  • Admin — orders board, catalog editor with photo upload, bookings, customers & reviews, coupons, announcements, settings (app/admin)
  • API — REST endpoints under /api/v1 (Hono, server/)
  • Database — Prisma schema + seed (prisma/)
  • Enabled modules: Admin auth, Business settings, Media uploads, Catalog, Online ordering, Payments, Coupons, Customers

Security notes

  • Card data never touches this server (Stripe Elements tokenization).
  • Admin sessions are httpOnly signed cookies; passwords are scrypt-hashed.
  • Public write endpoints are rate-limited with honeypot fields.
  • Set a strong JWT_SECRET before deploying.

Free tools by Naratake

The same team ships free, no-sign-up tools for local businesses. Everything runs in the browser; nothing you type is uploaded.

Guides: how to get more Google reviews for a restaurant, how to add online ordering to a restaurant website, what a small business website costs.


Generated 2026-09-01 · project sunrise-bakery · You own 100% of this code.

About

A complete small-business website - storefront, back office, REST API, database - exactly as Naratake's code export produced it. Nothing hand-edited.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages