Skip to content
/ EMS Public

EMS (Estate Management System) is an all-in-one platform centralising contact management, expense tracking, mileage and time logging, and estate inventory management.

Notifications You must be signed in to change notification settings

HarryB05/EMS

Repository files navigation

Estate Management Assistant

Homepage

EMS (Estate Management System) is a modern, web-based all-in-one platform centralising contact management, expense tracking, mileage and time logging, and estate inventory management. Built with Next.js and React and powered by Supabase, EMS provides users with a comprehensive suite of tools to manage estate-related tasks efficiently.

Features

Address Book

  • Maintain a detailed contact database
  • Add, edit, and delete contacts
  • Filter contacts by company and job title
  • Responsive design for both desktop and mobile views

Address Book

Expense Tracking

  • Log and categorize expenses
  • Attach receipts
  • Track payment accounts
  • Generate expense reports

Expense Logging

Time Management

  • Log time spent on estate-related activities
  • Categorize time entries
  • Track duration and add notes
  • Generate time reports

Time Logging

Mileage Tracking

  • Log vehicle mileage
  • Track trip purposes and destinations
  • Calculate total distance traveled
  • Generate mileage reports

Travel Logging

Item Management

Track and manage estate items with our comprehensive item management system.

Item Management

Settings & Data Export

Customize your experience and export your data when needed.

Settings Tabs

Tech Stack

  • Frontend Framework: Next.js 14 with React
  • Database & Authentication: Supabase
  • Deployment: Vercel
  • UI Components: Tailwind CSS with shadcn/ui
  • Form Management: React Hook Form
  • Date Handling: date-fns
  • Notifications: Sonner
  • Icons: Lucide React

Database Structure

The application uses Supabase as its backend, with the following main tables:

Core Tables

  • profiles: User profiles with basic information
  • contacts: Address book entries
  • expenses: Expense records
  • time_logs: Time tracking entries
  • mileage_logs: Vehicle mileage records

Lookup Tables

  • payment_accounts: Available payment methods
  • time_types: Categories for time entries
  • trip_reasons: Purpose categories for trips
  • item_locations: Location options for items
  • item_owners: Owner categories for items
  • item_statuses: Status options for items

Each table supports soft deletion with a deleted_at timestamp and includes audit fields (created_at, updated_at).

Getting Started

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. Set up your Supabase project and add the credentials to .env.local
  4. setup the database auth using the following command:
    create table public.profiles (
    id uuid primary key default gen_random_uuid(),
    user_id uuid references auth.users(id) on delete cascade,
    first_name text,
    last_name text,
    email text,
    created_at timestamp with time zone default now()
    );
    
    create or replace function public.handle_new_user()
    returns trigger
    language plpgsql
    security definer set search_path = public
    as $$
    begin
    insert into public.profiles (user_id, email, first_name, last_name)
    values (
            new.id,
            new.email,
            (new.raw_user_meta_data->>'first_name'),
            (new.raw_user_meta_data->>'last_name')
        );
    return new;
    end;
    $$;
    
    
    create trigger on_auth_user_created
    after insert on auth.users
    for each row
    execute procedure public.handle_new_user();
  5. setup the database tables using the schema in db.sql
  6. Run the development server:
    npm run dev

About

EMS (Estate Management System) is an all-in-one platform centralising contact management, expense tracking, mileage and time logging, and estate inventory management.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published