Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Aking16/timify/llms.txt

Use this file to discover all available pages before exploring further.

Timify is a standard Next.js application with a local SQLite database — no Docker, no external services, and no cloud accounts required. Follow the steps below to go from zero to a running timer in under five minutes.

Prerequisites

Before you begin, make sure the following tools are available on your machine:
  • Node.js 18 or later (20 LTS recommended)
  • Git
  • A package manager: npm (bundled with Node.js), pnpm, or yarn
You can verify your Node.js version with:
node --version

Setup Steps

1
Clone the repository
2
git clone https://github.com/Aking16/timify.git && cd timify
3
Install dependencies
4
npm
npm install
pnpm
pnpm install
yarn
yarn install
5
Create the environment file
6
Create a .env file in the project root with the following variables:
7
DB_FILE_NAME=file:./src/db/local.db
BETTER_AUTH_SECRET=your-secret-here
BETTER_AUTH_URL=http://localhost:3000
8
The DB_FILE_NAME path is relative to the project root and tells both Drizzle and the libsql client where to create the SQLite database file. The file is created automatically when you push the schema in the next step — no manual setup required.BETTER_AUTH_SECRET must be a long, randomly generated string. You can generate one with:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
9
Push the database schema
10
Drizzle’s push command introspects src/db/schema.ts and applies all table definitions directly to the SQLite file — no migration files are written during local development with this command.
11
npx drizzle-kit push
12
You should see output confirming that each table (user, session, account, verification, projects, time_entries, tags, time_entry_tags) was created successfully.
13
To visually inspect your database at any time, run npx drizzle-kit studio and open the URL it prints. This launches the Drizzle Studio UI in your browser.
14
Start the development server
15
npm run dev
16
Next.js will start on http://localhost:3000 by default.
17
Open the app and start tracking
18
Navigate to http://localhost:3000 in your browser. You will be redirected to /auth to register a new account. Once signed in:
19
  • Create a project — give it a name, pick a colour, and optionally set an hourly rate.
  • Add a time entry — select your project and hit the start button to begin a live timer.
  • Attach tags — create colour-coded tags and apply them to entries for cross-project categorisation.
  • Available Commands

    CommandDescription
    npm run devStart the Next.js development server with hot reload
    npm run buildCreate an optimised production build
    npm run startRun the production build locally
    npm run lintRun ESLint (flat config via eslint.config.mjs)
    npx drizzle-kit pushPush schema changes to the SQLite database
    npx drizzle-kit studioOpen Drizzle Studio database viewer

    Troubleshooting

    Check that BETTER_AUTH_SECRET and BETTER_AUTH_URL are set in your .env file and that the URL exactly matches the origin your browser is using (e.g. http://localhost:3000). The trustedOrigins list in src/lib/auth.ts must include your origin.
    Ensure your .env file is in the project root (the same directory as package.json) and that the value uses the file: prefix, for example file:./src/db/local.db.
    Timify enables the React Compiler via reactCompiler: true in next.config.ts. Do not add manual useMemo or useCallback calls — the compiler handles memoisation automatically. Suppressing compiler warnings by disabling it is not recommended.

    Build docs developers (and LLMs) love