Skip to content

Commit d62ffaf

Browse files
committed
docs: remove hardcoded Sentry config and clean up README
- Move Sentry organization and project names to environment variables - Update build.mjs to use SENTRY_ORG and SENTRY_PROJECT env vars - Update GitHub workflows to use secrets instead of hardcoded values - Add SENTRY_ORG and SENTRY_PROJECT to .env.example documentation - Remove organization-specific Sentry URLs from README and .env.example - Remove redundant "Why This Setup?" section from README
1 parent f2189fd commit d62ffaf

File tree

5 files changed

+48
-13
lines changed

5 files changed

+48
-13
lines changed

.env.example

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ FREE_TIER_NOTE_LIMIT=100# Note count limit for free users (default: 100)
126126
# ================================================================
127127

128128
# Sentry.io Error Tracking (OPTIONAL)
129-
# Get your DSN from: https://sentry.io/settings/bata-labs/projects/typelets-api/keys/
130129
# Format: https://<key>@<org-id>.ingest.us.sentry.io/<project-id>
131130
# SENTRY_DSN=https://your-sentry-dsn-here
132131
# Error tracking, performance monitoring, and profiling are enabled by default
@@ -138,6 +137,11 @@ FREE_TIER_NOTE_LIMIT=100# Note count limit for free users (default: 100)
138137
# SENTRY_AUTH_TOKEN=your-sentry-auth-token-here
139138
# This is only needed during production builds to upload source maps
140139

140+
# Sentry Organization and Project (REQUIRED for production builds with source maps)
141+
# These are used during the build process to upload source maps
142+
# SENTRY_ORG=your-sentry-organization-slug
143+
# SENTRY_PROJECT=your-sentry-project-slug
144+
141145
# Application Logging
142146
# Structured logs are automatically generated for:
143147
# - Authentication events

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
env:
3636
NODE_ENV: production
3737
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
38+
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
39+
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
3840
run: NODE_OPTIONS="--max-old-space-size=8192" pnpm run build
3941

4042
- name: Release

.github/workflows/sentry-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
- name: Create Sentry Release
2424
env:
2525
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
26-
SENTRY_ORG: bata-labs
27-
SENTRY_PROJECT: typelets-api
26+
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
27+
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
2828
run: |
2929
# Create new release
3030
sentry-cli releases new "${{ env.RELEASE_VERSION }}"

README.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,43 @@
1010

1111
The backend API for the [Typelets Application](https://github.com/typelets/typelets-app) - a secure, encrypted notes management system built with TypeScript, Hono, and PostgreSQL. Features end-to-end encryption support, file attachments, and folder organization.
1212

13+
## Table of Contents
14+
15+
- [Features](#features)
16+
- [Tech Stack](#tech-stack)
17+
- [Prerequisites](#prerequisites)
18+
- [Local Development Setup](#local-development-setup)
19+
- [Quick Start](#quick-start)
20+
- [Development Workflow](#development-workflow)
21+
- [Alternative Installation Methods](#alternative-installation-methods)
22+
- [Available Scripts](#available-scripts)
23+
- [API Endpoints](#api-endpoints)
24+
- [Public Endpoints](#public-endpoints)
25+
- [Authentication](#authentication)
26+
- [Interactive Documentation](#interactive-documentation)
27+
- [WebSocket Real-time Sync](#websocket-real-time-sync)
28+
- [Database Schema](#database-schema)
29+
- [Security Features](#security-features)
30+
- [Environment Variables](#environment-variables)
31+
- [Monitoring with Sentry.io](#monitoring-with-sentryio)
32+
- [Features](#features-1)
33+
- [Configuration](#configuration)
34+
- [Source Maps](#source-maps)
35+
- [Automated Release Tracking](#automated-release-tracking)
36+
- [Development](#development)
37+
- [Project Structure](#project-structure)
38+
- [Type Safety](#type-safety)
39+
- [Docker Support](#docker-support)
40+
- [Production Deployment](#production-deployment)
41+
- [Contributing](#contributing)
42+
- [Getting Started](#getting-started)
43+
- [Commit Message Format](#commit-message-format)
44+
- [Pull Request Process](#pull-request-process)
45+
- [Reporting Issues](#reporting-issues)
46+
- [Security Vulnerabilities](#security-vulnerabilities)
47+
- [License](#license)
48+
- [Acknowledgments](#acknowledgments)
49+
1350
## Features
1451

1552
- 🔐 **Secure Authentication** via Clerk
@@ -111,12 +148,6 @@ pnpm run dev
111148

112149
The development server will automatically restart when you make changes to any TypeScript files.
113150

114-
### Why This Setup?
115-
116-
**PostgreSQL in Docker**: Easy to start/stop, no local PostgreSQL installation needed
117-
**API with pnpm**: Hot reload, easy debugging, faster development cycle
118-
**Clean separation**: Matches production architecture (API + external database)
119-
120151
### Development Workflow
121152

122153
```bash
@@ -309,8 +340,6 @@ Sentry is configured in the application with:
309340
SENTRY_DSN=https://your-key@your-org-id.ingest.us.sentry.io/your-project-id
310341
```
311342

312-
Get your DSN from: [Sentry.io Project Settings](https://sentry.io/settings/bata-labs/projects/typelets-api/keys/)
313-
314343
Once configured, all errors are automatically captured and sent to Sentry with contextual information including:
315344

316345
- Error ID for tracking

build.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const buildOptions = {
2020
if (isProduction && process.env.SENTRY_AUTH_TOKEN) {
2121
buildOptions.plugins = [
2222
sentryEsbuildPlugin({
23-
org: "bata-labs",
24-
project: "typelets-api",
23+
org: process.env.SENTRY_ORG,
24+
project: process.env.SENTRY_PROJECT,
2525
authToken: process.env.SENTRY_AUTH_TOKEN,
2626

2727
// Upload source maps to Sentry

0 commit comments

Comments
 (0)