FloCafe
FloCafe is the free, local-first restaurant POS in the FloPOS ecosystem. Run orders, tables, kitchen display, and local data without a software subscription.
翻訳待ち
リポジトリ情報はまだ収集していません。
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗A Next.js app (App Router) in src/app, backed entirely by Supabase.
| Piece | Where |
|---|---|
Routes (one page.tsx per URL, page titles) | src/app ((site) holds every page with the header and footer) |
| Screens rendered by those routes | src/views |
| Shared components, hooks, backend client | src/components, src/hooks, src/lib |
pnpm install
cp .env.example .env.local # Supabase URL, publishable key, function slug
pnpm dev # http://localhost:5173
pnpm build && pnpm start # production build
Screens are client components ("use client"): data loads in the browser through the api Edge Function, so pages are rendered with their loading state on the server and fill in once the session is known. Environment variables must start with NEXT_PUBLIC_ to reach the browser. Deploy on Vercel or any Node host; set the three NEXT_PUBLIC_SUPABASE_* variables there and add the site's address to Supabase's Redirect URLs.
The app runs entirely on Supabase: database, file storage, backend function and sign-in (Supabase Auth with email + password and email magic links).
| Piece | Where |
|---|---|
| Tables, indexes, constraints | supabase/migrations/20261031000000_init_schema.sql |
| Storage buckets, auction-closing cron job | supabase/migrations/20261031000100_platform.sql |
Every query and mutation (same names as before, e.g. listings.get) | supabase/functions/_shared/modules/*.ts |
| Rules shared with the UI (plans, bidding, accounts, profile fields) | supabase/functions/_shared/domain/*.ts (imported in the app as @/shared/...) |
HTTP entry point (/functions/v1/api) | supabase/functions/api/index.ts |
React hooks (useQuery, useMutation, usePaginatedQuery, useBackendAuth, Authenticated...) | src/lib/backend/react.tsx |
Typed function references (api.listings.get) and row types (Doc, Id) | src/lib/backend/api.ts, src/lib/backend/types.ts |
| File uploads | src/lib/backend/upload.ts |
api Edge Function, which checks the Supabase Auth access token (sent in the x-user-token header) and applies the same rules the Convex functions did.db-changes. Browsers refetch the queries that read that table. After a mutation returns, the caller's own affected queries have already been refreshed.public-media holds listing photos, blurred previews, avatars, profile photos and feed photos. private-media holds locked originals and verification photos, which are only shown through 6-hour signed URLs to people allowed to see them. Uploads use one-time signed upload URLs, and the server only accepts files the user uploaded themselves.pg_cron runs app.close_due_auctions() every minute. Deletes cascade through foreign keys instead of background purge jobs.Pages: /signin (sign in, create account, email link), /auth/callback (where email links land) and /auth/reset (choose a new password). In the Supabase dashboard:
https://your-domain) and add https://your-domain/** (and http://localhost:5173/** for development) to Redirect URLs. Email links only work for listed addresses.npx supabase login
npx supabase link --project-ref <project-ref>
npx supabase db push # creates tables, buckets, cron job
npx supabase functions deploy api # verify_jwt is off in supabase/config.toml
.env.example to .env.local and fill in NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY and NEXT_PUBLIC_SUPABASE_FUNCTION (the function's slug) (Dashboard → Project Settings → API).ALLOWED_ORIGINS=https://your-domain as a function secret to restrict CORS.pnpm db:start # local Supabase (Docker)
echo PUBLIC_SUPABASE_URL=http://127.0.0.1:54321 > supabase/functions/.env
pnpm functions:serve
pnpm dev
Add an exported query(...) or mutation(...) to a module in supabase/functions/_shared/modules/. It's picked up by registry.ts and becomes api.<module>.<name> in the app with full types. Use ctx.db (get, first, select, insert, patch, delete, paginate, or raw SQL via rows) and ctx.storage. Throw AppError for messages the user should see. Schema changes go in a new file in supabase/migrations/.