Skip to content

Repository files navigation

Lunatrak

A sleep tracker app created with Next.js and Supabase.


Features

  • Login/logout-based user authorization and authentication + Google OAuth integration
    Users may register and log in accounts created from the app or with an existing Google account.

  • Sleep record management
    Users can add and delete sleep records that include durations with corresponding qualities (Excellent, Good, Average, Poor, and Terrible).

  • User dashboard
    The app provides a dashboard that provides users information about their sleeping activity, such as average and best sleep times, sleep history, total sleep records, as well as trends based on their sleep duration hours.

  • 'Sleep Duration Trends' section
    Sleep duration trends are sorted through the following categories: Optimal (7+ hours), Moderate (3-7 hours), and Low (<3 hours).

  • Responsive UI
    Seamless experience in navigating throughout the app via desktop, tablet, and mobile layouts.

Tech Stack

Name Details
Supabase
(@supabase/supabase-js 2.89.0)
BaaS
PostgreSQL Database
Google Auth Platform Google account integration via OAuth
Next.js 16.1.1
TypeScript 5.9.3
Front-end
React 19.2.3
Tailwind CSS 4.1.18
react-chartjs-2 5.3.1
UI

Setup

Prerequisites

  • You must have an account for the following services:
Service Reasons why it's needed
Supabase
  • Gives you access in managing the app's database and user accounts.
  • You need to obtain the project URL and API key of the app's project API for the app to connect to its database.
  • You need to obtain the project's callback URL for Supabase to be authorized by the app's OAuth client from Google Auth Platform.
Google
  • Allows the app to integrate OAuth for users to register and log in with an existing Google account.
  • You need to obtain the client ID and client secret for the OAuth client created for the app for Supabase to recognize Google as an auth provider in account registration and authentication.
Vercel
  • Allows the app to be deployed and accessed on the web.

Getting Started

  • Running the project locally
# Clone this repository
git clone https://github.com/andreiagbisit/lunatrak.git
  
# Navigate into the project root directory
cd lunatrak
  
# Install dependencies
npm install
  
# Start the app
npm run dev
  • .env
NEXT_PUBLIC_SUPABASE_URL=[Supabase project URL]
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY=[Supabase project API key]

Releases

Packages

Contributors

Languages