How techliondev/invistar works
Project type and purpose
• Full‑stack data management dashboard (CRUD for users, businesses, products, orders, invoices)
• Backend: PocketBase (Go‑based headless database + auth + file storage) with schema migrations
• Frontend: Next.js (App Router), TypeScript, React, UI component library, CSV import
File structure
• Top level:
– docker-compose.yaml
– backend/ (pocketbase, Dockerfiles, pb_migrations)
– frontend/ (Next.js app, Dockerfiles, components/, hooks/, lib/)
• backend/pb_migrations: sequential JS migration scripts for schema changes
• frontend/src/app: App Router folders for auth, landing, dashboard, resources (businesses, orders, products, settings)
• frontend/src/lib/api-service.ts + lib/pocketbase.ts: client wrappers for PocketBase API
README
• Minimal – only project name. Use file tree to infer purpose and tech stack.
Main components and their interactions
A. Client (Browser)
– Users access via browser over HTTPS
B. Frontend (Next.js container)
– SSR/CSR pages under /app
– Uses PocketBase JS SDK (lib/pocketbase.ts) and custom api-service for CRUD
C. Backend (PocketBase container)
– HTTP JSON API for auth, record management, file storage
– SQLite or built‑in DB + file storage on disk
– pb_migrations ensure DB schema is versioned
D. Data store
– Embedded database files + media folder managed by PocketBase
E. Container orchestration (Docker Compose)
– Defines two services: frontend, backend
F. Optional: CI/CD pipeline or developer machine
Architectural patterns and design principles
• Separation of concerns: UI vs. data layer vs. migrations
• Modular frontend: App Router (route groups), shared UI components, hooks, utils
• Containerization: consistent dev/prod via Dockerfiles (.dev and prod)
• Versioned schema migrations (pb_migrations directory)
Additional detail for this project
• Authentication flow: Next.js calls PocketBase auth endpoints (login, signup, verify, forgot).
• CSV import service: Frontend CSV importer → calls api-service → populates PocketBase collections.
• Modal-based CRUD UI as part of Next.js under “UI Components.”
Putting it all together
├── Frontend Container (Next.js)
└── Backend Container (PocketBase + migrations)
– From Browser to Frontend: labeled HTTPS
– From Frontend to Backend: labeled “PocketBase REST API”
– Call out env config (.env.example, next.config.ts, Dockerfiles) near each container