Git Product home page Git Product logo

jamessingleton / project-aqua Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 0.0 1.83 MB

Streamline team management and meet coordination effortlessly with our comprehensive software, providing intuitive tools for scheduling, communication, & results tracking in one unified platform.

Home Page: https://project-aqua-web.vercel.app

License: GNU Affero General Public License v3.0

JavaScript 2.23% CSS 1.89% TypeScript 95.55% Handlebars 0.08% Shell 0.04% HTML 0.21%
build-in-public saas swimming nextjs open-source shadcn-ui tailwindcss tailwind supabase building-in-public

project-aqua's Issues

Add Supabase Integration

I decided that Supabase would be the DB of choice between the Web app and Desktop app.

To start off, here is what I am thinking table wise

-- Users Table
CREATE TABLE Users (
    user_id SERIAL PRIMARY KEY,
    username VARCHAR(255),
    email VARCHAR(255) UNIQUE,
    password VARCHAR(255),
    role VARCHAR(50), -- Assuming roles like 'coach', 'athlete', etc.
    date_of_birth DATE,
    contact_info VARCHAR(255)
);

-- Teams Table
CREATE TABLE Teams (
    team_id SERIAL PRIMARY KEY,
    team_name VARCHAR(255),
    coach_id INTEGER REFERENCES Users(user_id),
    description TEXT
);

-- Athletes_Teams Table (Many-to-Many Relationship)
CREATE TABLE Athletes_Teams (
    athlete_id INTEGER REFERENCES Users(user_id),
    team_id INTEGER REFERENCES Teams(team_id),
    join_date DATE,
    leave_date DATE,
    PRIMARY KEY (athlete_id, team_id)
);

-- Workouts Table
CREATE TABLE Workouts (
    workout_id SERIAL PRIMARY KEY,
    workout_name VARCHAR(255),
    coach_id INTEGER REFERENCES Users(user_id),
    team_id INTEGER REFERENCES Teams(team_id),
    date DATE,
    duration INTERVAL,
    description TEXT
);

-- Swim Meets Table
CREATE TABLE Swim_Meets (
    meet_id SERIAL PRIMARY KEY,
    meet_name VARCHAR(255),
    meet_date DATE,
    location VARCHAR(255),
    description TEXT
);

-- Attendance Table
CREATE TABLE Attendance (
    attendance_id SERIAL PRIMARY KEY,
    athlete_id INTEGER REFERENCES Users(user_id),
    meet_id INTEGER REFERENCES Swim_Meets(meet_id),
    attendance_status VARCHAR(50),
    date DATE,
    notes TEXT
);

-- Messages Table
CREATE TABLE Messages (
    message_id SERIAL PRIMARY KEY,
    sender_id INTEGER REFERENCES Users(user_id),
    recipient_id INTEGER REFERENCES Users(user_id),
    message_content TEXT,
    timestamp TIMESTAMP
);

-- Performance Metrics Table
CREATE TABLE Performance_Metrics (
    performance_id SERIAL PRIMARY KEY,
    athlete_id INTEGER REFERENCES Users(user_id),
    workout_id INTEGER REFERENCES Workouts(workout_id),
    metric_type VARCHAR(100),
    value FLOAT,
    date DATE,
    notes TEXT
);

-- Files Table
CREATE TABLE Files (
    file_id SERIAL PRIMARY KEY,
    file_name VARCHAR(255),
    file_type VARCHAR(50),
    file_size BIGINT,
    file_url TEXT,
    uploader_id INTEGER REFERENCES Users(user_id),
    upload_date TIMESTAMP,
    description TEXT
);

-- Swim Meet Events Table
CREATE TABLE Swim_Meet_Events (
    event_id SERIAL PRIMARY KEY,
    meet_id INTEGER REFERENCES Swim_Meets(meet_id),
    event_name VARCHAR(255),
    event_type VARCHAR(100), -- e.g., freestyle, breaststroke, relay, etc.
    event_distance INTEGER, -- distance
    distance_unit VARCHAR(10), -- meters or yards
    event_gender VARCHAR(10), -- gender category (optional)
    event_age_group VARCHAR(20) -- age group category (optional)
);

-- Swimmers_Events Table (Many-to-Many Relationship)
CREATE TABLE Swimmers_Events (
    swimmer_event_id SERIAL PRIMARY KEY,
    event_id INTEGER REFERENCES Swim_Meet_Events(event_id),
    athlete_id INTEGER REFERENCES Users(user_id),
    swim_time INTERVAL -- the time taken by the swimmer in the event
);

-- Event Results Table
CREATE TABLE Event_Results (
    result_id SERIAL PRIMARY KEY,
    meet_id INTEGER REFERENCES Swim_Meets(meet_id),
    event_id INTEGER REFERENCES Swim_Meet_Events(event_id),
    athlete_id INTEGER REFERENCES Users(user_id),
    time_result INTERVAL, -- time taken by the swimmer in the event
    placement INTEGER,
    points_earned INTEGER
);

