Synaplan
Open-source AI platform for companies: self-hosted AI agents, GDPR-compliant chatbot widget, RAG knowledge base, WhatsApp and Outlook AI, MCP, multi-model routing. Docker, Kubernetes or hosted in Germ
Control diario de ventas, compras e ingresos por vendedor.
Translation pending
BusinessTypeScript · CSSGitHub @fernandezalfredOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Project with nextjs, prisma, mongodb, tailwindcss
Translation pending
Loading the full README.
Read the full README ↗Daily sales and net profit tracker for a small distribution business in Bolivia selling Queso (cheese), Yogurt, Milk, and Mote.
Each seller takes Queso and Yogurt from the deposit, sells them with Milk and Mote, and records what was left over and their total sales. The app works out sales, unsold value, the daily winner and each seller's pay; admins also see net profit after Milk and grain costs. The full description of rules and calculations is in context/project-overview.md.
@theme config — no tailwind.config.ts)npm install
Copy .env.example to .env and fill in:
cp .env.example .env
DATABASE_URL — a MongoDB connection string. Prisma's MongoDB connector requires a replica set; a standalone mongod will fail with "Transactions are not supported." A free-tier MongoDB Atlas cluster works out of the box.AUTH_SECRET — random secret for encrypting session JWTs. Generate one with:
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
This project uses prisma db push rather than prisma migrate (there is no prisma/migrations folder — MongoDB's Prisma connector doesn't support migrations the same way SQL databases do):
npx prisma generate
npx prisma db push
Then seed one admin and one seller:
npx prisma db seed
This creates:
| Role | Password | |
|---|---|---|
| Admin | [email protected] | ChangeMe123! |
| Seller | [email protected] | ChangeMe123! |
The seed is idempotent — re-running it won't duplicate users or overwrite an admin-set product price.
npm run dev
Open http://localhost:3000.
| Command | Description |
|---|---|
npm run dev | Start the dev server (Turbopack) |
npm run build | Production build |
npm start | Run the production build |
npm run lint | ESLint |
npm test | Run the Vitest suite once |
npm run test:watch | Run Vitest in watch mode |
VEHICLE_USER) — records and edits their own daily sale records and sees every seller's pay. The acting user always comes from the server-side session, never from the client./, which presents the product to distribution companies (no real data).src/proxy.ts requires sign-in everywhere except / and /login, and the admin role for /admin/*; every Server Action checks again.
src/
app/
page.tsx # Public product landing page
login/
(panel)/ # Signed-in shell: sidebar, header, breadcrumbs
dashboard/ # Sales charts, prices & costs (admin), sale records
account/ # Change own password
admin/users/ # Admin: user management
admin/grains/ # Admin: grain purchases
actions/ # Server Actions, one file per feature (+ tests)
components/
landing/ # Public landing page sections
sale-records/ # Sale Records table, cells, record forms
sales-charts/ # Charts, selected-day context
admin/ # users/, grain-purchases/, stock-purchases/, product-pricing/
layout/ ui/ auth/ account/ i18n/
hooks/ # Custom React hooks
lib/
daily-records.ts # Builds sale record rows and the daily winner
money/ # Prices, costs, revenue, net profit, seller pay
auth/ # Password hashing, session/admin guards
i18n/ # Translations (Spanish default, English)
types/
prisma/
schema.prisma
seed.ts # Idempotent seed script
context/ # Spec, coding standards, workflow, current feature, history
The app is bilingual — Spanish by default, English optional — via a cookie-backed language switcher; see src/lib/i18n/.
Vitest covers Server Actions (src/actions/) and business logic (src/lib/) only — React components are verified in the browser, not unit-tested (see context/coding-standards.md). Run npm test before committing.