chore: Add environment configuration template and clean up utility scripts

- Add .env.example with comprehensive configuration documentation for database, authentication, storage, and node settings
- Update .gitignore to explicitly track .env.example while excluding all .env variants
- Add IDE configuration directories (.vscode/, .kiro/) to .gitignore
- Remove clear_bots.ts and inspect_bots.ts utility scripts that are no longer needed
- Improve environment setup experience for new developers by providing a clear template with all required and optional configuration options
This commit is contained in:
AskIt
2026-01-25 16:35:41 +01:00
parent 8ad3b97b7e
commit ca53cfbc3b
4 changed files with 43 additions and 25 deletions
+32
View File
@@ -0,0 +1,32 @@
# ===========================================
# Synapsis Environment Configuration
# ===========================================
# Copy this file to .env and fill in your values
# Database (Required)
DATABASE_URL=postgresql://user:password@localhost:5432/synapsis
# Authentication (Required)
# Generate with: openssl rand -hex 32
AUTH_SECRET=your-secret-key-here
# Node Configuration (Required)
NEXT_PUBLIC_NODE_DOMAIN=your-domain.com
NEXT_PUBLIC_NODE_NAME=My Synapsis Node
NEXT_PUBLIC_NODE_DESCRIPTION=A federated social network node
# Admin Users (Required)
# Comma-separated list of email addresses that have admin access
ADMIN_EMAILS=admin@example.com
# S3-Compatible Storage (Required for media uploads)
STORAGE_ENDPOINT=https://s3.your-provider.com
STORAGE_REGION=us-east-1
STORAGE_BUCKET=synapsis
STORAGE_ACCESS_KEY=your-access-key
STORAGE_SECRET_KEY=your-secret-key
STORAGE_PUBLIC_BASE_URL=https://cdn.your-domain.com
# Optional Settings
# NEXT_PUBLIC_ACCENT_COLOR=#00D4AA
# BOT_MAX_PER_USER=5
+11 -1
View File
@@ -31,7 +31,13 @@ yarn-error.log*
.pnpm-debug.log*
# env files (can opt-in for committing if needed)
.env*
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# Keep .env.example tracked
!.env.example
# vercel
.vercel
@@ -42,3 +48,7 @@ next-env.d.ts
# uploads
/public/uploads/
# IDE
.vscode/
.kiro/
-11
View File
@@ -1,11 +0,0 @@
import { db } from './src/db';
import { bots } from './src/db/schema';
async function main() {
console.log('Deleting all bots...');
await db.delete(bots);
console.log('Bots deleted.');
}
main().then(() => process.exit(0)).catch(console.error);
-13
View File
@@ -1,13 +0,0 @@
import { db } from './src/db';
import { bots } from './src/db/schema';
async function main() {
const allBots = await db.select().from(bots);
console.log('Bot Count:', allBots.length);
if (allBots.length > 0) {
console.log('Bot Data:', JSON.stringify(allBots, null, 2));
}
}
main().then(() => process.exit(0)).catch(console.error);