{"id":43255949,"url":"https://github.com/iamgerwin/multitenant-billing-system","last_synced_at":"2026-02-01T13:33:07.776Z","repository":{"id":327517181,"uuid":"1107874056","full_name":"iamgerwin/multitenant-billing-system","owner":"iamgerwin","description":"A full-stack multitenant billing system with vendor management, invoice tracking, and role-based access control.","archived":false,"fork":false,"pushed_at":"2025-12-05T09:07:27.000Z","size":523,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-07T09:47:44.599Z","etag":null,"topics":["billing","docker","laravel","monorepo","multitenancy","nuxt","vue"],"latest_commit_sha":null,"homepage":"http://77.42.19.179:3333/login","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamgerwin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-01T18:09:43.000Z","updated_at":"2025-12-05T09:07:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/iamgerwin/multitenant-billing-system","commit_stats":null,"previous_names":["iamgerwin/multitenant-billing-system"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/iamgerwin/multitenant-billing-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamgerwin%2Fmultitenant-billing-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamgerwin%2Fmultitenant-billing-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamgerwin%2Fmultitenant-billing-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamgerwin%2Fmultitenant-billing-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamgerwin","download_url":"https://codeload.github.com/iamgerwin/multitenant-billing-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamgerwin%2Fmultitenant-billing-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28979126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T12:13:08.691Z","status":"ssl_error","status_checked_at":"2026-02-01T12:13:08.356Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["billing","docker","laravel","monorepo","multitenancy","nuxt","vue"],"created_at":"2026-02-01T13:33:07.544Z","updated_at":"2026-02-01T13:33:07.768Z","avatar_url":"https://github.com/iamgerwin.png","language":"PHP","readme":"# Multitenant Billing System\n\nA full-stack multitenant billing system with vendor management, invoice tracking, and role-based access control.\n\n## Tech Stack\n\n- **Backend**: Laravel 11 (PHP 8.2+), MySQL 8.0, Laravel Sanctum\n- **Frontend**: Nuxt 4, Vue 3, Pinia, TailwindCSS\n- **Shared**: TypeScript package with types, enums, and utilities\n- **Infrastructure**: Docker Compose\n- **Project Management**: [ClickUp](https://sharing.clickup.com/90161067116/b/4-90165755197-2/board)\n- **Deployed**: [Production](http://77.42.19.179:3333/login)\n\n## Monorepo Structure\n\n```\nmultitenant-billing-system/\n├── backend/          # Laravel API server\n├── frontend/         # Nuxt 4 application\n├── shared/           # TypeScript shared package\n├── docker/           # Docker configuration\n├── docs/             # Documentation\n├── docker-compose.yml\n├── Makefile\n└── .env.example\n```\n\n## Quick Start\n\n### Prerequisites\n\n- Docker \u0026 Docker Compose\n- Git\n\n### Setup\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/iamgerwin/multitenant-billing-system.git\n   cd multitenant-billing-system\n   ```\n\n2. Copy environment file:\n   ```bash\n   cp .env.example .env\n   ```\n\n3. Start the services:\n   ```bash\n   make up\n   ```\n\n4. Run database migrations and seeders:\n   ```bash\n   make fresh\n   ```\n\n5. (Optional) Import sample database dump:\n   ```bash\n   # Extract and import the sample database\n   unzip docs/billing_system.sql.zip -d docs/\n   docker compose exec -T billing_mysql mysql -uroot -proot billing \u003c docs/billing_system.sql\n   ```\n\n6. Access the application:\n   - Frontend: http://localhost:3333\n   - Backend API: http://localhost:8888\n\n### Default Credentials\n\nAfter running seeders:\n- **Admin**: admin@acme.test / password\n- **Accountant**: accountant@acme.test / password\n- **User**: user@acme.test / password\n\n## Available Commands\n\n```bash\nmake up              # Start all services\nmake down            # Stop all services\nmake build           # Rebuild containers\nmake logs            # View container logs\nmake fresh           # Reset database with seeders\nmake test            # Run backend tests (Docker)\nmake test-local      # Run backend tests locally\nmake test-coverage   # Run tests with coverage report\nmake test-unit       # Run unit tests only\nmake test-feature    # Run feature tests only\n```\n\n## Using the Shared Package\n\nThe shared package (`@billing/shared`) provides TypeScript types, enums, and utilities used by both backend responses and frontend code.\n\n### Installation\n\nThe package is linked via npm workspaces. In the frontend:\n\n```typescript\nimport {\n  UserRole,\n  InvoiceStatus,\n  formatCurrency,\n  formatDate,\n  isValidTransition,\n  type User,\n  type Invoice,\n  type Vendor\n} from '@billing/shared'\n```\n\n### Available Exports\n\n- **Enums**: `UserRole`, `InvoiceStatus`\n- **Types**: `User`, `Invoice`, `Vendor`, `Organization`, `ApiResponse`, `PaginatedResponse`\n- **Type Guards**: `isUser()`, `isInvoice()`, `isVendor()`, `isValidInvoiceStatus()`\n- **Utilities**: `formatCurrency()`, `formatDate()`, `isValidTransition()`, `getNextStatuses()`\n\n## Documentation\n\n- [Architecture](docs/ARCHITECTURE.md) - System design and patterns\n- [API Reference](docs/API.md) - Endpoint documentation\n- [ERD](docs/ERD.md) - Database schema and relationships\n- [Testing](docs/TEST.md) - Testing infrastructure and guidelines\n- [Sample Database](docs/billing_system.sql.zip) - Database dump with sample data (100+ invoices, vendors)\n\n## Features\n\n- **Multi-tenancy**: Organization-scoped data isolation\n- **Role-based Access**: Admin, Accountant, and User roles with different permissions\n- **Vendor Management**: Create, update, and track vendors\n- **Invoice Workflow**: Create invoices with status transitions (Pending → Approved → Paid)\n- **Type Safety**: Shared TypeScript types across the stack\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamgerwin%2Fmultitenant-billing-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamgerwin%2Fmultitenant-billing-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamgerwin%2Fmultitenant-billing-system/lists"}