Skip to content

will-loves-coding82/habit-app

Repository files navigation

dashboard preview dashboard preview

Features

  • User Auth with Supabase
  • Create, Edit, and Delete habits with Supabase PostgreSQL
  • Daily cron jobs that duplicate your habits each day and track your streaks
  • Essential statistics in a personal dashboard to track your progress
  • Chat GPT LLM Assistant via Edge Functions
    • Built with 4.0 mini and AI Tooling to fetch user's data based on NLP queries
  • Profile page with avatar photo customization

Project Structure

  • /app: Entrypoint to the home page
  • /hooks: Reusable logic to manage complex state operations
  • /context: Centralizes and manages state for downstream client components
  • /dashboard:
    • /profile: User profile management
    • /actions: Server actions for creating new habits
  • /auth: Routes for user authentication
  • /lib
    • /supabase: Contains supabase client initializers and middleware
    • /functions: Helper methods to use across the app
  • /components: Custom UI components

Tools

Demo

You can view a fully working demo at stacked-habits.vercel.app.

Clone and run locally

  1. You'll first need a Supabase project which can be made via the Supabase dashboard

  2. Create a Next.js app using the Supabase Starter template npx command

    npx create-next-app --example with-supabase with-supabase-app
    yarn create next-app --example with-supabase with-supabase-app
    pnpm create next-app --example with-supabase with-supabase-app
  3. Use cd to change into the app's directory

    cd with-supabase-app
  4. Rename .env.example to .env.local and update the following:

    NEXT_PUBLIC_SUPABASE_URL=[INSERT SUPABASE PROJECT URL]
    NEXT_PUBLIC_SUPABASE_ANON_KEY=[INSERT SUPABASE PROJECT API ANON KEY]
    

    Both NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY can be found in your Supabase project's API settings

  5. You can now run the Next.js local development server:

    npm run dev

    The starter kit should now be running on localhost:3000.

  6. This template comes with the default shadcn/ui style initialized. If you instead want other ui.shadcn styles, delete components.json and re-install shadcn/ui

Check out the docs for Local Development to also run Supabase locally.

About

A simple Next.js web application that integrates a ChatGPT LLM for habit management and tracking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published