Repository navigation
Deployment Plan
This page documents deployment considerations for Tapitude Creator Hub.
The app is structured as a Node.js/Express application with MongoDB. It uses local filesystem uploads during development.
Before production deployment, the team should verify the setup scripts, environment variables, storage plan, and security settings.
The app currently expects environment variables such as:
NODE_ENV=production
PORT=3000
MONGODB_URI=your_mongodb_connection_string
SESSION_SECRET=replace_with_secure_secret
CSRF_SECRET=replace_with_secure_secret.env.example should include every required variable. At minimum, add CSRF_SECRET because src/middleware/security.ts requires it.
The repository currently contains:
src/server.tsCheck package.json before deployment. If scripts still point to src/server.js, update them to src/server.ts.
Recommended scripts:
"dev": "npx tsx --watch src/server.ts",
"start": "npx tsx src/server.ts"Production should use MongoDB with credentials stored outside the repository.
Before deployment:
- Confirm
MONGODB_URIis set. - Confirm the database user has only the permissions needed.
- Confirm indexes exist for common lookups.
- Confirm session storage works with
connect-mongo. - Confirm backup/restore expectations with sponsors.
The app uses:
express-sessionconnect-mongo- Cookie name
tapitude.sid
Production settings should include:
NODE_ENV=production- Secure session secret.
- HTTPS.
- Secure cookies.
- Correct proxy settings if running behind a proxy.
The app uses a session-bound CSRF token.
Before deployment:
- Set
CSRF_SECRET. - Confirm every POST form includes
_csrf. - Confirm Socket.IO and upload flows still work with CSRF rules.
Current behavior:
- Uploaded files are stored in local
storage/. - The server exposes uploaded files at
/storage. - File metadata is stored in MongoDB.
This is acceptable for local development and controlled demos.
For production, use durable object storage such as:
- AWS S3
- Cloudflare R2
- Azure Blob Storage
- Google Cloud Storage
- Sponsor-approved storage
The existing FileService should be the abstraction point for future storage changes.
The app uses Pino.
Production logging writes to console and logs/app.log.
Recommended follow-up:
- Confirm logs are retained by the hosting platform.
- Avoid logging sensitive secrets.
- Fix the startup log interpolation if needed:
logger.info(`Server started on port ${process.env.PORT}`);Before production/demo handoff:
-
npm installcompletes successfully. -
npm run devworks from a clean clone. -
npm startworks from a clean clone. -
.env.examplecontains all required environment variables. - MongoDB connection succeeds.
- Admin account can be created.
- Login/logout works.
- CSRF works on all forms.
- Creator account creation works.
- Creator profile update works.
- Post create/edit/delete works.
- Media upload/delete works.
- Public content hub loads published content.
- Disabled creator hubs are hidden.
- Oldest-post deletion works at the 25-post limit.
- No uploaded user files are committed to Git.
- Local file storage can be lost on redeploy depending on hosting provider.
- Socket.IO content hub room behavior should be reviewed before multi-user production use.
- Account deletion cleanup should be verified so posts/media are not orphaned.
- TypeScript checks should be made reliable before long-term maintenance.