Skip to content

Kerry-Mannette/Mini-Task-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini-Task-Tracker

Minimal Next.js app showcasing a tasks list with a serverless API (CRUD) for practicing serverless functions and simple state management.

What’s included

  • pages/tasks.js — UI for listing, creating, toggling, and deleting tasks
  • pages/api/tasks.js — API route supporting GET/POST/PUT/DELETE
  • data/tasks.json — demo file-backed store (ephemeral on serverless platforms)
  • pages/index.js, pages/_app.js, styles/global.css — entry and global styles

Run locally

npm install
npm run dev

# then open the URL shown in the terminal (e.g. http://localhost:3000/)

Deploying to Vercel

  • This repository is ready for Vercel. Use the web UI to import the repo or the CLI:
npm install -g vercel
vercel login
vercel

Important: data persistence

  • The current API writes to data/tasks.json on disk. Vercel serverless functions run in ephemeral environments — disk writes are not persistent across invocations or deployments. For a production-ready app, switch to a persistent data store (recommended options below).

Persistent storage options

  • Vercel KV — fast, simple key/value store (recommended for small demo apps)
  • Vercel Postgres — relational database on Vercel
  • Supabase / Firebase — hosted DB + realtime and auth

Quick notes to switch to Vercel KV

  1. Provision Vercel KV in your Vercel dashboard.
  2. Add the KV connection string as an environment variable (e.g. VERCEL_KV_URL) in your Vercel project settings.
  3. Update pages/api/tasks.js to use @vercel/kv (or direct fetch) instead of the file-based store.

Branches

  • main — default
  • staging — created for deployment/testing
  • feature — current feature branch (Clear completed)

Git / PRs

  • Push branches and create PRs from GitHub (example):
git push -u origin staging
git push -u origin feature
# then open the PR URLs suggested by `git push` or visit your repo on GitHub

If you want, I can update the API to use Vercel KV or Supabase and add environment variable instructions and sample code.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors