{"id":47192496,"url":"https://github.com/lucagerlich/asset-tracker","last_synced_at":"2026-05-05T18:01:52.423Z","repository":{"id":342803928,"uuid":"879770646","full_name":"LucaGerlich/asset-tracker","owner":"LucaGerlich","description":"Open-source IT asset management platform — track hardware, software licences, consumables \u0026 accessories with RBAC, SSO, audit logging, and integrations. Self-hostable","archived":false,"fork":false,"pushed_at":"2026-04-29T10:28:25.000Z","size":3812,"stargazers_count":1,"open_issues_count":18,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-29T10:32:58.239Z","etag":null,"topics":["asset-management","asset-management-portal","asset-management-system","audit-logging","helpdesk","inventory-management","it-asset-management","itam","nextjs","postgresql","self-hosted","shadcn-ui","sso","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://lucagerlich.github.io/asset-tracker/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LucaGerlich.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY_GUIDE.md","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":"2024-10-28T14:17:36.000Z","updated_at":"2026-04-29T10:28:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/LucaGerlich/asset-tracker","commit_stats":null,"previous_names":["lucagerlich/assetttracker","lucagerlich/asset-tracker"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/LucaGerlich/asset-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaGerlich%2Fasset-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaGerlich%2Fasset-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaGerlich%2Fasset-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaGerlich%2Fasset-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LucaGerlich","download_url":"https://codeload.github.com/LucaGerlich/asset-tracker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaGerlich%2Fasset-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32661193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["asset-management","asset-management-portal","asset-management-system","audit-logging","helpdesk","inventory-management","it-asset-management","itam","nextjs","postgresql","self-hosted","shadcn-ui","sso","tailwindcss","typescript"],"created_at":"2026-03-13T11:07:03.195Z","updated_at":"2026-05-05T18:01:52.416Z","avatar_url":"https://github.com/LucaGerlich.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Asset Tracker\n\n**Open-source IT asset management for teams of any size.**\n\nTrack hardware, software licences, consumables, and accessories — with role-based access, audit logging, SSO, and integrations built in.\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Next.js](https://img.shields.io/badge/Next.js-16-black?logo=next.js)](https://nextjs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-3178c6?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![Prisma](https://img.shields.io/badge/Prisma-7-2D3748?logo=prisma)](https://www.prisma.io/)\n[![Tailwind CSS](https://img.shields.io/badge/Tailwind-4-06B6D4?logo=tailwindcss\u0026logoColor=white)](https://tailwindcss.com/)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16+-4169E1?logo=postgresql\u0026logoColor=white)](https://www.postgresql.org/)\n\n[Features](#features) · [Quick Start](#quick-start) · [Deployment](#deployment) · [Configuration](#configuration) · [Contributing](#contributing)\n\n\u003c/div\u003e\n\n---\n\n## Features\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\" valign=\"top\"\u003e\n\n### Asset Management\n\n- Full lifecycle tracking (procure, deploy, maintain, retire)\n- Check-out / check-in with audit trail and history\n- Reservations with admin approval workflow and email notifications\n- File attachments with image gallery and thumbnails\n- QR code generation, printing, and scanning with action panel\n- Custom fields per asset category\n- Depreciation tracking and warranty alerts\n- Bulk import (CSV) for assets, accessories, consumables, licences, users, and locations\n\n\u003c/td\u003e\n\u003ctd width=\"50%\" valign=\"top\"\u003e\n\n### Users \u0026 Access Control\n\n- 35 granular RBAC permissions\n- Multi-tenancy with organization and department scoping\n- Role-based dashboard (admin stats vs. user \"My Assets\" view)\n- Microsoft Entra ID (Azure AD) SSO\n- LDAP / Active Directory authentication\n- SAML SSO support\n- MFA / 2FA with TOTP and backup codes\n- Per-user preferences (date, number, currency formats)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd valign=\"top\"\u003e\n\n### Inventory\n\n- **Licences** — seat assignment, compliance monitoring, expiry tracking\n- **Accessories** — check-out tracking with quantity management\n- **Consumables** — stock levels with reorder alerts and stock alert system\n- **Components** — categorized tracking and assignment\n\n\u003c/td\u003e\n\u003ctd valign=\"top\"\u003e\n\n### Ticketing \u0026 Workflows\n\n- Built-in ticket system with Kanban board\n- Email notifications on ticket assignment, comments, and status changes\n- Automated workflow engine (conditions + 5 action types)\n- Recurring maintenance scheduling with auto-calculated next due dates\n- Request and approval flows with admin email notifications\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd valign=\"top\"\u003e\n\n### Integrations\n\n- **Slack \u0026 Microsoft Teams** notifications\n- **Webhooks** — HMAC-signed with retry and delivery logs\n- **Freshdesk** ticket sync\n- **Stripe** billing (SaaS mode)\n- **Email** — Brevo, SendGrid, Mailgun, Postmark, SES\n- **SCIM** — user provisioning (RFC 7644 compliant)\n\n\u003c/td\u003e\n\u003ctd valign=\"top\"\u003e\n\n### Security \u0026 Compliance\n\n- AES-256-GCM encryption at rest\n- Full organization scoping on all API endpoints (SaaS-ready)\n- Audit logging with full entity diffs\n- GDPR data retention enforcement (automated cron)\n- Rate limiting and account lockout\n- Referential integrity checks on delete operations\n- CSP, HSTS, and security headers\n- Input validation (Zod) on all write endpoints\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd valign=\"top\"\u003e\n\n### Dashboard \u0026 Reporting\n\n- Drag-and-drop customizable widgets\n- Dashboard widgets: stats, expiring licences, cost overview, recent activity, upcoming maintenance\n- Charts: lifecycle, cost by category, asset age, location, maintenance, depreciation forecast\n- CSV, Excel, and PDF export\n- Typeahead search with filterable URLs\n\n\u003c/td\u003e\n\u003ctd valign=\"top\"\u003e\n\n### Mobile \u0026 PWA\n\n- Progressive Web App with install prompt\n- Mobile-optimized navigation and tables\n- QR scanning with asset detail action panel\n- Responsive card views for all data tables\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## Tech Stack\n\n| Layer      | Technology                                                                                 |\n| ---------- | ------------------------------------------------------------------------------------------ |\n| Framework  | [Next.js 16](https://nextjs.org/) (App Router, Turbopack)                                  |\n| Language   | [TypeScript 5.9](https://www.typescriptlang.org/)                                          |\n| Database   | [PostgreSQL](https://www.postgresql.org/) + [Prisma 7](https://www.prisma.io/) (42 models) |\n| Auth       | [BetterAuth](https://www.better-auth.com/) — sessions, SSO, MFA                            |\n| UI         | [Tailwind CSS 4](https://tailwindcss.com/) + [shadcn/ui](https://ui.shadcn.com/)           |\n| Validation | [Zod](https://zod.dev/)                                                                    |\n| Charts     | [Recharts](https://recharts.org/)                                                          |\n| Monitoring | [Sentry](https://sentry.io/) / [Glitchtip](https://glitchtip.com/)                         |\n| Testing    | [Vitest](https://vitest.dev/) + [Playwright](https://playwright.dev/)                      |\n| Caching    | PostgreSQL UNLOGGED tables (serverless-safe)                                               |\n\n---\n\n## Quick Start\n\n### Prerequisites\n\n- **Node.js 18+** or [Bun](https://bun.sh/)\n- **PostgreSQL** database\n\n### 1. Clone and install\n\n```bash\ngit clone https://github.com/luca-fitseveneleven/assetTracker.git\ncd assetTracker\nnpm install\n```\n\n### 2. Configure environment\n\n```bash\ncp .env.example .env\n```\n\nSet at minimum:\n\n```env\nDATABASE_URL=postgresql://user:password@localhost:5432/assettracker\nBETTER_AUTH_URL=http://localhost:3000\nBETTER_AUTH_SECRET=          # generate with: openssl rand -base64 32\nENCRYPTION_KEY=              # generate with: openssl rand -hex 32\nCRON_SECRET=                 # generate with: openssl rand -hex 16 (required in production)\n```\n\n### 3. Set up the database\n\n```bash\nnpx prisma migrate deploy\nnpx prisma generate\n```\n\n### 4. Create an admin user\n\n```bash\nnpm run create-admin\n```\n\n### 5. Start the server\n\n```bash\nnpm run dev\n```\n\nOpen **http://localhost:3000** and sign in.\n\n---\n\n## Deployment\n\n### Docker\n\n```bash\ndocker build -t asset-tracker .\ndocker run -p 3000:3000 --env-file .env asset-tracker\n```\n\n### Docker Compose\n\n```yaml\nservices:\n  app:\n    build: .\n    ports:\n      - \"3000:3000\"\n    env_file: .env\n    depends_on:\n      - db\n  db:\n    image: postgres:16-alpine\n    environment:\n      POSTGRES_DB: assettracker\n      POSTGRES_USER: assettracker\n      POSTGRES_PASSWORD: changeme\n    volumes:\n      - pgdata:/var/lib/postgresql/data\n\nvolumes:\n  pgdata:\n```\n\n### Vercel\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/luca-fitseveneleven/assetTracker)\n\nSet the environment variables in the Vercel dashboard and connect your PostgreSQL database. The build command automatically runs migrations.\n\n### Any Node.js Host\n\n```bash\nnpm run build\nnpm start\n```\n\n---\n\n## Configuration\n\nAll configuration is via environment variables. Copy `.env.example` for the full reference.\n\n| Category          | Key Variables                                                           |     Required     |\n| ----------------- | ----------------------------------------------------------------------- | :--------------: |\n| **Database**      | `DATABASE_URL`                                                          |       Yes        |\n| **Auth**          | `BETTER_AUTH_URL`, `BETTER_AUTH_SECRET`                                 |       Yes        |\n| **Encryption**    | `ENCRYPTION_KEY`                                                        |   Recommended    |\n| **Cron**          | `CRON_SECRET`                                                           | Yes (production) |\n| **Microsoft SSO** | `MICROSOFT_CLIENT_ID`, `MICROSOFT_CLIENT_SECRET`, `MICROSOFT_TENANT_ID` |        No        |\n| **Email**         | `EMAIL_PROVIDER`, provider API keys                                     |        No        |\n| **Storage**       | `STORAGE_PROVIDER` (`local`, `s3`, `azure`)                             |        No        |\n| **Integrations**  | Slack/Teams webhooks, Freshdesk API key                                 |        No        |\n| **Billing**       | `STRIPE_SECRET_KEY`, `STRIPE_WEBHOOK_SECRET`                            |        No        |\n| **Redis**         | `UPSTASH_REDIS_REST_URL`, `UPSTASH_REDIS_REST_TOKEN`                    |        No        |\n| **CAPTCHA**       | `TURNSTILE_SECRET_KEY`, `NEXT_PUBLIC_TURNSTILE_SITE_KEY`                |        No        |\n| **Self-hosted**   | `SELF_HOSTED=true` — disables landing page, pricing, registration       |        No        |\n\n---\n\n## Scripts\n\n| Command                | Description                            |\n| ---------------------- | -------------------------------------- |\n| `npm run dev`          | Start dev server (Turbopack)           |\n| `npm run build`        | Production build (includes migrations) |\n| `npm start`            | Start production server                |\n| `npm run lint`         | ESLint                                 |\n| `npm run format`       | Prettier                               |\n| `npm run test`         | Unit tests (Vitest)                    |\n| `npm run test:e2e`     | E2E tests (Playwright)                 |\n| `npm run analyze`      | Bundle size analysis                   |\n| `npm run db:seed`      | Seed database                          |\n| `npm run create-admin` | Create admin user                      |\n\n---\n\n## Project Structure\n\n```\nsrc/\n├── app/                    # Next.js App Router — pages \u0026 API routes\n│   ├── api/                # 160+ REST API endpoints\n│   ├── assets/             # Asset management pages\n│   ├── dashboard/          # Role-based widget dashboard\n│   ├── admin/              # Admin settings \u0026 configuration\n│   └── ...                 # Licences, accessories, consumables, etc.\n├── components/             # Shared UI components (shadcn/ui)\n│   └── dashboard/          # Dashboard widgets (stats, cost, licences)\n├── hooks/                  # Custom React hooks\n├── lib/                    # Core utilities\n│   ├── email/              # Email templates and queue service\n│   ├── integrations/       # Slack / Teams notification module\n│   ├── storage/            # Pluggable file storage (local, S3, Azure)\n│   ├── errors.ts           # Typed error classes (AppError hierarchy)\n│   ├── rbac.ts             # Permission system (35 permissions)\n│   ├── notifications.ts    # Email notification service\n│   ├── workflow-engine.ts  # Automated workflow execution\n│   ├── cache.ts            # PostgreSQL-backed cache (UNLOGGED table)\n│   ├── rate-limit.ts       # Distributed rate limiting\n│   ├── url.ts              # Base URL helper (env-aware)\n│   └── ...                 # Auth, validation, encryption, webhooks\n└── ui/                     # Page-specific UI components\nprisma/\n└── schema.prisma           # Data model (42 models)\ntests/\n├── e2e/                    # Playwright E2E tests (11 test files)\n└── ...                     # Vitest unit tests (29 test files)\n```\n\n---\n\n## Contributing\n\nContributions are welcome! Please:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/my-feature`)\n3. Run linting and tests (`npm run lint \u0026\u0026 npm run test`)\n4. Commit with a conventional commit message\n5. Open a Pull Request\n\nThis project uses [Husky](https://typicode.github.io/husky/) pre-commit hooks with Prettier, ESLint, and [commitlint](https://commitlint.js.org/).\n\n---\n\n## License\n\nMIT License — see [LICENSE](LICENSE) for details.\n\nCopyright (c) 2026 Luca Gerlich\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucagerlich%2Fasset-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucagerlich%2Fasset-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucagerlich%2Fasset-tracker/lists"}