marine-small

byHemant Pande

Build a small but complete full-stack web application called **Mini Expense Tracker**. The purpose of this project is to create a simple application where a user can record and manage their daily expenses. Focus on making the application fully functional rather than adding unnecessary features. ### 1. Frontend Create a clean, modern, and responsive web interface. The application should have: * A dashboard displaying: * Total expenses * Number of transactions * Highest expense * An expense list showing all recorded expenses. * An "Add Expense" button that opens a form. * Each expense should contain: * Expense title * Amount * Category * Date * Optional note * Categories should include: * Food * Travel * Shopping * Bills * Other * Each expense should have Edit and Delete actions. * Add a simple category filter so the user can view expenses from a selected category. * Display a simple summary of expenses by category. * The UI must work properly on both desktop and mobile screens. * Include proper loading, empty-state, and error-state messages. ### 2. Backend Create a backend API for the application. Implement REST APIs for: * Getting all expenses * Getting a single expense * Creating an expense * Updating an expense * Deleting an expense Use appropriate HTTP methods such as GET, POST, PUT/PATCH, and DELETE. The backend should: * Validate incoming data. * Reject invalid amounts or missing required fields. * Return appropriate HTTP status codes. * Handle errors properly. * Keep the backend code organized into logical files such as routes, controllers, and database/model-related files where appropriate. ### 3. Database Use a lightweight local database such as **SQLite**. Create an expenses table containing: * id * title * amount * category * date * note * created_at The application should automatically create/initialize the database when required. Add a few sample expenses so that the dashboard is not empty when the application is first launched. ### 4. Frontend–Backend Integration The frontend must communicate with the backend through the REST API. Do not use hardcoded expense data for the main functionality. When a user: * Adds an expense → save it to the database. * Edits an expense → update the database. * Deletes an expense → remove it from the database. * Refreshes the page → previously stored expenses should still appear. ### 5. Project Structure Keep the project simple and organized. Separate the frontend and backend appropriately and use reusable components where useful. Do not introduce unnecessary libraries, authentication systems, payment systems, cloud services, or other advanced features. ### 6. Final Requirements The final application should be runnable locally. Provide: 1. Complete source code. 2. Required package/dependency files. 3. Database setup. 4. Clear instructions for installing dependencies. 5. Clear instructions for starting both frontend and backend. 6. Any environment variables that are required. 7. A brief explanation of the architecture and API endpoints. Prioritize **working functionality, clean code, proper frontend-backend integration, database persistence, responsive UI, and good error handling** over adding extra features. Do not over-engineer the project. Keep it small enough to understand and run easily.

LandingEdit ExpenseAdd Expense
Landing

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 8

System Requirements Document for marine-small

1. Introduction

The Mini Expense Tracker is a small, full-stack web application designed to help users record and manage their daily expenses. The application focuses on providing a clean, modern, and responsive interface that allows users to track their expenses efficiently without unnecessary features. The target audience is individuals looking for a straightforward tool to manage personal expenses.

2. System Overview

The Mini Expense Tracker is a locally runnable application that includes a responsive frontend, a RESTful backend API, and a lightweight SQLite database. The application allows users to add, edit, delete, and view expenses, with a dashboard summarizing total expenses, transaction count, and the highest expense. The system is designed to be simple, organized, and easy to use, with a focus on functionality and error handling.

2a. Product Interpretation and Delivery Boundary

The application is delivered as a complete package that can be run locally. It includes a frontend built with a modern, responsive design, a backend API for data management, and a SQLite database for persistence. The application does not include advanced features such as authentication or cloud services, adhering to the project's scope of being a simple and understandable expense tracker.

Page 2 of 8

2b. Source Content Inventory

Not applicable as no content_source directive was provided.

2c. Page Content and Component Coverage

Landing

  • Purpose: Introduce the Mini Expense Tracker and its core functionalities.
  • Components:
    • Introduction to the application and its use.
    • Overview of features such as expense recording and management.

Dashboard

  • Purpose: Display key metrics and list of expenses.
  • Components:
    • Total expenses, number of transactions, highest expense.
    • List of all recorded expenses with title, amount, category, date, and optional note.
    • "Add Expense" button to open the form.
    • Edit and Delete actions for each expense.
    • Category filter and summary of expenses by category.
    • Loading, empty-state, and error-state messages.
Page 3 of 8

Add Expense

  • Purpose: Allow users to add new expenses.
  • Components:
    • Form fields for title, amount, category, date, and optional note.
    • Validation messages for required fields.
    • Submit button to save the expense.

Edit Expense

  • Purpose: Enable users to edit existing expenses.
  • Components:
    • Pre-filled form with existing expense details.
    • Editable fields for title, amount, category, date, and note.
    • Save changes button to update the expense.

