← all conversations

SaaS boilerplate setup

2025-09-287 turns31,564 charsgpt-5, gpt-5-t-mini
saas-boilerplateui-ux-designrepository-management

Summary

User wants to build a SaaS boilerplate with cutting-edge UI/UX, integrating payment systems like Stripe/PayPal, starting from specific GitHub repos.

Messages

what is the most up to date cutting edge most well designed UI/UX you can deliver in a SaaS boilerplate repo is what I want to build so that I can start from it and do everything. I want it to be a SaaS which will allow me to integrate Stripe or Paypal or whatever easily as well as using easy to use authentication. I want the application to be entirely local. That is what I really want is a frontend which deploys for free on Netlify and the backend and inference and database all occur locally on my machine. That is what I want set up. I have used next.js before, but I want you to use what is best. I want the very best option you can possibly build. After that I want you to create a master prompt I can give to CLIne so that it will code all of it. So output only two things, the README.md for the repo as well as the masterprompt.md which will contain the prompt that also keeps track of things that need to be coded and completed
⚙ model reasoning step
gpt-5-t-mini
⚙ model reasoning step
gpt-5-t-mini
⚙ model reasoning step
gpt-5-t-mini
Below are the two files you asked for: `README.md` (the repo README describing the full, modern, local-first SaaS boilerplate) and `masterprompt.md` (the single master prompt you can feed to CLIne to generate the entire repo and keep track of remaining tasks). I built the design decisions around a single, opinionated — but highly practical — stack that maximizes modern UI/UX, developer velocity, and the local-first backend/inference requirement you emphasized. I chose a React + Next.js (App Router) frontend using Tailwind + shadcn/ui (Radix primitives) for top-tier, accessible components and a gorgeous design system; a local-first backend using PocketBase (single binary: auth, DB, file storage, real-time) so everything can run on your machine; payments handled by Stripe (with clear local-dev options via tunneling) while also noting PayPal as a lightweight alternative; and a type-safe developer experience (TypeScript, Prisma for optional local DB layers, and tRPC if you want tight frontend-backend type-safety for any custom API you add). These choices are supported by the current ecosystem trends and tooling. citeturn0search1turn0search11turn0search6turn0search4 --- # `README.md` ```markdown # Local-First SaaS Boilerplate — Modern UI/UX, Netlify Frontend, Local Backend & Inference **Purpose:** a polished, production-minded SaaS starter that deploys the **frontend** (static + edge) for free on Netlify while the **backend, database, authentication, and inference** run **locally** on your machine (developer-first). The repo gives you a visually modern, accessible UI and the wiring to add payments (Stripe / PayPal) and local LLM inference, with clear developer workflows. --- ## High-level architecture (what you'll get) - **Frontend:** Next.js (App Router) + TypeScript, Vite-style dev speed, server-side rendering where helpful; styled with **Tailwind CSS** and component system from **shadcn/ui** (Radix primitives) for accessible, modern UI/UX and rapid composition. citeturn0search1turn0search15 - **Local backend (production-mode optional):** **PocketBase** — single binary providing SQLite-based DB, user auth, file storage, and realtime websockets, perfect for local-first apps. Runs on your machine; no remote DB required. citeturn0search11 - **Payments:** Stripe integration examples included (Checkout + server-signed session flow). For purely local development you can use tunneling (ngrok) for webhooks, or use client-only PayPal buttons as an easier alternative. (Docs and dev scripts included). citeturn0search4turn0search19 - **API layer:** direct calls to PocketBase REST + realtime for most features. Optional tRPC proxy example included to provide end-to-end TypeScript safety if you later add a custom Node server. citeturn0search6 - **Local inference:** example integration with local LLM servers (Ollama, Llama.cpp, or any HTTP-based local LLM endpoint). The repo provides a pluggable wrapper so you can swap in your chosen local inference binary or container. - **Database migration / local persistence:** PocketBase (SQLite) by default — optional Prisma/Drizzle examples if you want additional typed ORM layers for other local databases. - **Auth flows:** sign up / sign in / email verification / password reset out of the box via PocketBase. Examples show how to swap in Clerk, Supabase, or NextAuth if you prefer hosted or hybrid auth later. citeturn0search2turn0search3 - **Design system & components:** shadcn/ui + Radix primitives + Tailwind tokens; a ready-made, beautiful dashboard and marketing pages (auth screens, pricing, onboarding, subscription management, billing page, account settings, webhook logs, LLM jobs view, file uploads). citeturn0search1 --- ## Why this stack? (short rationale) - **Local-first:** PocketBase gives a single-file backend including auth, DB, files, and realtime — fastest route to a local backend you can distribute and run offline. Great for prototyping and local inference. citeturn0search11 - **Frontend design & DX:** shadcn/ui + Tailwind provides modern, accessible UI foundations while letting you fully customize visuals. The Next.js ecosystem remains dominant for SaaS-style apps, and it pairs well with Netlify static/edge deployment. citeturn0search1turn0search15 - **Type-safe APIs:** if you add custom server logic, tRPC keeps type-safety without GraphQL complexity. Use it for internal procedures that interface with local services. citeturn0search6 --- ## Repo contents ``` / ├─ README.md ├─ masterprompt.md ├─ frontend/ # Next.js app (TypeScript) │ ├─ app/ │ ├─ components/ # shadcn UI & Radix-based components │ ├─ styles/ │ ├─ lib/pocketbase.ts # client wrapper │ └─ lib/llm.ts # inference wrapper (local) ├─ pocketbase/ # pocketbase config & scripts │ ├─ pb_data/ # SQLite & files (gitignored) │ └─ pocketbase.exe / pocketbase (download script) ├─ infra/ │ ├─ ngrok/ # scripts to setup ngrok (local webhooks) │ └─ docker/ # optional docker-compose (for LLM infra) ├─ examples/ │ ├─ stripe/ # example server code for signed Checkout sessions │ └─ paypal/ # client-only PayPal buttons example └─ scripts/ ├─ start-local.sh # boots pocketbase, local-llm, frontend └─ init-dev.sh # one-shot project init ``` --- ## Quick start (local dev) > Prereqs: Node 18+, pnpm (or npm/yarn), PocketBase binary (script downloads it), ngrok (optional, for Stripe webhooks), a Stripe test account if you want to exercise payments, and a local LLM binary or docker image if you plan to run inference. 1. Clone: ```bash git clone <repo-url> cd repo ``` 2. Install frontend deps: ```bash cd frontend pnpm install cp .env.example .env.local # set POCKETBASE_URL=http://localhost:8090 in .env.local ``` 3. Download PocketBase (one-command included): ```bash ./scripts/init-dev.sh # -> downloads pocketbase to ./pocketbase/pocketbase and creates pb_data ``` 4. Start everything locally: ```bash ./scripts/start-local.sh # boots pocketbase, local-llm (if configured), and starts Next dev server # frontend default at http://localhost:3000, PB at http://localhost:8090 ``` 5. Admin UI: PocketBase admin runs at `http://localhost:8090/_/` — create a user, collections, configure email or use dev-mode email. citeturn0search11 6. Payments (Stripe example): - For test mode, run ngrok and expose your local `./examples/stripe/webhook` endpoint. The README includes step-by-step instructions to register the webhook secret and test Checkout flows. If you prefer no tunneling, use the PayPal client-only example included. citeturn0search4turn0search19 --- ## Design & UX notes (what you'll get out of the box) - Pixel-perfect dashboard layout (responsive grid, charts placeholder, activity feed). - Accessible modals, dropdowns, tooltips, and form elements using Radix and shadcn conventions. citeturn0search1 - Theme switching (light/dark + accent color tokens). - Onboarding flow with trial & subscription screens. - Billing page that shows Stripe subscriptions, invoices, and simple cancellation flow. - LLM Jobs page — queue jobs to your local LLM, show status, output, and allow re-run. --- ## Extensibility & Advanced topics - If you want to move from PocketBase to a hosted DB (Postgres/Neon) for production, the repo includes a migration guide and Prisma templates for seed + schema mapping. (PocketBase is great for local dev but production migration steps are provided.) citeturn0search18 - Add tRPC server example if you want backend business logic with end-to-end types. citeturn0search6 - Swap auth: examples included for Clerk, Supabase Auth, NextAuth.js (guides and small adapter layer). citeturn0search2turn0search3 --- ## Security & privacy (local-first considerations) - Sensitive keys (Stripe secret, ngrok token) are never committed. Use `.env` and local secrets only. - If you expose your machine for webhooks (ngrok), restrict origins and rotate test keys frequently. - PocketBase runs local file storage by default — treat pb_data as sensitive and keep it out of source control. --- ## What this repo intentionally does **not** do - Does not provide a fully-managed multi-tenant SaaS production backend. It’s **local-first** and developer-focused — production hardened multi-tenant deployments are out-of-scope but migration guides are included. - Does not host your inference model for you. It shows _how_ to wire your local LLM and provides pluggable adapters for popular local LLM runtimes. --- ## Roadmap (higher-level features you can enable quickly) - Multi-tenant account plan support (organization/team model) - Admin usage analytics (mixpanel/segment placeholders) - Hosted mode (move PB -> Postgres + hosted auth) - CI/CD templates for Netlify + GitHub Actions (Netlify deploy for frontend is ready) --- ## References & ecosystem notes - shadcn/ui — component library built on Radix and Tailwind, a great foundation for modern design systems. citeturn0search1 - PocketBase — single-file open-source backend for local-first apps. citeturn0search11 - tRPC — excellent for type-safe internal APIs when you control both client and server. citeturn0search6 - Stripe + Netlify integration approaches & webhooks (dev tunneling recommended for local dev). citeturn0search4turn0search19 --- ## Next steps (how I suggest you use this) 1. Run local dev, explore PocketBase admin, and play with auth. 2. Replace sample marketing text and brand tokens to match your product. 3. Configure Stripe test keys and run a test Checkout flow using ngrok. 4. Plug your local LLM binary and run an example job from the UI. 5. Iterate UI using shadcn component pieces — everything is customizable. --- ## Contributing This repo is meant to be a highly opinionated starter. You're welcome to fork and extend. --- ## License MIT ``` --- # `masterprompt.md` (the master prompt for CLIne) ```markdown # MASTER PROMPT — Generate the Local-First SaaS Boilerplate You are CLIne (a code generation agent). Your task: generate a complete, runnable repository for a **local-first SaaS boilerplate** described below. Produce code, config files, scripts, documentation, and tests necessary to run the app locally and to deploy the frontend to Netlify for free. Keep a persistent checklist of tasks and mark them completed as you generate files. Prioritize a polished UI/UX, accessibility, and developer DX. ## Primary requirements (must be implemented exactly) 1. **Frontend** - Next.js (App Router) + TypeScript. - Tailwind CSS integrated. - Use **shadcn/ui** component approach (Radix primitives + atomic components). Build a minimal design system (tokens, theme switcher, accent color). - Provide pages/components: - Marketing: `/` (hero, features, pricing) - Auth: `/sign-in`, `/sign-up`, `/forgot-password` - Dashboard: `/dashboard` (metrics, list view) - Billing: `/billing` (Stripe subscription status) - LLM Jobs: `/llm` (submit job, view history, view job output) - Settings: `/account` - Implement form validation (Zod) and use React Hook Form. - Use fetch/axios wrapper `lib/pocketbase.ts` for PocketBase interactions. - Include a demo chart component (using Recharts or chart library) with placeholder data. - Include CSS variables for theming; dark mode toggle + persisted preference. 2. **Local Backend** - Integrate PocketBase: - Provide `pocketbase/` folder with a download script (`scripts/init-pb.sh` or `init-dev.sh`) and a `pb_data/` folder (gitignored) for sqlite and files. - Create sample collection schemas (users, subscriptions, llm_jobs, invoices) either by JSON export or provide a PocketBase setup script (curl to PB REST) that bootstraps sample collections on first run. - Provide `scripts/start-local.sh` that: - Starts PocketBase in the background (if not running) - Optionally starts a local LLM docker container (if user enabled) - Starts Next.js dev server - Add a small Node example in `examples/stripe/` showing how to create Stripe Checkout sessions and signing webhooks (for dev use), with README documenting ngrok flow for local dev. 3. **Payments** - Provide example Stripe integration: - Client flow to create Checkout session (calls `examples/stripe/create-checkout` server endpoint). - Webhook handler example and instructions for ngrok. - Provide alternative PayPal client-only example in `examples/paypal/`. 4. **Local inference** - `lib/llm.ts` wrapper implementing an interface: - `submitJob(prompt, metadata) -> jobId` - `getJob(jobId) -> {status, output, startedAt, finishedAt}` - Provide a mock LLM runner (node script) and a Docker-compose example to run a known local LLM (placeholder) or accept Ollama/local HTTP API. - Connect `LLM Jobs` UI to the wrapper so user can queue and view jobs. 5. **Auth** - Use PocketBase auth flows (email + password). UI flows for sign-up, email verification (simulate dev-mode verification), sign-in, forgot password. - Provide adapter files and instructions to swap PocketBase for Clerk/Supabase/NextAuth. 6. **Developer DX** - `README.md` (full) and `masterprompt.md` (this file) must be created at top level. - `.env.example` with required env vars (POCKETBASE_URL, STRIPE_PUBLISHABLE_KEY, STRIPE_SECRET_KEY, NGROK_TOKEN). - Husky pre-commit with lint-staged for formatting and types checks. - GitHub Actions workflow skeleton for running typecheck + lint + build. 7. **Design** - Use accessible components (aria attributes) and keyboard navigability. - Provide a small set of tokenized styles (spacing, colors, type scale). - Provide a landing page hero with SVG illustration and micro-interactions (hover, subtle motion via CSS). 8. **Netlify** - Add `netlify.toml` and build instructions to deploy frontend to Netlify (static build + rewrites as needed). - Document any environment differences between local and Netlify deployment. (Note: backend remains local; explain dev vs prod requirements.) ## Non-functional requirements - **Type-safe** TypeScript; no implicit `any`. - Clear, modular code with comments for important integration points. - Small demo dataset seeded on first run. - Minimal tests: at least smoke tests for `lib/pocketbase.ts`, `lib/llm.ts`, and one UI snapshot or react-testing-library test for the main dashboard component. - Project must be runnable by following README steps. ## Checklist (persist and update — mark items 'DONE' when generated) - [ ] repo scaffold (package.json, tsconfig, pnpm lock) - [ ] frontend app basic pages (/, /dashboard, /auth) - [ ] shadcn component primitives scaffold - [ ] Tailwind config + tokens + dark mode - [ ] pocketbase download script + pb_data gitignore - [ ] pocketbase bootstrap collections script - [ ] lib/pocketbase.ts wrapper - [ ] lib/llm.ts wrapper + mock runner - [ ] LLM Jobs UI + API wiring - [ ] Stripe example server + client wiring - [ ] PayPal client example - [ ] ngrok helper scripts + docs - [ ] start-local.sh and init-dev.sh - [ ] README.md (complete) - [ ] Tests + GitHub Actions skeleton - [ ] netlify.toml + deploy notes - [ ] Example environment file `.env.example` - [ ] License & contributing guidelines ## How to generate files (instructions for CLIne) - Generate files in this structure. For each file: - Ensure TypeScript types are defined. - Add comments in files where the user must add their own API keys or machine-specific settings. - Generate minimal but runnable code for all endpoints. If anything requires secrets (Stripe secret), wire a `TODO` and show an example `.env` value. - For any external binary (pocketbase) include a small shell script that automatically downloads the correct binary for Linux/macOS/Windows (or points the user to the official PocketBase URL). - Provide simple smoke-run instructions at end of generation (copy into README). ## Prioritization (if generation must be partial, do these first) 1. Repo scaffold, frontend basic pages, Tailwind, shadcn components. 2. PocketBase download script + wrapper + basic auth flows. 3. start-local script & README instructions to run locally. 4. LLM wrapper + mock runner. 5. Stripe example + ngrok docs. 6. Tests & CI skeleton. 7. Extras (Prisma templates, tRPC proxy). ## Output format and expectations - I will create files directly into the repository, following the tree above. - For every generated file, add a one-line summary comment at the top describing its purpose. - When a step requires user credentials or an external binary to run (eg Stripe secret, ngrok), put a clear `### ACTION REQUIRED` comment at the top of the file and in README. - After generating the initial commit, post a concise checklist of completed files and what remains (update the persistent checklist above). - Provide example commands to run the dev environment and to deploy frontend to Netlify. ## Constraints / Caveats you must warn the user about in generated README - PocketBase is excellent for local-first dev, but if you want production multi-tenant Postgres you must migrate; provide a small migration note. citeturn0search18 - Stripe webhooks require a public endpoint; local dev should use ngrok or similar — provide instructions and example env flow. citeturn0search4turn0search19 ## Final step for CLIne When all files are generated, produce a short developer checklist to run: 1. `./scripts/init-dev.sh` 2. `./scripts/start-local.sh` 3. Visit `http://localhost:3000` and `http://localhost:8090/_/` (PB admin) Then mark the master checklist items DONE accordingly. --- # End master prompt ``` --- If you want, I can now: - Generate a full file tree and begin implementing the actual code and scaffolding (I can produce the code here as text files you can paste). - Or I can instead generate an opinionated `package.json`, `next.config.js`, `tailwind.config.js`, and the most important files right away (pick the first `n` files). Tell me which you want next — full repo generation here in-chat, or a smaller staged batch (eg. scaffold + auth + pocketbase wiring). I can proceed to output code right away.
gpt-5-t-mini
what I need next is a new masterprompt.md and README.md which will begin with this repo https://github.com/kliewerdaniel/saas01.git then I want you to take https://github.com/kliewerdaniel/art04 and rebuild art04 repo but instead start with the saas01 repo and build from there. So for deliverables I want just those two files, the README.md for the new project and the masterprompt.md to give to CLIne to start the AI assisted development
Here are the two updated files, as you requested: `README.md` for the new project (which uses **saas01** as the base and layers in the features of **art04**), and `masterprompt.md` that you can give to CLIne to start guided AI-assisted development. --- ## `README.md` ```markdown # ArtSaaS — Platform for Mentorship, Support & Impact (built on saas01 + art04) A SaaS platform combining the polished SaaS boilerplate **saas01** with the mission-driven features of **art04**: connecting volunteers with artists (especially homeless or under-resourced), mentorship, financial support, and mental health assessments. Front-end deploys on Netlify; backend, DB, auth, and ML/inference run locally during development. --- ## Vision & Purpose - Facilitate mentorship & volunteer matching with artists who need help. - Allow donors/volunteers to provide financial support, track donations. - Collect and visualize impact: mental health assessments (e.g. PHQ-9, GAD-7), progress dashboards. - Enable artist portfolios / galleries. - Make this a local-first, extendable foundation so you can iterate fast and build features without worrying about infra until later. --- ## What You Get (Features merged from saas01 + art04) - The core SaaS boilerplate (auth, payments via Stripe/PayPal, LLM / local inference hooks, design system, theme switcher). - From art04: artist & volunteer user roles; artist profiles and portfolios; mentorship sessions scheduling or logging; mental health assessment forms and result tracking; dashboards for volunteers, artists, admins. - Technical foundation: Next.js (App Router) + TypeScript; Tailwind + shadcn/ui; local backend (PocketBase or optionally hybrid) or maybe light ORM if needed; sample data; interactive charts (e.g. Recharts) for impact metrics; export / reporting capabilities. --- ## Architecture & Stack | Component | Technology / Pattern | |---|---| | Frontend | Next.js + TypeScript, App Router; Tailwind CSS + shadcn/ui + Radix for UI; responsive, accessible, themeable layout | | Authentication | Email/password, with possible extension to OAuth for volunteers/artists | | Backend / Local-first | PocketBase (SQLite) for dev, file storage, user auth; optional ORM layer (Prisma?) if more relational schema needed | | Payments | Stripe (checkout, invoices) + PayPal example | | Assessments & Impact | Forms for PHQ-9, GAD-7 (or other mental health tools); storage of results; data visualization | | Portfolios | Artists can upload artworks, images; gallery views; possibly static export later | | Mentorship | Volunteer/artist matching; log sessions; profile management | | ML / Extras | Optionally local ML/AI inference (for recommendations, matching, insight) via mock + real providers | | Deployment | Frontend hosted on Netlify; backend remains local for dev; later optional remote backend if scaling up | --- ## Directory Structure ```text / ├── README.md ├── masterprompt.md ├── apps/ │ ├── web/ # Next.js frontend + API routes │ └── (optional) other apps ├── pocketbase/ # backend if using PB; scripts + data ├── prisma/ # (optional) schema/migrations if using Prisma ├── ml-service/ # (optional) local ML / inference containers ├── scripts/ # setup, data seed, exports ├── examples/ # stripe, paypal, assessment forms mock etc. ├── .env.example ├── netlify.toml ├── tsconfig.json └── package.json / pnpm-workspace etc. ``` --- ## Local Development & Quick Start > Prerequisites: Node.js ≥18, pnpm (or npm/yarn), optionally Docker (if you use containers for ML), Stripe test account, etc. 1. Clone the repo ```bash git clone <your-repo-url> artsaas cd artsaas ``` 2. Install dependencies ```bash pnpm install ``` 3. Set up environment ```bash cp .env.example .env.local # fill in values: # NEXT_PUBLIC_POCKETBASE_URL, STRIPE_PUBLISHABLE_KEY, STRIPE_SECRET_KEY # optional: OPENAI_API_KEY, NGROK_TOKEN (for webhooks), etc. ``` 4. Bootstrap / seed data ```bash ./scripts/init-dev.sh ./scripts/bootstrap-collections.sh # or prisma/migrations + seeding if used ``` 5. Start dev stack ```bash ./scripts/start-local.sh ``` 6. View - Frontend: http://localhost:3000 - Admin / backend UI (PocketBase): http://localhost:8090/_/ - Dashboard / metrics, etc in frontend --- ## What’s Needed / Planned - Artist/Volunteer registration & roles - Mental health assessment builder & result tracking - Portfolio upload & gallery view - Mentorship session logging & matching system - Data dashboards for impact & admin reporting - Payments flow (donations, subscriptions, etc) - Export / download / reporting (CSV, maybe static site exports) - Tests, CI workflow - Accessibility reviews, responsive polishing --- ## Deployment Notes (Netlify + Local Backend) - Frontend deploys to Netlify; backend remains local unless you choose to host it. - Stripe webhooks need a public endpoint during dev (use ngrok or similar). - Ensure environment variables in Netlify dashboard mirror those needed locally (for public keys, etc). - Data persistence is local (e.g. PB’s SQLite); plan backup / migration for production. --- ## Contributing & Extensibility - The project is MIT-licensed. - There is a `masterprompt.md` in repo; it describes tasks and generation plan for CLIne. - You can swap out some components (e.g. PocketBase → Supabase / Prisma + Postgres; authentication providers; ML providers). - UI theming can be customized; assessments can be extended; export formats added. --- ## License MIT --- ``` --- ## `masterprompt.md` ```markdown # MASTER PROMPT — ArtSaaS (saas01 + art04 fusion) for CLIne You are CLIne, a code generation / scaffolding agent. Your goal is to generate a complete, working SaaS project called “ArtSaaS” that starts from the **saas01** boilerplate and integrates the key features of **art04**. Use this prompt to guide your work. Maintain a persistent checklist of tasks; mark them DONE as you implement them. Generate code, config, docs, and examples. --- ## Goals & Requirements 1. **Base Starting Point** - Clone or scaffold the structure and tooling of **saas01** as the foundation. - Retain its auth, payments, LLM/local inference, design system, theme switcher, and layout features. 2. **Incorporate Art04 Features** - User roles: Artist, Volunteer, Admin (and possibly Guest). - Artist Profiles / Portfolios: Artists can sign up, add profile information, upload artworks/images, have galleries. - Mentorship System: Volunteers can offer mentorship; artists can request; log mentorship sessions. - Mental Health Assessments: Provide forms (PHQ-9, GAD-7 or equivalent), store assessment results per user, show trends. - Dashboards: For artists, volunteers, and admins to see metrics (e.g. number of mentors, assessment stats, donations, portfolio views). - Financial Support / Donations: Either via Stripe (one-off donations) or recurring support; reporting of contributions. 3. **Technical Stack & Local-First** - Next.js + TypeScript (App Router). - Tailwind CSS + shadcn/ui with Radix. - Backend: PocketBase for local dev; optionally Prisma + SQLite/PostgreSQL if needed for more relational features. - LLM / inference hooks (mock + real) as in saas01. - Payments: Stripe example + PayPal. - Charts / Data Visualization (e.g. Recharts). 4. **UX / UI / Accessibility** - Responsive design. - Theme switching (light/dark). - Accessible components. - Good onboarding flows: registration, profile setup, upload flow, assessment UI, etc. - Proper form validation, errors, loading states. 5. **Developer Tools / DX** - Scripts: `init-dev.sh`, `bootstrap`/`seed` scripts, start scripts. - `.env.example` with required env variables. - Tests: at least smoke tests, UI test for dashboard, backend wrappers. - CI skeleton (GitHub Actions or similar). - Documentation: README, usage, contrib. --- ## Persistent Checklist - [ ] Clone / scaffold saas01 base (retain design, components, theme) - [ ] Setup roles: Artist, Volunteer, Admin authentication and role enforcement - [ ] Artist profile & portfolio feature (upload images, gallery pages) - [ ] Mentorship: request/offering system + session logging UI & models - [ ] Mental health assessment forms + results + trends charting - [ ] Payment / financial support flows (donations, optional subscriptions) - [ ] Dashboards for each user type (artist, volunteer, admin) - [ ] Chart components for impact metrics - [ ] Local inference / LLM hooks (mock + real) - [ ] Tailwind + shadcn UI theming, dark mode, component polish - [ ] Scripts: setup, seed, start local - [ ] Environment variables & example file - [ ] Tests & CI workflow - [ ] Documentation (README, contributing, deployment) --- ## File & Feature Map to Implement For each item in checklist, plan out the files and features needed. Example mapping: - **Roles & Auth**: update backend schema (PocketBase or Prisma) → role field; frontend auth logic; role-guarded pages. - **Profile & Portfolio**: new collections / tables for `artists`, `artworks`; image upload endpoint or PB storage; frontend pages: profile edit, gallery view. - **Mentorship**: collections/tables for `mentorship_requests`, `sessions`; UI pages for request form, session log; Volunteer / Artist dashboards. - **Assessments**: assessment schema; form component(s); store results; chart/trends UI. - **Payments**: example API route or PB hook; Stripe checkout example; possible donation component; reports. - **Charts**: integrate a chart library; mock data then real data; frontend components. --- ## Generation Instructions - Begin by producing updated `package.json`, `tsconfig.json`, `next.config.js`, `tailwind.config.js`, directory scaffold based on saas01 but adding new folders as required. - Generate backend schema or collection definitions (for PocketBase or Prisma) for all new models. - Generate frontend pages/components for new features. - Generate mock seed data. - Insert comments / TODOs for things requiring secrets (Stripe keys etc). - For each feature, produce at least minimal working code. --- ## Output Format & Expectations - You must produce the files in repo structure. For each file, include top-comment describing purpose. - For every piece of functionality matching an item in the persistent checklist, mark it DONE when you create or wire up the code. - After initial scaffold, provide a summary of what is done vs what remains. --- ## Developer Actions Required (start-up) At end of generation, show commands: 1. `./scripts/init-dev.sh` 2. `./scripts/bootstrap-collections.sh` (or equivalent seed) 3. `./scripts/start-local.sh` Then verify in browser: - Frontend at `localhost:3000` - Backend / PocketBase Admin at `localhost:8090/_/` - Access key features: Artist profile, assessment form, donation page, mentor session log --- ## Constraints / Caveats - If using PocketBase, many relational queries or joins might be limited; plan accordingly or use Prisma + Postgres for production. - Managing file uploads for portfolios can be large; handle storage & performance. - Stripe webhooks for local dev require tunneling (ngrok etc). - Mental health assessment data is sensitive — plan for privacy / encryption / secure storage if needed. --- # End of master prompt ``` --- If you want, I can also generate a diff or mapping showing what parts of art04 map into which parts of saas01, so when CLIne builds you can track exactly what to carry over. Do you want me to produce that?
gpt-5