Skip to content

ypatodkar/good-karma

Repository files navigation

Good Points

A gamified daily kindness challenge platform. Get one act of kindness per day, complete it, earn points, build streaks, and optionally share on the community wall.

Runs with no external database: uses a local SQLite file and built-in email/password auth. No Supabase or other backend required.

Tech stack

  • Next.js 14 (App Router)
  • TypeScript
  • Tailwind CSS
  • SQLite (local file in data/goodpoints.sqlite)
  • OpenAI API (optional, for AI-generated tasks)

Setup

1. Install and run

cd good-points
npm install
npm run dev

Open http://localhost:3000.

On first run, the app creates a data/ folder and data/goodpoints.sqlite with tables and seed data (badges + 50 kindness tasks). No database server or cloud sign-up needed.

2. Environment variables (optional)

cp .env.example .env.local
  • SESSION_SECRET – Optional. Used to sign session cookies. Set to a long random string in production; defaults to a dev value.
  • OPENAI_API_KEY – Optional. Required only for “Generate personalized task” on the dashboard.

Features

  • Login required – Sign up or sign in to use the app; no anonymous mode.
  • Daily tasks – Each day you get 30 tasks: 10 Easy (10 pts), 10 Moderate (20 pts), 10 Hard (30 pts). Complete as many as you like.
  • Points & streaks – Earn points per task; streak counts consecutive days with at least one completion.
  • Points & streaks – Easy (10), Medium (20), Hard (50) points; streaks for consecutive days.
  • Badges – 3-day streak, 7-day streak, 500 points (auto-awarded).
  • Community wall – Share after completing; like others’ posts (logged-in only).
  • Impact dashboard – Global stats: users, tasks completed, points earned.
  • AI task – Logged-in users can generate a personalized task (OpenAI).
  • Leaderboard – Top users by points.
  • Feed – See your and your friends’ completed tasks; like and comment.
  • Friends – Send and accept friend requests; find people to add.
  • 50 seed users – Log in as [email protected][email protected] with password password123. Display names are real names (Alex, Jordan, Sam, etc.). Find friends by search (name or email) or use Suggested for you (random each time).

Project structure

src/
  app/              # Routes and API
  components/       # Reusable UI
  lib/              # DB (SQLite), auth (session cookie)
  services/         # Data layer, OpenAI
  types/            # DB types
data/               # Created at runtime
  goodpoints.sqlite # SQLite database

Scripts

  • npm run dev – Development server
  • npm run build – Production build
  • npm run start – Run production build
  • npm run lint – ESLint

Hackathon notes

  • No Supabase or external DB: everything runs locally with SQLite.
  • Sign up any email/password on the login page to create a user.
  • AI task generation requires OPENAI_API_KEY in .env.local; otherwise the button will fail gracefully.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors