Arka Day Tracker
A small internal web app for tracking an operations-intern workday at Arka:
Allan's daily tasks, a supplier research log, and an end-of-day report that
builds itself from what you logged.
Built with Next.js (App Router) + Postgres + TypeScript so it runs the same
on Vercel (portfolio demo) and on a Mac Mini (private, real data).
Screens
| Screen | What it does |
|---|
| Today | Greeting, today's tasks from Allan (check them off), a one-line quick log, and a running activity feed. |
| Supplier research | Add suppliers with their sales contact, filter for missing info, and export the list as a CSV that opens in Excel or Google Sheets. |
| End-of-day report | Auto-built summary — tasks done, suppliers delivered, where the time went — plus a ready-to-send message to Allan. |
Run it locally (Mac Mini)
- Install Node 18+ and have a Postgres database handy.
The easiest free option that also works on Vercel is Neon
— create a database and copy its connection string.
- Copy the env file and fill it in:
cp .env.example .env
# then edit .env and set DATABASE_URL=...
- Install and start:
npm install
npm run dev
- Open http://localhost:3000. Tables are created automatically on first load.
Public demo vs. private real data
- Leave
APP_PASSWORD blank → the app is open and auto-fills today with
sample (fake) suppliers. Use this for the portfolio deployment.
- Set
APP_PASSWORD → the app is locked behind that password and starts
empty for your real Arka data. Set it in .env locally, or as an environment
variable on Vercel.
Deploy to Vercel
- Push this repo to GitHub.
- In Vercel, Add New → Project and import the repo.
- Open the project's Storage tab → create a Postgres store and connect
it. Vercel sets
POSTGRES_URL automatically.
- (Optional) In Settings → Environment Variables, add
APP_PASSWORD to
lock the deployment.
- Deploy. Visit the URL — the schema is created on first request.
Tech notes
- Data layer —
lib/db.ts owns the pool and creates the schema on first
query (CREATE TABLE IF NOT EXISTS). lib/queries.ts has every typed read
and write. No ORM, so it's easy to read.
- Timezone — the DB connection is set to
America/Chicago (override with
APP_TIMEZONE) so "today" rolls over at local midnight.
- Auth — a lightweight cookie gate in
middleware.ts; it's a convenience
lock for a single-user tool, not a secrets vault.
Google integration (Gmail · Sheets · Drive)
The deployed app signs in as itself with its own Google OAuth client, so you
need to create that client once. ~5 minutes.
- Go to the Google Cloud Console → create a
project (any name).
- APIs & Services → Enabled APIs → Enable APIs and enable: Gmail API,
Google Sheets API, Google Drive API.
- APIs & Services → OAuth consent screen → External → fill the basics. While
it's in "Testing", add your own Google address under Test users.
- APIs & Services → Credentials → Create credentials → OAuth client ID →
type Web application. Add Authorized redirect URIs:
https://YOUR-VERCEL-URL/api/google/callback
http://localhost:3000/api/google/callback (for local testing)
- Copy the Client ID and Client secret. On Vercel (Settings →
Environment Variables) add
GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET,
then redeploy.
- Open the app → Connections → Connect Google, and sign in.
Then:
- Today → Pull from Gmail turns one of Allan's emails into an assignment plus
checklist tasks (summarized by Claude if
ANTHROPIC_API_KEY is set, otherwise
by a built-in parser).
- Connections → Allan's supplier sheet links the Google Sheet he shared.
- Supplier research → Import from sheet pulls its rows into your supplier log
as tracked work (re-imports skip rows already there).
Roadmap
- Slack — pull tasks Allan sends on Slack and post the EOD report back
(needs an app approved by Arka's workspace admin).
- Analytics page — suppliers per hour, contact-completion rate, time by
category; plus multi-day history.