mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 00:01:10 +02:00
Move inactive projects out of active workspace: - bauntown (community website) - maerchenzauber (AI story generation) - memoro (voice memo app) - news (news aggregation) - nutriphi (nutrition tracking) - reader (reading app) - uload (URL shortener) - wisekeep (AI wisdom extraction) Update CLAUDE.md documentation: - Add presi to active projects - Document archived projects section - Update workspace configuration Archived apps can be re-activated by moving back to apps/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2.7 KiB
2.7 KiB
Database Switching Guide
Overview
The application now supports automatic switching between development and production databases to prevent accidental changes to production data during local development.
Configuration
Development Mode
- Database URL:
http://localhost:8090 - Config File:
.env(for local development) - MCP Config:
.mcp.development.json
Production Mode
- Database URL:
https://pb.ulo.ad - Config File:
.env.production - MCP Config:
.mcp.json
How to Use
Local Development
- Start the local PocketBase server:
npm run backend
# or
cd backend && ./pocketbase serve
- Start the development server:
npm run dev
- Or start both together:
npm run dev:all
The application will automatically connect to http://localhost:8090.
Production Build
For production builds, the application will use the production database:
npm run build
npm run preview
Switching Between Environments
To use local database:
- Ensure
.envcontains:PUBLIC_POCKETBASE_URL=http://localhost:8090 - Start local PocketBase:
npm run backend - Run development server:
npm run dev
To use production database (NOT RECOMMENDED for development):
- Change
.envto:PUBLIC_POCKETBASE_URL=https://pb.ulo.ad - Restart development server:
npm run dev
⚠️ WARNING: Only connect to production database when absolutely necessary. Always use local database for development and testing.
Verification
To verify which database is being used, check the browser console after starting the dev server. You should see:
PocketBase URL: http://localhost:8090
Environment: development
Is Production: false
Files Changed
src/lib/pocketbase.ts: Removed hardcoded production URL, now uses environment variablessrc/hooks.server.ts: Added fallback logic for environment-based URL selection.env: Changed to use local database URL for development.mcp.development.json: New file for local MCP server configurationCLAUDE.md: Updated with database configuration documentation
Troubleshooting
Local PocketBase not starting
- Check if port 8090 is already in use
- Ensure PocketBase binary is executable:
chmod +x backend/pocketbase - Check logs:
cat pocketbase-dev.log
Still connecting to production
- Clear browser cache and restart dev server
- Verify
.envfile contains correct URL - Check console output for which URL is being used
MCP Server issues
- For local development, use
.mcp.development.json - For production, use
.mcp.json - Restart Claude Code after changing MCP configuration