How shashank3876/creditsea works
CreditSea is a personal-loan lifecycle product with a borrower portal and a role-restricted operations workspace backed by an Express API. Borrowers register, maintain a profile, check eligibility, upload a salary slip, apply, and track loans; staff review leads, sanction applications, disburse loans, and record collections. The API enforces authentication and role permissions and persists lifecycle records in MongoDB, with private object storage for salary slips. The graph also retains the separate mockup preview app visible in the tree; its relationships are limited to those shown in its excerpt.
Main entry points: app.ts REST API app · models.ts Loan and account models · borrower.ts Borrower endpoints · auth.ts Authentication
Components 26
Web portal
- Borrower portal
artifacts/creditsea-lms/src/components/portal.tsx - Operations workspace
artifacts/creditsea-lms/src/components/portal.tsx - Sign-in and signup
artifacts/creditsea-lms/src/components/portal.tsx - Borrower pages
artifacts/creditsea-lms/src/app/borrower - Operations pages
artifacts/creditsea-lms/src/app/operations
API workflows
- REST API app
artifacts/api-server/src/app.ts - Authentication
artifacts/api-server/src/routes/auth.ts - Borrower endpoints
artifacts/api-server/src/routes/borrower.ts - Sales review
artifacts/api-server/src/routes/operations.ts - Sanction decisions
artifacts/api-server/src/routes/operations.ts - Loan disbursement
artifacts/api-server/src/routes/operations.ts - Payment collection
artifacts/api-server/src/routes/operations.ts - Employee management
artifacts/api-server/src/routes/employees.ts - Health check
artifacts/api-server/src/routes/health.ts
Domain and security
- Eligibility and loan rules
artifacts/api-server/src/lib/domain.ts - Sessions and authorization
artifacts/api-server/src/lib/security.ts - Request validation
artifacts/api-server/src/lib/validation.ts - Response mapping
artifacts/api-server/src/lib/dto.ts - Error handling
artifacts/api-server/src/middlewares/errorHandler.ts
Persistence and files
- Loan and account models
artifacts/api-server/src/lib/models.ts - MongoDB
- Private salary-slip storage
artifacts/api-server/src/lib/privateStorage.ts
Mockup preview
- Preview renderer
artifacts/mockup-sandbox/src/App.tsx - Discovered components
artifacts/mockup-sandbox/src/App.tsx
Other components
- Borrower or staff
- Private object store
Connections 37
- Borrower or staff → Sign-in and signup: signs in
README.md - Borrower or staff → Borrower portal: manages loans
README.md - Borrower or staff → Operations workspace: handles workflow
README.md - Borrower pages → Borrower portal: renders
artifacts/creditsea-lms/src/app/borrower/page.tsx - Operations pages → Operations workspace: renders
artifacts/creditsea-lms/src/app/operations/page.tsx - Sign-in and signup → REST API app: calls same-origin API
README.md - Borrower portal → REST API app: calls same-origin API
README.md - Operations workspace → REST API app: calls same-origin API
README.md - REST API app → Authentication: routes requests
- REST API app → Borrower endpoints: routes requests
- REST API app → Sales review: routes requests
- REST API app → Sanction decisions: routes requests
- REST API app → Loan disbursement: routes requests
- REST API app → Payment collection: routes requests
- REST API app → Employee management: routes requests
- REST API app → Health check: routes requests
- REST API app → Error handling: handles errors
artifacts/api-server/src/app.ts - Authentication → Sessions and authorization: sets sessions
artifacts/api-server/src/routes/auth.ts - Authentication → Request validation: validates input
artifacts/api-server/src/routes/auth.ts - Authentication → Loan and account models: reads and creates users
artifacts/api-server/src/routes/auth.ts - Authentication → Response mapping: maps users
artifacts/api-server/src/routes/auth.ts - Borrower endpoints → Eligibility and loan rules: checks eligibility
artifacts/api-server/src/routes/borrower.ts - Borrower endpoints → Loan and account models: reads and writes records
artifacts/api-server/src/routes/borrower.ts - Borrower endpoints → Private salary-slip storage: saves and streams files
artifacts/api-server/src/routes/borrower.ts - Borrower endpoints → Sessions and authorization: authorizes requests
artifacts/api-server/src/routes/borrower.ts - Borrower endpoints → Response mapping: maps responses
artifacts/api-server/src/routes/borrower.ts - Sales review → Loan and account models: queries leads
artifacts/api-server/src/routes/operations.ts - Sales review → Sessions and authorization: checks roles
artifacts/api-server/src/routes/operations.ts - Sanction decisions → Eligibility and loan rules: checks loan rules
artifacts/api-server/src/routes/operations.ts - Sanction decisions → Loan and account models: updates loan decisions
artifacts/api-server/src/routes/operations.ts - Sanction decisions → Private salary-slip storage: streams salary slips
artifacts/api-server/src/routes/operations.ts - Loan disbursement → Loan and account models: updates loans
artifacts/api-server/src/routes/operations.ts - Payment collection → Eligibility and loan rules: validates payment UTR
artifacts/api-server/src/routes/operations.ts - Payment collection → Loan and account models: records payments
artifacts/api-server/src/routes/operations.ts - Loan and account models → MongoDB: persists records
README.md - Private salary-slip storage → Private object store: stores and streams files
artifacts/api-server/src/lib/privateStorage.ts - Preview renderer → Discovered components: loads components
artifacts/mockup-sandbox/src/App.tsx