Skip to content

Commit 66a3d30

Browse files
committed
feat: initial open source release of Typelets API
0 parents  commit 66a3d30

30 files changed

+24389
-0
lines changed

.dockerignore

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Dependencies
2+
node_modules
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Build output (will be created during Docker build)
8+
dist
9+
10+
# Environment files
11+
.env
12+
.env
13+
.env.development
14+
.env.test
15+
.env.production
16+
17+
# IDE and editor files
18+
.vscode
19+
.idea
20+
*.swp
21+
*.swo
22+
23+
# OS files
24+
.DS_Store
25+
Thumbs.db
26+
27+
# Git
28+
.git
29+
.gitignore
30+
31+
# Documentation
32+
README.md
33+
*.md
34+
35+
# Testing
36+
coverage
37+
.nyc_output
38+
test
39+
40+
# Logs
41+
logs
42+
*.log
43+
44+
# Database files
45+
*.db
46+
*.sqlite
47+
48+
# Docker files
49+
Dockerfile
50+
.dockerignore
51+
docker-compose.yml
52+
53+
# Deployment files
54+
deploy-backend.sh
55+
backend-task-definition.json
56+
57+
# Drizzle
58+
drizzle
59+
migrations

.env.example

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# LOCAL DEVELOPMENT AND TESTING ENVIRONMENT VARIABLES
2+
# This file is ONLY for local development and testing
3+
# Copy this file to .env and update with your local testing values
4+
5+
# Database connection for local testing
6+
# For Docker PostgreSQL (recommended for testing):
7+
DATABASE_URL=postgresql://postgres:devpassword@localhost:5432/typelets_local
8+
# For local PostgreSQL installation:
9+
# DATABASE_URL=postgresql://postgres:your_password@localhost:5432/typelets_local
10+
11+
# Clerk authentication for local testing (get from https://dashboard.clerk.com)
12+
CLERK_SECRET_KEY=sk_test_your_actual_clerk_secret_key_from_dashboard
13+
14+
# CORS configuration - REQUIRED
15+
# Comma-separated list of allowed origins
16+
CORS_ORIGINS=http://localhost:5173,http://localhost:3000
17+
18+
# Optional settings (have sensible defaults)
19+
PORT=3000
20+
NODE_ENV=development
21+
22+
# File upload configuration
23+
# MAX_FILE_SIZE_MB=50 # Maximum size per file in MB (default: 50)
24+
# MAX_NOTE_SIZE_MB=1024 # Maximum total attachments per note in MB (default: 1024MB = 1GB)
25+
26+
# Free tier limits for billing
27+
# FREE_TIER_STORAGE_GB=1 # Storage limit in GB for free tier (default: 1)
28+
# FREE_TIER_NOTE_LIMIT=100 # Note count limit for free tier (default: 100)
29+
30+
# Debug logging
31+
# DEBUG=false # Set to true to enable debug logging in production
32+
33+
# IMPORTANT: This .env file is for LOCAL TESTING ONLY
34+
# Production uses AWS ECS task definitions, not .env files

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [20.x, 22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v4
27+
with:
28+
version: 9.15.0
29+
30+
- name: Install dependencies
31+
run: pnpm install
32+
33+
- name: Run linting
34+
run: pnpm run lint
35+
36+
- name: Run build
37+
run: NODE_OPTIONS="--max-old-space-size=8192" pnpm run build

.github/workflows/codeql.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: '0 0 * * 0'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: ['typescript']
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v3
31+
with:
32+
languages: ${{ matrix.language }}
33+
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: '20'
38+
39+
- name: Setup pnpm
40+
uses: pnpm/action-setup@v4
41+
with:
42+
version: 9.15.0
43+
44+
- name: Install dependencies
45+
run: pnpm install
46+
47+
- name: Build
48+
run: NODE_OPTIONS="--max-old-space-size=8192" pnpm run build
49+
50+
- name: Perform CodeQL Analysis
51+
uses: github/codeql-action/analyze@v3

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: write
13+
issues: write
14+
pull-requests: write
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@v4
28+
with:
29+
version: 9.15.0
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
34+
- name: Build
35+
run: NODE_OPTIONS="--max-old-space-size=8192" pnpm run build
36+
37+
- name: Release
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: npx semantic-release

.gitignore

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
node_modules/
2+
dist/
3+
.env
4+
*.log
5+
.DS_Store
6+
coverage/
7+
drizzle/
8+
.claude/
9+
10+
# Dependencies
11+
node_modules/
12+
npm-debug.log*
13+
yarn-debug.log*
14+
yarn-error.log*
15+
16+
# Environment variables - CRITICAL: Keep secrets out of Git
17+
.env
18+
.env.*
19+
!.env.example
20+
.env.local
21+
.env.development.local
22+
.env.test.local
23+
.env.production.local
24+
25+
# Build outputs
26+
dist/
27+
build/
28+
29+
# Logs
30+
logs
31+
*.log
32+
33+
# Runtime data
34+
pids
35+
*.pid
36+
*.seed
37+
*.pid.lock
38+
39+
# Coverage directory
40+
coverage/
41+
*.lcov
42+
43+
# Dependency directories
44+
node_modules/
45+
jspm_packages/
46+
47+
# Optional npm cache
48+
.npm
49+
50+
# Optional eslint cache
51+
.eslintcache
52+
53+
# IDE files
54+
.vscode/
55+
.idea/
56+
*.swp
57+
*.swo
58+
*~
59+
60+
# OS generated files
61+
.DS_Store
62+
.DS_Store?
63+
._*
64+
.Spotlight-V100
65+
.Trashes
66+
ehthumbs.db
67+
Thumbs.db
68+
69+
# Database files
70+
*.sqlite
71+
*.db
72+
73+
# Temporary files
74+
tmp/
75+
temp/
76+
77+
# Local deployment scripts - NEVER COMMIT
78+
deploy.local.sh
79+
deploy.local.bat
80+
deploy.local.ps1
81+
*.local.sh
82+
*.local.bat
83+
*.local.ps1
84+
deployment-scripts/

.releaserc.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
7+
[
8+
"@semantic-release/npm",
9+
{
10+
"npmPublish": false
11+
}
12+
],
13+
[
14+
"@semantic-release/exec",
15+
{
16+
"prepareCmd": "node scripts/update-version.js ${nextRelease.version}"
17+
}
18+
],
19+
[
20+
"@semantic-release/git",
21+
{
22+
"assets": [
23+
"CHANGELOG.md",
24+
"package.json",
25+
"package-lock.json",
26+
"src/version.ts"
27+
],
28+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
29+
}
30+
],
31+
"@semantic-release/github"
32+
]
33+
}

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Initial open source release
13+
- TypeScript API with Hono framework
14+
- PostgreSQL database with Drizzle ORM
15+
- Clerk authentication integration
16+
- End-to-end encryption support for notes and files
17+
- Folder organization with nested folder support
18+
- File attachments with encrypted storage
19+
- Tags and search functionality
20+
- Trash and archive features
21+
- Comprehensive API documentation
22+
- GitHub Actions CI/CD pipeline with semantic versioning
23+
- Environment-based configuration for CORS and file upload limits
24+
- Production-ready logging with debug mode support

0 commit comments

Comments
 (0)