A maintenance and expense management system for owners corporations. Tracks recurring maintenance tasks, vendors, costs, and integrates with Paperless-ngx for automatic document matching.
- Task tracking: Create recurring maintenance tasks with customizable frequencies (weekly, monthly, quarterly, etc.)
- Smart scheduling: Recurring tasks calculate next due date from the previous due date, not completion date
- Vendor management: Store vendor contact info and track task assignments
- Cost tracking: Monitor maintenance expenses per task and vendor
- Category management: User-defined categories for organising tasks
- Document integration: Automatic document matching from Paperless-ngx with AI-powered suggestions
- Dark mode: Full support with Tailwind CSS v4
- Data persistence: JSON-based local storage with export/import via settings
- Archiving: Hide completed or obsolete tasks and vendors without deletion
- Framework: Next.js 16 (App Router) + TypeScript
- Styling: Tailwind CSS v4
- Data Storage: JSON files (
data/tasks.json,data/vendors.json,data/categories.json,data/line-items.json) - Document Integration: Paperless-ngx API
The quickest way to get started. Requires Docker and Docker Compose.
-
Clone the repository
git clone https://github.com/yourusername/oc-maintenance-tracker.git cd oc-maintenance-tracker -
Create environment file
cp .env.example .env.local
Edit
.env.localand add your Paperless-ngx configuration:PAPERLESS_BASE_URL=http://your-paperless-instance:8000/ PAPERLESS_API_TOKEN=your_token_here NEXT_PUBLIC_DOCUMENT_DOMAIN=http://your-paperless-instance:8000/ NEXT_PUBLIC_GOD_MODE_PASSWORD=your_admin_password
-
Start the application
docker-compose up
The app will be available at http://localhost:3000
Your data will be persisted in the
./datadirectory on your host.
Requires Node.js 20+ and npm.
-
Install dependencies
npm install
-
Create environment file
cp .env.example .env.local
Configure your
.env.localwith Paperless-ngx connection details. -
Start development server
npm run dev
Open http://localhost:3000 in your browser.
| Command | Purpose |
|---|---|
npm run dev |
Start dev server with hot reload |
npm run build |
Build for production |
npm start |
Start production server |
npm run lint |
Run ESLint + TypeScript checks |
app/
├── api/ # Backend endpoints
├── components/ # Reusable UI components
├── (pages) # App pages (tasks, vendors, line-items, etc.)
└── contexts/ # React context providers
lib/
├── cache.ts # Client-side caching utilities
├── colors.ts # Color system and utilities
├── data.ts # Data fetching hooks
├── line-items.ts # Line item logic
├── recommendations.ts # AI-powered document matching
├── tasks.ts # Task date math and utilities
└── vendors.ts # Vendor utilities
data/ # JSON data files (created at runtime)
├── tasks.json
├── vendors.json
├── categories.json
└── line-items.json
- API Routes: JSON endpoints in
app/api/handle CRUD operations - Client Data Fetching:
useCachedDatahook with client-side caching - Form State: Local component state with unsaved changes confirmation
- Date Handling:
date-fnsfor consistent date operations with OC year awareness (April 1 - March 31)
See .env.example for all available options:
PAPERLESS_BASE_URL: URL to your Paperless-ngx instancePAPERLESS_API_TOKEN: API token from Paperless-ngxNEXT_PUBLIC_DOCUMENT_DOMAIN: Public document serving URL (optional)NEXT_PUBLIC_GOD_MODE_PASSWORD: Admin feature password
By default, the app uses local JSON files for storage:
data/
├── tasks.json # All maintenance tasks
├── vendors.json # Vendor contact information
├── categories.json # Task categories
└── line-items.json # Major line items (building assets)
On startup, the app creates these files if they don't exist. Data is persisted automatically.
- Define your data model in
lib/[feature].ts - Create API routes in
app/api/[feature]/ - Build UI components in
app/components/ - Integrate into pages with data fetching hooks
- Test in the UI with dev server
- TypeScript: All code is type-checked
- Styling: Tailwind utility classes (no custom CSS)
- Components: Reusable, data-driven, no business logic in UI
- Naming: Clear, descriptive names for files, functions, and variables
If the app can't connect to Paperless-ngx:
- Verify
PAPERLESS_BASE_URLis correct and accessible - Check
PAPERLESS_API_TOKENis valid (generate a new one if needed) - Ensure your Paperless instance is running and accessible from the Docker container
If you have corrupted or inconsistent data:
- Stop the application
- Delete the
data/directory - Restart the application (fresh JSON files will be created)
- Re-import or re-create your data
For issues, feature requests, or questions, please open an issue on GitHub.
[Add your license here]