This project was created with Better-T-Stack, a modern TypeScript stack that combines React, TanStack Router, Hono, and more.
Compiled Executables are released for macOS and Linux Operating Systems
- TypeScript - For type safety and improved developer experience
- TanStack Router - File-based routing with full type safety
- TailwindCSS - Utility-first CSS for rapid UI development
- shadcn/ui - Reusable UI components
- Hono - Lightweight, performant server framework
- Node.js - Runtime environment
- Drizzle - TypeScript-first ORM
- PostgreSQL - Database engine
- Authentication - Better-Auth
- Tauri - Build native desktop applications
- Turborepo - Optimized monorepo build system
First, install the dependencies:
pnpm installThis project uses PostgreSQL with Drizzle ORM.
-
Make sure you have a PostgreSQL database set up.
-
Update your
apps/server/.envfile with your PostgreSQL connection details. -
Apply the schema to your database:
pnpm run db:pushThis project uses S3-compatible storage (MinIO) for file storage with a dual-client architecture to properly handle presigned URLs in production.
The server uses two separate S3 clients:
-
s3Client- Uses internal Docker endpoint (http://minio:9000)- Used for server-side operations (delete, list, etc.)
- Communicates directly with MinIO container
-
s3Presigner- Uses public endpoint (https://s3.ayushk.me)- Used ONLY for generating presigned URLs
- Ensures cryptographic signatures match the public hostname
- Prevents "SignatureDoesNotMatch" errors
In your apps/server/.env file, configure:
# Internal S3 endpoint (used by server to communicate with MinIO)
AWS_S3_ENDPOINT=http://minio:9000 # For Docker, or http://localhost:9200 for local dev
# Public S3 endpoint (used in presigned URLs for client access)
PUBLIC_S3_ENDPOINT=https://s3.ayushk.me # Your public S3/MinIO URLImportant for Production:
AWS_S3_ENDPOINT: Internal Docker service name or internal network addressPUBLIC_S3_ENDPOINT: Must be the publicly accessible URL that browsers/clients can reach- The presigner client uses
PUBLIC_S3_ENDPOINTto generate cryptographically valid URLs
The MinIO service is configured with CORS to allow cross-origin requests:
MINIO_API_CORS_ALLOW_ORIGIN: "*"For production, replace "*" with your specific domains (e.g., "https://your-app.com,https://tauri.localhost").
Then, run the development server:
pnpm run devOpen http://localhost:3001 in your browser to see the web application. The API is running at http://localhost:3000.
krypt-vault/
├── apps/
│ ├── web/ # Frontend application (React + TanStack Router)
│ └── server/ # Backend API (Hono)
├── packages/
│ ├── api/ # API layer / business logic
│ ├── auth/ # Authentication configuration & logic
│ └── db/ # Database schema & queries
pnpm run dev: Start all applications in development modepnpm run build: Build all applicationspnpm run dev:web: Start only the web applicationpnpm run dev:server: Start only the serverpnpm run check-types: Check TypeScript types across all appspnpm run db:push: Push schema changes to databasepnpm run db:studio: Open database studio UIcd apps/web && pnpm run desktop:dev: Start Tauri desktop app in developmentcd apps/web && pnpm run desktop:build: Build Tauri desktop app