A modern, type-safe contact management application built with TanStack Start, React 19, and Drizzle ORM. Organize all your personal and professional contacts in one secure place with a beautiful, responsive interface.
π Live Demo
| Feature | Status | Description |
|---|---|---|
| Authentication | β Implemented | Secure signup, signin, password reset with better-auth |
| Theme Support | β Implemented | Dark/light mode with system preference detection |
| Organize Contacts | π§ In Progress | CRUD operations for contacts (basic structure in place) |
| Favorites | π§ In Progress | Mark and manage favorite contacts |
| Search & Filter | π Coming Soon | Real-time search with advanced filtering |
| Sync | π Coming Soon | Cross-device synchronization |
| Share | π Coming Soon | Share contacts via link, email or messaging |
| Import/Export | π Coming Soon | CSV, vCard and JSON support |
| Groups/Labels | π Coming Soon | Custom groups with color coding |
| Duplicate Detection | π Coming Soon | Find and merge duplicate contacts |
| QR Code Sharing | π Coming Soon | Share contact info via scannable QR code |
| Internationalization | π Coming Soon | Bilingual support with RTL/LTR layout |
| Technology | Purpose |
|---|---|
| TypeScript 5.9.3 | Type-safe JavaScript |
| Vite 7.3.0 | Build tool & dev server |
| TanStack Start | Full-stack React framework |
| React 19.2.3 | UI library |
| Technology | Purpose |
|---|---|
| TanStack Router | Type-safe routing |
| TanStack Query | Data fetching & caching |
| TanStack Store | State management & theme |
| TanStack Form | Form handling |
| Drizzle ORM | Database ORM (PostgreSQL) |
| Zod | Schema validation |
| Technology | Purpose |
|---|---|
| Tailwind CSS 4 | Utility-first styling |
| shadcn/ui | Component library |
| Radix UI | Accessible primitives |
| Lucide React | Icons |
| class-variance-authority | Component variants |
| tailwind-merge | Merge Tailwind classes |
| Technology | Purpose |
|---|---|
| better-auth | Authentication & session management |
| @t3-oss/env-core | Environment validation |
| Technology | Purpose |
|---|---|
| Cloudflare Workers | Edge deployment |
| Wrangler | Cloudflare CLI tool |
| Technology | Purpose |
|---|---|
| Vitest | Unit testing framework |
| Testing Library | Component testing |
| ESLint | Code linting |
| Prettier | Code formatting |
| Drizzle Kit | Database migrations |
| React Email | Email templates |
| Resend | Email delivery service |
| Motion | Animation library |
contactory/
βββ .github/ # GitHub configuration
β βββ workflows/
β β βββ ci.yml # CI/CD pipeline configuration
βββ docs/ # Documentation
β βββ ADR-001-tech-stack.md # Architecture decision record
β βββ ADR-002-file-structure.md # Project structure decisions
β βββ ADR-003-internationalization.md # i18n architecture (proposed)
β βββ PRD.md # Product requirements document
β βββ SECURITY-AUDIT.md # Security audit findings
βββ public/ # Static assets
β βββ favicon.svg
β βββ robots.txt
βββ src/
β βββ features/ # Feature modules
β β βββ auth/ # Authentication feature
β β β βββ components/ # Auth UI components
β β β βββ hooks/ # Auth hooks
β β β βββ lib/ # Auth utilities
β β βββ landing/ # Landing page feature
β β β βββ components/ # Landing page components
β β βββ users/ # User management feature
β β βββ components/ # User UI components
β β βββ hooks/ # User hooks
β β βββ lib/ # User utilities
β β βββ utils/ # User helper functions
β βββ integrations/ # Third-party integrations
β β βββ better-auth/ # Auth configuration
β β βββ shadcn/ # UI components
β β βββ tanstack-form/ # Form handling
β β βββ tanstack-query/ # Data fetching
β βββ routes/ # Application routes
β β βββ __root.tsx # Root layout
β β βββ _auth/ # Auth routes (sign-in, sign-up, etc.)
β β β βββ sign-in.tsx # Sign in page
β β β βββ sign-up.tsx # Sign up page
β β β βββ forgot-password.tsx # Password reset request
β β β βββ reset-password.tsx # Password reset form
β β βββ _public/ # Public routes (landing page)
β β βββ _user/ # Protected routes (authenticated users)
β β β βββ route.tsx # User layout + auth guard
β β β βββ dashboard.tsx # Main dashboard view
β β β βββ contacts.tsx # Contacts management
β β β βββ profile.tsx # User profile page
β β βββ _admin/ # Admin routes (admin users only)
β β βββ api/ # API endpoints
β βββ server/ # Server-side code
β β βββ db/ # Database configuration
β β β βββ client.ts # Drizzle DB client
β β β βββ migrations/ # Database migrations
β β β βββ seeds.ts # Seed data for development
β β βββ emails/ # Email templates
β β βββ middlewares/ # Server middlewares
β β βββ modules/ # Business logic modules
β β β βββ auth.ts # Auth business logic
β β β βββ guards.ts # Route guards
β β β βββ r2.ts # Cloudflare R2 storage
β β β βββ theme.ts # Theme management
β β β βββ users.ts # User business logic
β β βββ mutations/ # Server mutation functions
β β βββ queries/ # Server query functions
β β βββ schemas/ # Validation schemas
β βββ shared/ # Shared utilities and components
β βββ components/ # Reusable components
β βββ theme/ # Theme configuration
β βββ utils/ # Utility functions
βββ .env.example # Example environment variables
βββ components.json # shadcn/ui config
βββ drizzle.config.ts # Drizzle ORM config
βββ eslint.config.js # ESLint config
βββ package.json # Dependencies & scripts
βββ prettier.config.js # Prettier config
βββ tsconfig.json # TypeScript config
βββ vite.config.ts # Vite config
- Node.js 20+
- pnpm 9+
- PostgreSQL +14
-
Clone the repository:
git clone https://github.com/your-username/contactory.git cd contactory -
Install dependencies:
pnpm install
-
Set up environment variables:
cp .env.example .env.local
Update the
.env.localfile with your configuration. -
Run database migrations:
pnpm db:migrate
-
Start the development server:
pnpm dev
The application will be available at
http://localhost:3000
| Variable | Description | Required | Default |
|---|---|---|---|
DATABASE_URL |
PostgreSQL connection string | β | - |
BETTER_AUTH_SECRET |
Secret key for authentication | β | - |
BETTER_AUTH_URL |
Base URL of your app | β | http://localhost:3000 |
BETTER_AUTH_GOOGLE_CLIENT_ID |
Google OAuth client ID | β | - |
BETTER_AUTH_GOOGLE_CLIENT_SECRET |
Google OAuth client secret | β | - |
RESEND_API_KEY |
API key for Resend email service | β | - |
VITE_BETTER_AUTH_BASE_URL |
Client-side base URL of your app | β |
| Script | Description |
|---|---|
pnpm dev |
Start development server (port 3000) |
pnpm build |
Build for production |
pnpm serve |
Preview production build |
pnpm test |
Run unit tests |
pnpm test:workers |
Run Cloudflare Workers tests |
pnpm lint |
Lint codebase |
pnpm format |
Format code with Prettier |
pnpm check |
Format and lint with auto-fix |
pnpm typecheck |
Run TypeScript type checking |
pnpm db:generate |
Generate database migrations |
pnpm db:migrate |
Run database migrations |
pnpm db:push |
Push schema changes to database |
pnpm db:pull |
Pull schema from database |
pnpm db:studio |
Open Drizzle Studio |
pnpm db:seeds |
Run database seed script |
pnpm deploy |
Build and deploy to Cloudflare Workers |
pnpm cf-typegen |
Generate Cloudflare Workers types |
- Product Requirements (PRD) - Feature specifications and user stories
- Tech Stack ADR - Technology decisions and rationale
- File Structure ADR - Project organization and architecture
- Internationalization ADR - i18n architecture (proposed)
- Security Audit - Security audit findings and recommendations
| File | Description |
|---|---|
| Copilot Instructions | Code generation guidelines and project conventions for GitHub Copilot |
| Git Commit Instructions | Conventional commit message format and guidelines |
| CI Workflow | GitHub Actions workflow for linting, testing and building |
The project uses GitHub Actions for continuous integration. The pipeline runs on every push and pull request to main:
- Linting β ESLint code quality checks
- Formatting β Prettier format verification
- Type Check β TypeScript type validation
- Tests β Vitest unit test execution
- Build β Production build verification
| Package | Version | Description |
|---|---|---|
react |
^19.2.3 | UI library |
react-dom |
^19.2.3 | React DOM renderer |
@tanstack/react-start |
^1.145.7 | Full-stack React framework |
@tanstack/react-router |
^1.145.7 | Type-safe routing |
@tanstack/react-query |
^5.90.16 | Data fetching & caching |
@tanstack/react-form |
^1.27.7 | Form handling |
@tanstack/react-store |
^0.7.7 | State management & theme |
drizzle-orm |
^0.45.1 | Database ORM |
postgres |
^3.4.7 | PostgreSQL client |
better-auth |
^1.4.10 | Authentication library |
zod |
^4.3.5 | Schema validation |
tailwindcss |
^4.1.18 | CSS framework |
class-variance-authority |
^0.7.1 | Component variants |
clsx |
^2.1.1 | Class name utility |
tailwind-merge |
^3.4.0 | Tailwind class merging |
radix-ui |
^1.4.3 | Accessible UI primitives |
lucide-react |
^0.544.0 | Icon library |
motion |
^12.24.0 | Animation library |
@t3-oss/env-core |
^0.13.10 | Type-safe env variables |
uuid |
^13.0.0 | UUID generation |
| Package | Version | Description |
|---|---|---|
typescript |
^5.9.3 | TypeScript compiler |
vite |
^7.3.0 | Build tool |
vitest |
^3.2.4 | Test runner |
@testing-library/react |
^16.3.1 | Component testing |
eslint |
^9.39.2 | Linting |
prettier |
^3.7.4 | Code formatting |
drizzle-kit |
^0.31.8 | Drizzle CLI tools |
@cloudflare/vite-plugin |
^1.17.1 | Cloudflare Workers plugin |
wrangler |
^4.54.0 | Cloudflare CLI |
This project is private.