@odvi/create-dtt-framework 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +16 -13
- package/dist/commands/create.js.map +1 -1
- package/package.json +3 -2
- package/template/.env.example +103 -0
- package/template/components.json +22 -0
- package/template/docs/framework/01-overview.md +289 -0
- package/template/docs/framework/02-techstack.md +503 -0
- package/template/docs/framework/api-layer.md +681 -0
- package/template/docs/framework/clerk-authentication.md +649 -0
- package/template/docs/framework/cli-installation.md +564 -0
- package/template/docs/framework/deployment/ci-cd.md +907 -0
- package/template/docs/framework/deployment/digitalocean.md +991 -0
- package/template/docs/framework/deployment/domain-setup.md +972 -0
- package/template/docs/framework/deployment/environment-variables.md +863 -0
- package/template/docs/framework/deployment/monitoring.md +927 -0
- package/template/docs/framework/deployment/production-checklist.md +649 -0
- package/template/docs/framework/deployment/vercel.md +791 -0
- package/template/docs/framework/environment-variables.md +658 -0
- package/template/docs/framework/health-check-system.md +582 -0
- package/template/docs/framework/implementation.md +559 -0
- package/template/docs/framework/snowflake-integration.md +591 -0
- package/template/docs/framework/state-management.md +615 -0
- package/template/docs/framework/supabase-integration.md +581 -0
- package/template/docs/framework/testing-guide.md +544 -0
- package/template/docs/framework/what-did-i-miss.md +526 -0
- package/template/drizzle.config.ts +12 -0
- package/template/next.config.js +21 -0
- package/template/postcss.config.js +5 -0
- package/template/prettier.config.js +4 -0
- package/template/public/favicon.ico +0 -0
- package/template/src/app/(auth)/layout.tsx +4 -0
- package/template/src/app/(auth)/sign-in/[[...sign-in]]/page.tsx +10 -0
- package/template/src/app/(auth)/sign-up/[[...sign-up]]/page.tsx +10 -0
- package/template/src/app/(dashboard)/dashboard/page.tsx +8 -0
- package/template/src/app/(dashboard)/health/page.tsx +16 -0
- package/template/src/app/(dashboard)/layout.tsx +17 -0
- package/template/src/app/api/[[...route]]/route.ts +11 -0
- package/template/src/app/api/debug-files/route.ts +33 -0
- package/template/src/app/api/webhooks/clerk/route.ts +112 -0
- package/template/src/app/layout.tsx +28 -0
- package/template/src/app/page.tsx +12 -0
- package/template/src/app/providers.tsx +20 -0
- package/template/src/components/layouts/navbar.tsx +14 -0
- package/template/src/components/shared/loading-spinner.tsx +6 -0
- package/template/src/components/ui/badge.tsx +46 -0
- package/template/src/components/ui/button.tsx +62 -0
- package/template/src/components/ui/card.tsx +92 -0
- package/template/src/components/ui/collapsible.tsx +33 -0
- package/template/src/components/ui/scroll-area.tsx +58 -0
- package/template/src/components/ui/sheet.tsx +139 -0
- package/template/src/config/__tests__/env.test.ts +166 -0
- package/template/src/config/__tests__/site.test.ts +46 -0
- package/template/src/config/env.ts +36 -0
- package/template/src/config/site.ts +10 -0
- package/template/src/env.js +44 -0
- package/template/src/features/__tests__/health-check-config.test.ts +142 -0
- package/template/src/features/__tests__/health-check-types.test.ts +201 -0
- package/template/src/features/documentation/components/doc-sidebar.tsx +109 -0
- package/template/src/features/documentation/components/doc-viewer.tsx +70 -0
- package/template/src/features/documentation/index.tsx +92 -0
- package/template/src/features/documentation/utils/doc-loader.ts +177 -0
- package/template/src/features/health-check/components/health-dashboard.tsx +363 -0
- package/template/src/features/health-check/config.ts +72 -0
- package/template/src/features/health-check/index.ts +4 -0
- package/template/src/features/health-check/stores/health-store.ts +14 -0
- package/template/src/features/health-check/types.ts +18 -0
- package/template/src/hooks/__tests__/use-debounce.test.tsx +28 -0
- package/template/src/hooks/queries/use-health-checks.ts +16 -0
- package/template/src/hooks/utils/use-debounce.ts +20 -0
- package/template/src/lib/__tests__/utils.test.ts +52 -0
- package/template/src/lib/__tests__/validators.test.ts +114 -0
- package/template/src/lib/nextbank/client.ts +37 -0
- package/template/src/lib/snowflake/client.ts +53 -0
- package/template/src/lib/supabase/admin.ts +7 -0
- package/template/src/lib/supabase/client.ts +7 -0
- package/template/src/lib/supabase/server.ts +23 -0
- package/template/src/lib/utils.ts +6 -0
- package/template/src/lib/validators.ts +9 -0
- package/template/src/middleware.ts +22 -0
- package/template/src/server/api/index.ts +22 -0
- package/template/src/server/api/middleware/auth.ts +19 -0
- package/template/src/server/api/middleware/logger.ts +4 -0
- package/template/src/server/api/routes/health/clerk.ts +214 -0
- package/template/src/server/api/routes/health/database.ts +117 -0
- package/template/src/server/api/routes/health/edge-functions.ts +75 -0
- package/template/src/server/api/routes/health/framework.ts +45 -0
- package/template/src/server/api/routes/health/index.ts +102 -0
- package/template/src/server/api/routes/health/nextbank.ts +67 -0
- package/template/src/server/api/routes/health/snowflake.ts +83 -0
- package/template/src/server/api/routes/health/storage.ts +163 -0
- package/template/src/server/api/routes/users.ts +95 -0
- package/template/src/server/db/index.ts +17 -0
- package/template/src/server/db/queries/users.ts +8 -0
- package/template/src/server/db/schema/__tests__/health-checks.test.ts +31 -0
- package/template/src/server/db/schema/__tests__/users.test.ts +46 -0
- package/template/src/server/db/schema/health-checks.ts +11 -0
- package/template/src/server/db/schema/index.ts +2 -0
- package/template/src/server/db/schema/users.ts +16 -0
- package/template/src/server/db/schema.ts +26 -0
- package/template/src/stores/__tests__/ui-store.test.ts +87 -0
- package/template/src/stores/ui-store.ts +14 -0
- package/template/src/styles/globals.css +129 -0
- package/template/src/test/mocks/clerk.ts +35 -0
- package/template/src/test/mocks/snowflake.ts +28 -0
- package/template/src/test/mocks/supabase.ts +37 -0
- package/template/src/test/setup.ts +69 -0
- package/template/src/test/utils/test-helpers.ts +158 -0
- package/template/src/types/index.ts +14 -0
- package/template/tsconfig.json +43 -0
- package/template/vitest.config.ts +44 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,eAAO,MAAM,aAAa,SA6JtB,CAAC"}
|
package/dist/commands/create.js
CHANGED
|
@@ -122,26 +122,29 @@ export const createCommand = new Command('create')
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
// Install dependencies if not disabled
|
|
125
|
+
// Skip automatic installation as requested
|
|
126
|
+
/*
|
|
125
127
|
if (options?.install !== false) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
128
|
+
spinner.text = `Installing dependencies with ${packageManager}...`;
|
|
129
|
+
spinner.start();
|
|
130
|
+
const { execSync } = await import('child_process');
|
|
131
|
+
try {
|
|
132
|
+
execSync(`${packageManager} install`, { cwd: targetDir, stdio: 'inherit' });
|
|
133
|
+
spinner.succeed('Dependencies installed');
|
|
134
|
+
} catch (error) {
|
|
135
|
+
spinner.fail('Dependency installation failed');
|
|
136
|
+
console.log(chalk.yellow('You can install dependencies manually by running:'));
|
|
137
|
+
console.log(chalk.cyan(` cd ${projectName}`));
|
|
138
|
+
console.log(chalk.cyan(` ${packageManager} install`));
|
|
139
|
+
}
|
|
139
140
|
}
|
|
141
|
+
*/
|
|
140
142
|
console.log();
|
|
141
143
|
console.log(chalk.green.bold('✨ Project created successfully!'));
|
|
142
144
|
console.log();
|
|
143
145
|
console.log(chalk.cyan('Next steps:'));
|
|
144
146
|
console.log(chalk.white(` cd ${projectName}`));
|
|
147
|
+
console.log(chalk.white(` ${packageManager} install`));
|
|
145
148
|
console.log(chalk.white(` ${packageManager} dev`));
|
|
146
149
|
console.log();
|
|
147
150
|
console.log(chalk.gray('Happy coding! 🎉'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],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AC,KAAK,CAAC,KAAK,CAAC,KAAK,cAAc,UAAU,CAAC,CAAC,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,cAAc,MAAM,CAAC,CAAC,CAAC;QACpD,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,yBAAyB,CAAC,EAAE,KAAK,CAAC,CAAC;QAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odvi/create-dtt-framework",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "CLI tool to scaffold new projects with DTT Framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc",
|
|
15
15
|
"dev": "tsc --watch",
|
|
16
|
-
"
|
|
16
|
+
"sync-template": "node scripts/sync-template.js",
|
|
17
|
+
"prepublishOnly": "pnpm sync-template && pnpm build"
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
20
|
"chalk": "^5.3.0",
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Since the ".env" file is gitignored, you can use the ".env.example" file to
|
|
2
|
+
# build a new ".env" file when you clone the repo. Keep this file up-to-date
|
|
3
|
+
# when you add new variables to `.env`.
|
|
4
|
+
|
|
5
|
+
# This file will be committed to version control, so make sure not to have any
|
|
6
|
+
# secrets in it. If you are cloning this repo, create a copy of this file named
|
|
7
|
+
# ".env" and populate it with your secrets.
|
|
8
|
+
|
|
9
|
+
# When adding additional environment variables, the schema in "/src/env.js"
|
|
10
|
+
# should be updated accordingly.
|
|
11
|
+
|
|
12
|
+
# ========================================
|
|
13
|
+
# App Configuration
|
|
14
|
+
# ========================================
|
|
15
|
+
# The base URL of your application. Used for redirects, webhooks, and callbacks.
|
|
16
|
+
# In development: http://localhost:3000
|
|
17
|
+
# In production: https://your-domain.com
|
|
18
|
+
NEXT_PUBLIC_APP_URL=http://localhost:3000
|
|
19
|
+
|
|
20
|
+
# ========================================
|
|
21
|
+
# Clerk Authentication
|
|
22
|
+
# ========================================
|
|
23
|
+
# Clerk publishable key - used on the client side for authentication
|
|
24
|
+
# Get this from your Clerk Dashboard > API Keys > Publishable Key
|
|
25
|
+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxx
|
|
26
|
+
|
|
27
|
+
# Clerk secret key - used on the server side for authentication
|
|
28
|
+
# Get this from your Clerk Dashboard > API Keys > Secret Key
|
|
29
|
+
CLERK_SECRET_KEY=sk_test_xxx
|
|
30
|
+
|
|
31
|
+
# Clerk webhook secret - used to verify webhook events from Clerk
|
|
32
|
+
# Get this from your Clerk Dashboard > Webhooks > Add Endpoint > Signing Secret
|
|
33
|
+
CLERK_WEBHOOK_SECRET=whsec_xxx
|
|
34
|
+
|
|
35
|
+
# URL path for the sign-in page
|
|
36
|
+
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
|
|
37
|
+
|
|
38
|
+
# URL path for the sign-up page
|
|
39
|
+
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
|
|
40
|
+
|
|
41
|
+
# Where to redirect users after successful sign-in
|
|
42
|
+
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/health
|
|
43
|
+
|
|
44
|
+
# Where to redirect users after successful sign-up
|
|
45
|
+
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/health
|
|
46
|
+
|
|
47
|
+
# ========================================
|
|
48
|
+
# Supabase
|
|
49
|
+
# ========================================
|
|
50
|
+
# Supabase project URL - found in your Supabase project settings
|
|
51
|
+
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
|
|
52
|
+
|
|
53
|
+
# Supabase anonymous/public key - safe to expose on client side
|
|
54
|
+
# Found in your Supabase project settings under API keys
|
|
55
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJxxx
|
|
56
|
+
|
|
57
|
+
# Supabase service role key - full admin access, keep secret!
|
|
58
|
+
# Found in your Supabase project settings under API keys
|
|
59
|
+
SUPABASE_SERVICE_ROLE_KEY=eyJxxx
|
|
60
|
+
|
|
61
|
+
# PostgreSQL connection string for Drizzle ORM
|
|
62
|
+
# Use Supabase's Transaction mode pooler for better performance
|
|
63
|
+
# Format: postgresql://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:6543/postgres
|
|
64
|
+
DATABASE_URL=postgresql://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:6543/postgres
|
|
65
|
+
|
|
66
|
+
# ========================================
|
|
67
|
+
# Snowflake Data Warehouse
|
|
68
|
+
# ========================================
|
|
69
|
+
# Snowflake account identifier (e.g., xxx.us-east-1)
|
|
70
|
+
SNOWFLAKE_ACCOUNT=xxx.us-east-1
|
|
71
|
+
|
|
72
|
+
# Snowflake username for authentication
|
|
73
|
+
SNOWFLAKE_USERNAME=xxx
|
|
74
|
+
|
|
75
|
+
# Snowflake password for authentication
|
|
76
|
+
SNOWFLAKE_PASSWORD=xxx
|
|
77
|
+
|
|
78
|
+
# Snowflake virtual warehouse to use for queries
|
|
79
|
+
SNOWFLAKE_WAREHOUSE=COMPUTE_WH
|
|
80
|
+
|
|
81
|
+
# Snowflake database name
|
|
82
|
+
SNOWFLAKE_DATABASE=ANALYTICS
|
|
83
|
+
|
|
84
|
+
# Snowflake schema name within the database
|
|
85
|
+
SNOWFLAKE_SCHEMA=PUBLIC
|
|
86
|
+
|
|
87
|
+
# Snowflake role with appropriate permissions
|
|
88
|
+
SNOWFLAKE_ROLE=ANALYST
|
|
89
|
+
|
|
90
|
+
# ========================================
|
|
91
|
+
# NextBank API (Placeholder)
|
|
92
|
+
# ========================================
|
|
93
|
+
# Base URL for the NextBank API endpoint
|
|
94
|
+
NEXTBANK_API_URL=https://api.nextbank.com
|
|
95
|
+
|
|
96
|
+
# API key for NextBank authentication
|
|
97
|
+
NEXTBANK_API_KEY=xxx
|
|
98
|
+
|
|
99
|
+
# OAuth client ID for NextBank integration
|
|
100
|
+
NEXTBANK_CLIENT_ID=xxx
|
|
101
|
+
|
|
102
|
+
# OAuth client secret for NextBank integration
|
|
103
|
+
NEXTBANK_CLIENT_SECRET=xxx
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"rsc": true,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "src/styles/globals.css",
|
|
9
|
+
"baseColor": "neutral",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"iconLibrary": "lucide",
|
|
14
|
+
"aliases": {
|
|
15
|
+
"components": "~/components",
|
|
16
|
+
"utils": "~/lib/utils",
|
|
17
|
+
"ui": "~/components/ui",
|
|
18
|
+
"lib": "~/lib",
|
|
19
|
+
"hooks": "~/hooks"
|
|
20
|
+
},
|
|
21
|
+
"registries": {}
|
|
22
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
# DTT Framework - Overview
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
The DTT Framework is a production-ready Next.js boilerplate designed for building enterprise applications with integrated services. It provides a comprehensive foundation for developing modern web applications with authentication, database management, storage, edge computing, data warehousing, and API integration capabilities.
|
|
6
|
+
|
|
7
|
+
### Purpose
|
|
8
|
+
|
|
9
|
+
The framework serves as a starting point for developers who need to quickly scaffold applications that require:
|
|
10
|
+
|
|
11
|
+
- **Authentication & Authorization**: Built-in user management with Clerk
|
|
12
|
+
- **Database Operations**: PostgreSQL via Supabase with Drizzle ORM
|
|
13
|
+
- **File Storage**: Supabase Storage for uploads and downloads
|
|
14
|
+
- **Serverless Computing**: Supabase Edge Functions
|
|
15
|
+
- **Data Analytics**: Snowflake data warehouse integration
|
|
16
|
+
- **API Layer**: Lightweight Hono framework for backend routes
|
|
17
|
+
- **State Management**: TanStack Query and Zustand for data handling
|
|
18
|
+
- **Health Monitoring**: Comprehensive health check dashboard
|
|
19
|
+
|
|
20
|
+
### Target Audience
|
|
21
|
+
|
|
22
|
+
This framework is ideal for:
|
|
23
|
+
|
|
24
|
+
- **Enterprise Developers**: Building business applications with complex integrations
|
|
25
|
+
- **Startups**: Rapidly prototyping and scaling applications
|
|
26
|
+
- **AI-Assisted Development (Vibe Coding)**: AI assistants can understand the structure and help with development
|
|
27
|
+
- **Full-Stack Teams**: Needing a unified stack for both frontend and backend
|
|
28
|
+
- **Data-Driven Applications**: Requiring analytics and reporting capabilities
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Key Features
|
|
33
|
+
|
|
34
|
+
### 1. Authentication & User Management
|
|
35
|
+
|
|
36
|
+
- **Clerk Integration**: Complete authentication solution with sign-in, sign-up, and user management
|
|
37
|
+
- **Organization Support**: Multi-tenant architecture with organization memberships
|
|
38
|
+
- **Webhook Synchronization**: Automatic user data sync to local database
|
|
39
|
+
- **Protected Routes**: Middleware-based route protection
|
|
40
|
+
|
|
41
|
+
### 2. Database Layer
|
|
42
|
+
|
|
43
|
+
- **PostgreSQL**: Robust relational database via Supabase
|
|
44
|
+
- **Drizzle ORM**: Type-safe database queries with excellent TypeScript support
|
|
45
|
+
- **Connection Pooling**: Optimized for Supabase Transaction mode
|
|
46
|
+
- **Schema Management**: Migration-based schema evolution
|
|
47
|
+
|
|
48
|
+
### 3. Storage & Edge Computing
|
|
49
|
+
|
|
50
|
+
- **Supabase Storage**: File upload/download with signed URLs
|
|
51
|
+
- **Edge Functions**: Serverless compute with auth header passthrough
|
|
52
|
+
- **Bucket Management**: Organized file storage structure
|
|
53
|
+
|
|
54
|
+
### 4. Data Warehouse
|
|
55
|
+
|
|
56
|
+
- **Snowflake Integration**: Direct connection to Snowflake data warehouse
|
|
57
|
+
- **Query Execution**: Execute SQL queries from the application
|
|
58
|
+
- **Warehouse Configuration**: Support for multiple warehouses and databases
|
|
59
|
+
|
|
60
|
+
### 5. API Layer
|
|
61
|
+
|
|
62
|
+
- **Hono Framework**: Lightweight and fast API framework
|
|
63
|
+
- **Middleware Support**: Authentication, logging, CORS
|
|
64
|
+
- **Route Organization**: Modular route structure
|
|
65
|
+
- **Type Safety**: Full TypeScript support with inferred types
|
|
66
|
+
|
|
67
|
+
### 6. State Management
|
|
68
|
+
|
|
69
|
+
- **TanStack Query**: Server state management with caching and synchronization
|
|
70
|
+
- **Zustand**: Lightweight client state management
|
|
71
|
+
- **React Hooks**: Custom hooks for common patterns
|
|
72
|
+
|
|
73
|
+
### 7. Health Check System
|
|
74
|
+
|
|
75
|
+
- **Comprehensive Monitoring**: Health checks for all integrated services
|
|
76
|
+
- **Dashboard UI**: Visual health status display
|
|
77
|
+
- **Response Time Tracking**: Performance monitoring
|
|
78
|
+
- **Error Reporting**: Detailed error messages and status codes
|
|
79
|
+
|
|
80
|
+
### 8. Developer Experience
|
|
81
|
+
|
|
82
|
+
- **TypeScript**: Full type safety across the stack
|
|
83
|
+
- **Tailwind CSS**: Utility-first styling
|
|
84
|
+
- **Shadcn/ui**: Beautiful, accessible UI components
|
|
85
|
+
- **Hot Reload**: Fast development with Next.js Turbo
|
|
86
|
+
- **Linting & Formatting**: ESLint and Prettier configured
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Architecture Overview
|
|
91
|
+
|
|
92
|
+
### High-Level Architecture
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
96
|
+
│ Client Layer │
|
|
97
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
98
|
+
│ │ Next.js App │ │ Clerk Auth │ │ TanStack Q │ │
|
|
99
|
+
│ │ (React) │ │ Components │ │ Zustand │ │
|
|
100
|
+
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
101
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
102
|
+
│
|
|
103
|
+
▼
|
|
104
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
105
|
+
│ API Layer (Hono) │
|
|
106
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
107
|
+
│ │ Routes │ │ Middleware │ │ Handlers │ │
|
|
108
|
+
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
109
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
110
|
+
│
|
|
111
|
+
┌─────────────────────┼─────────────────────┐
|
|
112
|
+
▼ ▼ ▼
|
|
113
|
+
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
|
114
|
+
│ Supabase │ │ Snowflake │ │ NextBank │
|
|
115
|
+
│ (PostgreSQL)│ │ (Warehouse) │ │ (API) │
|
|
116
|
+
└──────────────┘ └──────────────┘ └──────────────┘
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Directory Structure
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
dtt-framework/
|
|
123
|
+
├── docs/
|
|
124
|
+
│ └── framework/ # Framework documentation
|
|
125
|
+
├── public/ # Static assets
|
|
126
|
+
├── src/
|
|
127
|
+
│ ├── app/ # Next.js App Router
|
|
128
|
+
│ │ ├── (auth)/ # Auth routes (sign-in, sign-up)
|
|
129
|
+
│ │ ├── (dashboard)/ # Protected dashboard routes
|
|
130
|
+
│ │ ├── api/ # API routes (Hono mount point)
|
|
131
|
+
│ │ │ ├── [[...route]]/ # Hono catch-all
|
|
132
|
+
│ │ │ └── webhooks/ # Webhook handlers
|
|
133
|
+
│ │ ├── layout.tsx # Root layout
|
|
134
|
+
│ │ ├── page.tsx # Landing page
|
|
135
|
+
│ │ └── providers.tsx # React providers
|
|
136
|
+
│ │
|
|
137
|
+
│ ├── components/ # React components
|
|
138
|
+
│ │ ├── ui/ # Shadcn/ui components
|
|
139
|
+
│ │ ├── layouts/ # Layout components
|
|
140
|
+
│ │ └── shared/ # Shared components
|
|
141
|
+
│ │
|
|
142
|
+
│ ├── features/ # Feature modules
|
|
143
|
+
│ │ └── health-check/ # Health check feature
|
|
144
|
+
│ │
|
|
145
|
+
│ ├── hooks/ # React hooks
|
|
146
|
+
│ │ ├── queries/ # TanStack Query hooks
|
|
147
|
+
│ │ └── utils/ # Utility hooks
|
|
148
|
+
│ │
|
|
149
|
+
│ ├── lib/ # Utility libraries
|
|
150
|
+
│ │ ├── supabase/ # Supabase clients
|
|
151
|
+
│ │ ├── snowflake/ # Snowflake client
|
|
152
|
+
│ │ └── nextbank/ # NextBank client
|
|
153
|
+
│ │
|
|
154
|
+
│ ├── server/ # Server-side code
|
|
155
|
+
│ │ ├── api/ # Hono API setup
|
|
156
|
+
│ │ │ ├── index.ts # Hono app instance
|
|
157
|
+
│ │ │ ├── middleware/ # API middleware
|
|
158
|
+
│ │ │ └── routes/ # API routes
|
|
159
|
+
│ │ └── db/ # Database setup
|
|
160
|
+
│ │ ├── schema/ # Drizzle schemas
|
|
161
|
+
│ │ ├── queries/ # Database queries
|
|
162
|
+
│ │ └── migrations/ # Migration files
|
|
163
|
+
│ │
|
|
164
|
+
│ ├── stores/ # Zustand stores
|
|
165
|
+
│ ├── types/ # TypeScript types
|
|
166
|
+
│ └── config/ # Configuration files
|
|
167
|
+
│
|
|
168
|
+
├── drizzle.config.ts # Drizzle ORM config
|
|
169
|
+
├── middleware.ts # Next.js middleware
|
|
170
|
+
├── next.config.js # Next.js config
|
|
171
|
+
├── package.json # Dependencies
|
|
172
|
+
├── tsconfig.json # TypeScript config
|
|
173
|
+
└── .env.example # Environment variables template
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Technology Stack Summary
|
|
179
|
+
|
|
180
|
+
| Category | Technology | Purpose |
|
|
181
|
+
|----------|------------|---------|
|
|
182
|
+
| **Framework** | Next.js 15 | Full-stack React framework with App Router |
|
|
183
|
+
| **Language** | TypeScript 5.8 | Type-safe development |
|
|
184
|
+
| **Styling** | Tailwind CSS 4 | Utility-first CSS framework |
|
|
185
|
+
| **UI Components** | Shadcn/ui | Accessible component primitives |
|
|
186
|
+
| **Authentication** | Clerk 6 | User authentication & management |
|
|
187
|
+
| **Database** | Supabase (PostgreSQL) | Primary database |
|
|
188
|
+
| **ORM** | Drizzle 0.41 | Type-safe database queries |
|
|
189
|
+
| **Storage** | Supabase Storage | File storage |
|
|
190
|
+
| **Edge Functions** | Supabase Edge Functions | Serverless compute |
|
|
191
|
+
| **Data Warehouse** | Snowflake SDK | Analytics & reporting |
|
|
192
|
+
| **API Framework** | Hono 4 | Lightweight API layer |
|
|
193
|
+
| **Server State** | TanStack Query 5 | Data fetching & caching |
|
|
194
|
+
| **Client State** | Zustand 5 | UI state management |
|
|
195
|
+
| **Validation** | Zod 3 | Schema validation |
|
|
196
|
+
| **Icons** | Lucide React | Icon library |
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Getting Started Summary
|
|
201
|
+
|
|
202
|
+
### Prerequisites
|
|
203
|
+
|
|
204
|
+
- Node.js 20+
|
|
205
|
+
- pnpm 10+ (package manager)
|
|
206
|
+
- Supabase account (for database, storage, edge functions)
|
|
207
|
+
- Clerk account (for authentication)
|
|
208
|
+
- Snowflake account (optional, for data warehouse)
|
|
209
|
+
|
|
210
|
+
### Quick Start
|
|
211
|
+
|
|
212
|
+
1. **Install the framework:**
|
|
213
|
+
```bash
|
|
214
|
+
pnpm create dtt-framework@latest my-app
|
|
215
|
+
cd my-app
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
2. **Configure environment variables:**
|
|
219
|
+
```bash
|
|
220
|
+
cp .env.example .env
|
|
221
|
+
# Edit .env with your credentials
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
3. **Set up the database:**
|
|
225
|
+
```bash
|
|
226
|
+
pnpm db:push
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
4. **Start the development server:**
|
|
230
|
+
```bash
|
|
231
|
+
pnpm dev
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
5. **Visit the health dashboard:**
|
|
235
|
+
```
|
|
236
|
+
http://localhost:3000/health
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Next Steps
|
|
240
|
+
|
|
241
|
+
- Read the [Tech Stack Documentation](./02-techstack.md) for detailed technology information
|
|
242
|
+
- Configure [Clerk Authentication](./clerk-authentication.md)
|
|
243
|
+
- Set up [Supabase Integration](./supabase-integration.md)
|
|
244
|
+
- Configure [Snowflake Integration](./snowflake-integration.md)
|
|
245
|
+
- Explore the [API Layer](./api-layer.md)
|
|
246
|
+
- Understand [State Management](./state-management.md)
|
|
247
|
+
- Learn about the [Health Check System](./health-check-system.md)
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Who Should Use This Framework?
|
|
252
|
+
|
|
253
|
+
### Ideal For:
|
|
254
|
+
|
|
255
|
+
1. **Enterprise Teams**: Building business-critical applications requiring multiple service integrations
|
|
256
|
+
2. **SaaS Startups**: Needing rapid development with built-in authentication and database
|
|
257
|
+
3. **Data-Driven Applications**: Requiring analytics and reporting capabilities
|
|
258
|
+
4. **Multi-Tenant Applications**: Needing organization and user management
|
|
259
|
+
5. **AI-Assisted Development**: Developers using AI coding assistants (vibe coding)
|
|
260
|
+
|
|
261
|
+
### Not Ideal For:
|
|
262
|
+
|
|
263
|
+
1. **Simple Static Sites**: The framework is overkill for basic static websites
|
|
264
|
+
2. **Learning React**: Better to start with simpler frameworks if you're new to React
|
|
265
|
+
3. **Non-PostgreSQL Databases**: The framework is optimized for PostgreSQL/Supabase
|
|
266
|
+
4. **Minimal API Needs**: If you only need a simple API, consider lighter alternatives
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Design Philosophy
|
|
271
|
+
|
|
272
|
+
The DTT Framework follows these core principles:
|
|
273
|
+
|
|
274
|
+
1. **Type Safety First**: Leverage TypeScript at every layer for compile-time error detection
|
|
275
|
+
2. **Convention over Configuration**: Sensible defaults with easy customization
|
|
276
|
+
3. **Modular Architecture**: Clear separation of concerns for maintainability
|
|
277
|
+
4. **Developer Experience**: Fast feedback loops with hot reload and excellent tooling
|
|
278
|
+
5. **Production Ready**: Built with best practices for scalability and security
|
|
279
|
+
6. **AI-Friendly**: Clear structure and naming conventions for AI-assisted development
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Related Documentation
|
|
284
|
+
|
|
285
|
+
- [Tech Stack](./02-techstack.md) - Detailed technology breakdown
|
|
286
|
+
- [Environment Variables](./environment-variables.md) - Configuration guide
|
|
287
|
+
- [CLI Installation](./cli-installation.md) - Installation and setup
|
|
288
|
+
- [Implementation Guide](./implementation.md) - How the framework was built
|
|
289
|
+
- [Testing Guide](./testing-guide.md) - Testing patterns and practices
|