Add Auth Integration

I haven't decided between Clerk, Supabase Auth or Next Auth just yet. I would be open to discussing pros and cons of each. I am slightly leaning towards Supabase since that is the DB I would like to use.

Correctly align date picker

Currently the date picker sits higher than the rest of the form inputs and should sit evenly with the rest.

Screenshot 2024-03-25 at 8 18 45 AM

Left nav should not scroll with the page on tablet size

Describe the bug
When in a table size (width of 768px), the left nav scrolls as the user scrolls the page, this should not happen

To Reproduce
Steps to reproduce the behavior:

  1. Run npm run dev
  2. Go to localhost:3000/admin
  3. Make it a tablet size
  4. Scroll

Expected behavior
The left nav should not scroll with the page

Screenshots

Screenshot 2024-03-24 at 10 40 38 AM

Update Create Athlete Form

Currently the create athlete form only includes the following:

  • First Name
  • Middle Name
  • Last Name
  • Preferred Name
  • Date of Birth
  • Age (this is currently auto-calculated)

The following items need to be added to it:

  • A user uploaded photo of the athlete
  • Primary Contact Info
    • Father's Info
      • First Name
      • Last Name
      • Email
      • Phone Number
    • Mother's Info
      • First Name
      • Last Name
      • Email
      • Phone
    • Mailing Address
      • Street
      • City
      • State
      • Zip
      • Country

A "Member of" section which is used to denote that this swimmer is a member of a team. The Team selection would be based on whatever teams the logged in person is associated to.

  • Team 1 (dropdown)
  • Team 2 (dropdown)
  • Team 3 (dropdown)
  • Subgroup (dropdown)
    • AG - Age Group
    • S - Senior
  • WM Group (dropdown)
    • Generic
    • ADV - Advanced
    • AGE - Age Group
    • BEG - Beginner
    • INT - Intermediate
    • JR - Junior
    • SR - Senior
  • WM Subgroup (dropdown)
    • Undefined
    • BK - Backstroke
    • BR - Breaststroke
    • FLY - Butterfly
    • DIS - Distance
    • IM - IM'ers
    • MID - Mid-distance
    • SPR - Sprint
    • STK - Stroke
  • School Year (dropdown)
    • FR - Freshman
    • SO - Sophomore
    • JR - Junior
    • SR - Senior

Update Roster Page

Right now the Roster page uses a normal table and has a blank empty space if the user didn't select "Quick View" on an athlete.
Screenshot 2024-03-30 at 5 40 55 PM

We should switch the table to a Data Table and when the user clicks "Quick View", it should open a Sheet component. We should then make sure the entire roster page fills up the entire screen and is of course fully responsive.

I have already started the creation of the Data Table

zod schema for Meet Setup Form

Current the form lives here. When the form is complete it should have the following items:

  • Meet Name (required)
  • Facility Name (required)
  • Address 1
  • Address 2
  • City (required)
  • State (required)
  • Zip Code (required)
  • Country (required)
  • Sanction #
  • Event Date (required)
    • This should be a date range picker
  • Entry Open Date (required)
  • Entry Deadline (required)
  • Meet Type (required)
    • This should be a radio group with the following options:
      • Standard
      • By Event
      • By Team
      • By Entry
      • Flighted
      • Time Standards
  • Meet Style (required)
    • This should be a radio group with the following options:
      • Standard
      • 2 Team Dual
      • 3+ Team Double Dual
  • Course (required)
    • This should be a radio group with the following options:
      • Long Course Meters
      • Short Course Meters
      • Yards
  • ID Format (required)
    • Radio Group with the following options:
      • USAS - USA Swimming
      • USMS - US Masters
      • Other
  • Class (required)
    • Radio Group with the following options:
      • Age Group
      • Senior / Open
      • High School
      • College
      • YMCA
      • Masters
      • Disabled

Create Workout Page

A key feature for the app will be the ability to add, edit, and track swim workouts. I started the setup here creating the following pages:

  • /admin/workouts - lists out all the workouts
  • /admin/workouts/[id] - view individual workout details (i.e. sets and what not)
  • /admin/workouts/[id]/edit - edit the individual workout
  • /admin/workouts/create - create a new workout

The CreateWorkout form needs to be updated to accommodate the creation of a swim workout. The form should include:

  • Title
  • Description
    Use platejs to have a text field that the user can free form input their sets. Similar to

65b952bce94e19094f5c5690_Frame 35

After submission of creating the workout, the text input should be transformed into some sort of JSON data that can be stored alongside the written text so that it can be easily displayed on the /admin/workouts page.

Intercept Modal Route for Creating Event

When a user is on /admin/events and clicks "Create Event" it should intercept the route of /admin/events/create and show a modal that they can fill out to create an event.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.