3. Functional Requirements

  • As an Expense manager, I should be able to view a dashboard displaying total expenses, number of transactions, and highest expense. (explicit)
  • As an Expense manager, I should be able to see a list of all recorded expenses with details such as title, amount, category, date, and optional note. (explicit)
  • As an Expense manager, I should be able to add a new expense with a title, amount, category, date, and optional note. (explicit)
  • As an Expense manager, I should be able to edit an existing expense to update its details. (explicit)
  • As an Expense manager, I should be able to delete an expense. (explicit)
  • As an Expense manager, I should be able to filter expenses by category and view a summary of expenses by category. (explicit)
  • As an Expense manager, I should see appropriate loading, empty-state, and error-state messages. (explicit)
  • As an Expense manager, I should be able to interact with the backend API to manage expenses. (required_inference)
  • As an Expense manager, I should see API validation and error responses surfaced by the interface. (required_inference)
Page 4 of 8

4. User Personas

  • Expense manager: The user who records, views, filters, edits, and deletes their daily expenses and reviews dashboard summaries.
Page 5 of 8

5. Core User Flows

  1. Viewing Dashboard:

    • The Expense manager accesses the Dashboard page.
    • The system displays total expenses, number of transactions, and highest expense.
    • The system lists all recorded expenses with relevant details.
  2. Adding an Expense:

    • The Expense manager clicks the "Add Expense" button on the Dashboard.
    • The system navigates to the Add Expense page.
    • The Expense manager fills in the expense details and submits the form.
    • The system validates the input and saves the expense to the database.
    • The system updates the Dashboard with the new expense.
  3. Editing an Expense:

    • The Expense manager selects an expense to edit from the Dashboard.
    • The system navigates to the Edit Expense page with pre-filled details.
    • The Expense manager updates the details and saves changes.
    • The system validates the input and updates the expense in the database.
    • The system reflects the changes on the Dashboard.
  4. Deleting an Expense:

    • The Expense manager selects an expense to delete from the Dashboard.
    • The system prompts for confirmation.
    • Upon confirmation, the system deletes the expense from the database.
    • The system updates the Dashboard to remove the deleted expense.
  5. Filtering Expenses by Category:

    • The Expense manager selects a category filter on the Dashboard.
    • The system displays expenses only from the selected category.
    • The system updates the category summary accordingly.
Page 6 of 8

6. Visuals Colors and Theme

  • Muse: Erik Spiekermann
  • Palette:
    • Background: #F6F3EE
    • Surface: #FFFFFF
    • Text: #333333
    • Primary: #E63946
    • Accent: #457B9D
    • Muted: #A8DADC
  • Typography:
    • Headings: Fira Sans
    • Body: Source Sans Pro
    • Scale: 1.333 modular, 48/36/24/18/16
  • Shape Language: Clear columns, rounded rectangles for buttons
  • Layout: Grid-based with intuitive tabular alignment
  • Motion: Functional transitions, restrained tempo
  • Imagery: Minimal, with iconography for categories

7. Signature Design Concept

The public entry page features a composed dashboard view set on a warm background. The primary color highlights actionable CTAs, with a clear, organized grid for dashboard metrics. Rounded-rectangle buttons in bold primary color are used for actions like 'Add Expense'. Category filters are displayed as pill-shaped buttons with accent colors, ensuring a clean and readable interface.

Page 7 of 8

8. Interaction Model & Motion Direction

  • Interaction Model: Static
  • Motion Tempo: Restrained
  • Hero Dimensionality: Flat
  • Landing Hero Motion Brief: The dashboard view is the focal subject, with clear text and data visualization. The primary color highlights actionable CTAs, and transitions are functional and purposeful.

9. Non-Functional Requirements

  • The application must be runnable locally with clear installation and startup instructions. (explicit)
  • The frontend must be responsive and work on both desktop and mobile screens. (explicit)
  • The backend must handle errors properly and return appropriate HTTP status codes. (explicit)
  • The database must initialize and seed sample expenses automatically. (required_inference)

10. Tech Stack

  • Frontend: React
  • Backend: Python/FastAPI
  • Database: SQLite
  • Containerization: Docker/docker-compose

11. Assumptions and Constraints

  • The application scope is limited to a small, understandable Mini Expense Tracker. (explicit)
  • No authentication, payment systems, or cloud services will be added. (explicit)
  • The frontend must communicate with the backend REST API without using hardcoded data. (explicit)
Page 8 of 8

12. Glossary

  • Expense manager: The user who interacts with the application to manage expenses.
  • REST API: A set of web service endpoints that allow interaction with the backend database.
  • SQLite: A lightweight, file-based database used for storing expenses locally.
Landing design preview
Landing: View landing page
Dashboard: View dashboard metrics
Add Expense: Submit new expense
Dashboard: View updated expenses
Edit Expense: Save expense changes
Dashboard: Delete expense
Dashboard: Filter by category
Landing design preview
Landing: View landing page
Dashboard: View dashboard metrics
Add Expense: Submit new expense
Dashboard: View updated expenses
Edit Expense: Save expense changes
Dashboard: Delete expense
Dashboard: Filter by category