How oscarbz-011/joapycore works
This is a multi-tenant business management application: a Next.js dashboard and a NestJS API for authentication, tenant and user administration, inventory, procurement, sales, and billing. The principal workflow is signing in or registering, receiving tenant-scoped credentials, then using dashboard operations subject to permissions and enabled modules. The backend is organized around controllers and services, with repositories and Prisma providing a persistence layer. The README is empty; connections for unsampled domain modules are therefore limited to documented module wiring or omitted where call sites were not shown.
Main entry points: auth.service.ts Authentication service · auth-context.tsx Auth context · client.ts HTTP client · dashboard Dashboard and settings
Components 21
Web dashboard
- Login and registration
front/app/(auth) - Dashboard and settings
front/app/(dashboard)/dashboard - Auth context
front/lib/auth-context.tsx - Auth API client
front/lib/api/auth.ts - HTTP client
front/lib/api/client.ts - Token store
front/lib/token-store.ts - Users API client
front/lib/api/users.ts - Roles API client
front/lib/api/roles.ts
Identity and access
- Authentication routes
BACK/src/auth/auth.controller.ts - Authentication service
BACK/src/auth/auth.service.ts - JWT and permission controls
BACK/src/common/guards - Users and roles
BACK/src/users
Tenant administration
- Tenant and module settings
BACK/src/tenants
Business operations
- Inventory
BACK/src/modules/inventory - Procurement
BACK/src/modules/procurement - Sales
BACK/src/modules/sales - Billing
BACK/src/modules/billing
Persistence
- Prisma service
BACK/src/prisma/prisma.service.ts - User repository
BACK/src/users/repositories/users.repository.ts - Refresh-token repository
BACK/src/auth/repositories/refresh-tokens.repository.ts
Other components
- Operator
Connections 21
- Operator → Login and registration: starts session
- Login and registration → Auth context: uses context
front/app/(auth)/login/page.tsx - Dashboard and settings → Auth context: uses context
front/app/(dashboard)/dashboard/page.tsx - Auth context → Auth API client: calls
front/lib/auth-context.tsx - Auth context → Token store: stores tokens
front/lib/auth-context.tsx - Auth API client → HTTP client: uses
front/lib/api/auth.ts - HTTP client → Token store: reads and updates
front/lib/api/client.ts - Users API client → HTTP client: uses
front/lib/api/users.ts - Roles API client → HTTP client: uses
- Dashboard and settings → Users API client: calls
front/app/(dashboard)/dashboard/settings/users/page.tsx - Dashboard and settings → Roles API client: calls
front/app/(dashboard)/dashboard/settings/roles/page.tsx - Authentication routes → Authentication service: delegates to
BACK/src/auth/auth.controller.ts - Authentication service → User repository: queries users
BACK/src/auth/auth.service.ts - Authentication service → Refresh-token repository: manages refresh tokens
BACK/src/auth/auth.service.ts - Authentication service → Prisma service: runs transaction
BACK/src/auth/auth.service.ts - User repository → Prisma service: queries
BACK/src/users/repositories/users.repository.ts - Users and roles → User repository: uses
BACK/src/users/services/users.service.ts - Tenant and module settings → Authentication service: provides tenant data
BACK/src/auth/auth.service.ts - Inventory → Inventory: serves inventory routes
- Procurement → Procurement: serves purchasing routes
- Billing → Billing: serves invoices