A full-stack AI-powered note-taking and daily logging application.
ndle/
├── apps/
│ ├── frontend/ # React + Vite frontend
│ └── backend/ # Hono + Lambda backend
├── packages/
│ └── shared/ # Shared types, validation, utilities
├── infrastructure/ # AWS CDK infrastructure
├── package.json # Workspace configuration
├── turbo.json # Turborepo configuration
└── tsconfig.json # Root TypeScript configuration
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite, Tailwind CSS, Redux Toolkit |
| Backend | Hono, AWS Lambda (Node.js 24), DynamoDB |
| AI | Google Gemini 2.5 Pro, Pinecone Vector DB |
| Auth | AWS Cognito |
| Infrastructure | AWS CDK, CloudFront, API Gateway |
| Monorepo | npm workspaces, Turborepo |
- Node.js 22+
- npm 10+
- AWS CLI configured with credentials
- AWS CDK CLI (
npm install -g aws-cdk)
# Install all dependencies (workspaces handle linking)
npm install
# Build shared package first (other packages depend on it)
npm run build:shared
# Development
npm run dev # Start all apps in dev mode
npm run dev:frontend # Start only frontend
npm run dev:backend # Start only backend
# Build
npm run build # Build all packages (Turborepo)
npm run build:frontend # Build only frontend
npm run build:backend # Build only backend
# Test
npm run test # Run all tests
npm run test:backend # Run backend tests only
# Lint
npm run lint # Lint all packages| Command | Description |
|---|---|
npm run build |
Build all packages in dependency order |
npm run dev |
Start all apps in development mode |
npm run test |
Run all tests |
npm run lint |
Lint all packages |
npm run clean |
Remove all build artifacts |
# Run command in specific workspace
npm run build -w @ndle/shared # Build shared package
npm run dev -w frontend # Start frontend dev server
npm run test -w backend # Run backend tests
npm run deploy -w infrastructure # Deploy CDK stacksThe @ndle/shared package contains:
- Types: Entity definitions, API contracts, service interfaces
- Validation: Zod schemas for runtime validation
- Utils: Shared utilities for parameter extraction, logging, etc.
// In frontend or backend
import { Types, Validation } from '@ndle/shared';
import type { Conversation, Message } from '@ndle/shared/types';
import { ConversationSchema } from '@ndle/shared/validation';The infrastructure is managed with AWS CDK and split into two stacks:
- Cognito User Pool & Client
- DynamoDB Table
- S3 Bucket
- CloudFront Distribution
- Lambda Functions (API + Streaming)
- API Gateway
cd infrastructure
# Bootstrap CDK (one-time per account/region)
npx cdk bootstrap
# Set required environment variables
export GOOGLE_GENERATIVE_AI_API_KEY=your-key
export PINECONE_API_KEY=your-key
# Deploy all stacks
npm run deploy -- -c env=dev
# Deploy specific stack
npm run deploy:foundation -- -c env=dev
npm run deploy:backend -- -c env=dev
# Preview changes
npx cdk diff -c env=devGitHub Actions workflows are configured for:
- CI (
ci.yml): Runs on PRs - lint, type-check, test, build - Deploy (
deploy.yml): Runs on push to main - deploys to AWS
Required GitHub Secrets:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYGOOGLE_GENERATIVE_AI_API_KEYPINECONE_API_KEY
- Make changes to any package
- Turborepo detects what changed
- Only affected packages are rebuilt/tested
- Caching speeds up subsequent builds
# Turborepo shows what it's doing
npm run build
# Output:
# @ndle/shared:build: cache hit, replaying logs
# frontend:build: cache miss, executing
# backend:build: cache hit, replaying logsVITE_AWS_COGNITO_USER_POOL_ID=
VITE_AWS_COGNITO_USER_POOL_WEB_CLIENT_ID=
VITE_AWS_REGION=us-west-1
VITE_API_BASE_URL=
VITE_STREAMING_API_URL=Environment variables are injected by CDK from secrets.
Private - All rights reserved