How lokashche/netgainz works
NetGainz is a gym-management and accounting product: owners and staff use a phone-friendly Next.js app, whose API layer fronts a Frappe app that records gym operations and posts accounting through ERPNext. The main workflow spans member and plan setup, billing and collections, expense tracking, and Profit First cash allocation; additional product areas include check-in, enquiries, classes, offers, assessments, and reporting. The README documents the overall REST/ERPNext architecture; sampled routes show direct resource requests, while some backend subsystem links are supported only by the source index. Unsampled implementation details are not inferred.
Main entry points: api REST API layer · billing.py Billing and collections · provisioning.py ERP master provisioning · (dashboard) Owner web app
Components 21
Owner app
- Owner web app
owner-app/app/(dashboard) - REST API layer
owner-app/app/api - Session authentication
owner-app/lib/session.ts
Gym operations
- Member records
netgainz/net_gainz/doctype/member/member.py - Plans and memberships
netgainz/net_gainz/doctype/membership_plan/membership_plan.py - Enquiries and lifecycle
netgainz/net_gainz/operations - Check-in and attendance
netgainz/net_gainz/operations/checkin.py - Packs and day passes
netgainz/net_gainz/operations/packs.py - Fitness assessments
netgainz/net_gainz/operations/assessments.py - Classes and coaches
netgainz/net_gainz/doctype/session_schedule/session_schedule.py - Gym data loading
netgainz/net_gainz/loader/data_load.py
Money and books
- Billing and collections
netgainz/net_gainz/accounting/billing.py - Billing rules
netgainz/net_gainz/accounting - ERP master provisioning
netgainz/net_gainz/accounting/provisioning.py - Discounts and offers
netgainz/net_gainz/accounting/discounts.py - Expenses
netgainz/net_gainz/doctype/expense/expense.py - Profit First
netgainz/net_gainz/profit_first/calc.py - Reports and dashboards
netgainz/net_gainz/profit_first/reports.py
Platform
- Role permissions
netgainz/net_gainz/permissions.py - ERPNext accounting engine
Other components
- Gym owner or staff
Connections 26
- Gym owner or staff → Owner web app: uses
README.md - Owner web app → REST API layer: calls REST
README.md - REST API layer → Session authentication: checks session
owner-app/app/api/class-sessions/route.ts - REST API layer → ERPNext accounting engine: requests resources
owner-app/app/api/class-sessions/route.ts - REST API layer → ERPNext accounting engine: requests resources
owner-app/app/api/bookings/route.ts - REST API layer → ERPNext accounting engine: requests resources
owner-app/app/api/enquiries/route.ts - REST API layer → Member records: manages records
- REST API layer → Plans and memberships: manages plans
- REST API layer → Enquiries and lifecycle: supports pipeline
- REST API layer → Check-in and attendance: supports check-in
- REST API layer → Packs and day passes: supports sales
- REST API layer → Fitness assessments: supports assessments
- REST API layer → Classes and coaches: manages classes
owner-app/app/api/class-sessions/route.ts - REST API layer → Billing and collections: supports billing
- Plans and memberships → ERP master provisioning: provisions masters
netgainz/net_gainz/accounting/provisioning.py - Billing and collections → Billing rules: uses billing rules
netgainz/net_gainz/accounting/billing.py - Billing and collections → ERP master provisioning: provisions counterparties
netgainz/net_gainz/accounting/billing.py - Billing and collections → Profit First: uses cash logic
netgainz/net_gainz/accounting/billing.py - ERP master provisioning → ERPNext accounting engine: creates ERP masters
netgainz/net_gainz/accounting/provisioning.py - REST API layer → Discounts and offers: supports offers
- REST API layer → Expenses: records expenses
- REST API layer → Profit First: shows cash split
- REST API layer → Reports and dashboards: serves reports
- REST API layer → Gym data loading: loads gym data
- REST API layer → Role permissions: checks capabilities
- Gym owner or staff → REST API layer: initiates operations