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.
المنصة اللي يكسب فيها صانع المحتوى بالعربية من معرفته. بيع الكتب الإلكترونية، الكورسات، القوالب وأكثر. عمولة SaiFlow: 7%. ابدأ مجاناً.
Translation pending
CommerceTypeScript · CSSGitHub @Daadk3OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
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 modern digital products marketplace built with Next.js, inspired by Gumroad. Sell digital products like ebooks, courses, templates, and more.
Clone the repository
git clone https://github.com/yourusername/saiflow.git
cd saiflow
Install dependencies
npm install
Set up environment variables
Create a .env file in the root directory:
# Database
DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"
# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-nextauth-secret-generate-with-openssl-rand-base64-32"
# Stripe
STRIPE_SECRET_KEY="sk_test_your_stripe_secret_key"
STRIPE_WEBHOOK_SECRET="whsec_your_webhook_secret"
# UploadThing
UPLOADTHING_TOKEN="your_uploadthing_token"
Generate NextAuth Secret
openssl rand -base64 32
Set up the database
npx prisma migrate dev
Run the development server
npm run dev
Open your browser
Visit http://localhost:3000
For local development, use the Stripe CLI:
Install Stripe CLI
brew install stripe/stripe-cli/stripe
Login to Stripe
stripe login
Forward webhooks to localhost
stripe listen --forward-to localhost:3000/api/webhooks/stripe
Copy the webhook signing secret and add it to your .env file
For production, create a webhook endpoint in the Stripe Dashboard:
https://your-domain.com/api/webhooks/stripecheckout.session.completedsaiflow/
├── app/
│ ├── api/ # API routes
│ │ ├── auth/ # NextAuth configuration
│ │ ├── checkout/ # Stripe checkout
│ │ ├── download/ # File download after purchase
│ │ ├── orders/ # Orders API
│ │ ├── products/ # Products CRUD
│ │ ├── shops/ # Shops CRUD
│ │ ├── uploadthing/ # File upload
│ │ └── webhooks/ # Stripe webhooks
│ ├── dashboard/ # Seller dashboard
│ │ ├── sales/ # Sales tracking
│ │ ├── shop/ # Shop management
│ │ └── create-shop/ # Create new shop
│ ├── shop/ # Public shop pages
│ │ └── [slug]/ # Shop storefront
│ │ └── product/ # Product pages
│ ├── login/ # Login page
│ ├── signup/ # Signup page
│ └── success/ # Purchase success page
├── lib/
│ ├── prisma.ts # Prisma client
│ └── uploadthing.ts # UploadThing config
├── prisma/
│ ├── schema.prisma # Database schema
│ └── migrations/ # Database migrations
└── public/ # Static assets
| Variable | Description | Required |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | Yes |
NEXTAUTH_URL | Your app URL (http://localhost:3000 for dev) | Yes |
NEXTAUTH_SECRET | Secret for NextAuth.js sessions | Yes |
STRIPE_SECRET_KEY | Stripe secret key (dormant integration) | No |
STRIPE_WEBHOOK_SECRET | Stripe webhook signing secret (dormant) | No |
UPLOADTHING_TOKEN | UploadThing API token | Yes |
FOUNDER_BOT_API_TOKEN | Turns on the founder-only bot API. Unset = the API answers 404 | No |
FOUNDER_BOT_OWNER_EMAIL | The only account the bot may create stores and products for. Must also be in ADMIN_EMAILS and FOUNDER_TEST_EMAILS | No |
The founder bot (stores and pending product uploads for that one account) is documented in docs/FOUNDER_BOT_API.md, including example curl requests. It cannot approve products or touch payments. Unset FOUNDER_BOT_API_TOKEN to turn it off.
The app can be deployed to any platform that supports Next.js:
Make sure to:
npx prisma migrate deploy for database migrationsNEXTAUTH_URL to your production domain# Development
npm run dev # Start dev server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
# Database
npx prisma migrate dev # Run migrations (dev)
npx prisma migrate deploy # Run migrations (prod)
npx prisma studio # Open Prisma Studio
npx prisma generate # Generate Prisma Client
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.