You are an AI software architect and full-stack engineer. Your task is to design and implement a lightweight, user-friendly Expense & Invoice Management web application for a two-person small business that transacts in both USD and TShs (Tanzanian Shillings). Your solution must include: 1. Core Features User & Authentication Two user accounts (Admin & Employee), secure login (JWT or session). Role-based permissions: only Admin can create/delete users, but both can submit/view expenses and invoices. Expense Tracking CRUD interface for expenses: date, vendor, category (Travel, Office Supplies, Meals, etc.), amount + currency (USD or TShs), receipt upload. Automatic currency conversion: when viewing totals, convert all to a base currency (configurable, e.g. USD) using a live FX API. Tag or project assignment for each expense. Invoice Management CRUD for client invoices: client name, contact, invoice date, due date, line-items (description, quantity, unit price, currency). Generate downloadable PDF invoices with branding (logo, company details). Track invoice status (Draft, Sent, Paid, Overdue) and send email reminders. Multi-Currency Support Store raw amounts in their original currency plus converted base-currency value at time of entry. Display reports both by currency and aggregated in base currency. Allow toggling display currency on dashboards. Analytics & Reporting Expense Dashboard: Monthly / quarterly / yearly spend by category (bar or pie chart). Currency-breakdown: total USD vs. TShs. Top 5 vendors. Invoice Dashboard: Outstanding amounts, aging report (30/60/90+ days). Revenue by client. Export CSV/XLS of raw data and PDF snapshots of charts. Notifications & Reminders Email or in-app alerts for upcoming invoice due dates and overdue invoices. Weekly summary of new expenses and invoice status. 2. Technical Requirements Frontend: React (with TypeScript) or Vue.js; Tailwind CSS for styling; Chart.js (or Recharts) for analytics. Backend: Node.js + Express (or NestJS); Sequelize/TypeORM with PostgreSQL (or MongoDB) for persistence. Authentication: JWT-based API with refresh tokens. File Storage: AWS S3 (or local storage) for receipts and generated PDF invoices. Email Service: SendGrid or Mailgun for invoice notifications. Currency Conversion: Integrate a free FX API (e.g. exchangerate.host) for live rates. Deployment: Dockerize frontend and backend. CI/CD pipeline (GitHub Actions or GitLab CI). Host on AWS (Elastic Beanstalk / ECS) or Heroku. 3. Deliverables Project Repository Clean folder structure: /client, /server, /docs. README.md with setup instructions, environment variables, and deployment steps. API Documentation OpenAPI/Swagger spec for all endpoints. UI Mockups Figma (or equivalent) wireframes for expense entry, invoice editor, and dashboards. Automated Tests Unit tests for critical backend logic (currency conversion, invoice PDF generation). End-to-end tests for user flows (expense creation, invoice sending). Sample Data Seed script with example users, expenses, and invoices in both USD and TShs. Demo Deployment Live staging URL with dummy credentials for quick evaluation. Focus on simplicity, usability, and scalability—the final product should let two employees effortlessly track multi-currency expenses, manage client billing, and gain actionable insights through intuitive analytics. - Initial Deployment
3c4a591 verified | title: expense | |
| emoji: 🐳 | |
| colorFrom: pink | |
| colorTo: green | |
| sdk: static | |
| pinned: false | |
| tags: | |
| - deepsite | |
| Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference |