All Appwrite constants have been moved to environment variables for better configuration management and security.
# Appwrite Configuration
VITE_APPWRITE_ENDPOINT=https://fra.cloud.appwrite.io/v1
VITE_APPWRITE_PROJECT_ID=
# Database IDs
VITE_DATABASE_MAIN=mainDB
VITE_DATABASE_SOCIAL=socialDB
VITE_DATABASE_WEB3=web3DB
VITE_DATABASE_CONTENT=contentDB
VITE_DATABASE_ANALYTICS=analyticsDB
# Collections (35+ environment variables for all tables)
# Buckets (12 storage buckets)
# Functions- Removed invalid
Realtimeimport (not exported by appwrite) - Client now uses
client.subscribe()for real-time functionality - Added configuration validation
- All constants now load from environment variables with fallbacks
- Maintains type safety with TypeScript const assertions
- Updated to use
client.subscribe()instead of separate Realtime service - Removed deprecated
RealtimeResponseEventtype imports
- Consolidated exports for all services
- Explicit re-exports to ensure proper module resolution
- Added legacy aliases for backward compatibility
- ✅ 20+ temporary
.cjsscripts (generate-schema, fix-, reduce-, etc.) - ✅ Python generation scripts (generate_schema.py)
- ✅ Backup JSON files (appwrite.config.backup.json, *.new.json, *.v2.json)
- ✅ Duplicate env files (.env.env, .env.example)
- ✅
env.sample→.env.example(standardized naming) - ✅ Updated
.envwith proper structure
✅ Build Successful
dist/index.html 1.22 kB │ gzip: 0.53 kB
dist/assets/index-CBAMhygM.css 104.96 kB │ gzip: 18.27 kB
dist/assets/index-DiQ_LHRN.js 405.74 kB │ gzip: 119.96 kB
Total Bundle Size: ~512 KB (uncompressed), ~140 KB (gzipped)
- Security: No hardcoded credentials or IDs in source code
- Flexibility: Easy environment-specific configuration
- Maintainability: Cleaner repository without temporary files
- Type Safety: All constants maintain TypeScript type checking
- Scalability: Environment variables can be managed through CI/CD
- Update
.envfile with your actual Appwrite project values - Configure environment variables in production deployment
- Test all Appwrite integrations with real data
- Set up CI/CD environment variable management
Before running the app, set these required variables in .env:
VITE_APPWRITE_PROJECT_ID=your-project-id
VITE_WEB3_FUNCTION_ID=your-function-idAll other variables have sensible defaults matching the database schema.