Commit fdf93cc
V2 scaffolding (#18)
* feat: add comprehensive rules for architecture, controllers, services, and development workflows
* chore: remove VSCode extensions configuration and clean up settings
* chore: update configuration files and enhance middleware structure
* chore: remove unused dependencies and session store reference from configuration files
* feat: implement server-managed session lifecycle with MongoDB and Redis support
* fix: resolve session token hash mismatch by updating hash after final token generation
* feat: implement session cleanup functionality with scheduled tasks and user session management
* refactor: enhance session management logging and code readability
* chore: add AGENTS.md for repository guidelines and project structure documentation
* refactor: standardize formatting in ResetPassword email template for improved readability
* chore: update OpenAPI generation script to use dotenv for environment configuration and add openapi.yml to .gitignore
* chore: remove session management plugin plan document as it is no longer needed
* chore: standardize quote style in ESLint configuration for consistency
* chore: update new module creation guide to include tbk CLI usage and customization steps
* feat: implement seeding system with CLI commands for database management
* feat: add CLI commands for module and seeder generation with detailed usage instructions
* feat: enhance module and seeder CLI documentation with detailed steps and examples
* chore: update configuration references in documentation to reflect changes in env.ts
* refactor: optimize file writing in tbk CLI and update import paths for configuration
* refactor: standardize quote style in can-access middleware for consistency
* refactor: clean up error handling, db call and type definitions in can-access middleware and seed script
* feat: implement admin dashboard with CRUD functionality and resource registration
* feat: add modal functionality for record creation and editing in admin dashboard
* feat: implement file upload functionality in admin dashboard with support for fileFields
* refactor: improve code readability and consistency in admin dashboard JavaScript and HTML files
* feat: implement profile picture upload functionality with new upload routes and controller
* refactor: reorganize healthcheck functionality into modules and update routing
* refactor: migrate logger service to observability module and update import paths across the codebase
* refactor: replace socket.io setup with a new realtime plugin and update main application initialization
* feat: add realtime testing interface with connection management and logging features
* feat: add relation lookup endpoint and enhance admin dashboard with relation field handling
* feat: enhance admin dashboard with subdocument handling and editor functionality
* fix: correct subdocument handling logic in schema introspection utility
* refactor: simplify ResponseExtended interface by removing unused locals property
* chore: remove outdated documentation files for email service, seeders, and session management
* feat: implement new response validation system and update controllers to use typed response helpers
* chore: update API documentation paths and enhance frontend styles for consistency
* chore: add OpenAPI generation script and update .gitignore to include generated files
* feat: add socket testing suite URL to server bootstrap logs
* chore: update admin queue references to remove '/admin/' prefix in documentation and code
* chore: refine project structure documentation for clarity and add testing guidelines
* feat: implement room management features in realtime app, including join, leave, and broadcast functionality
* feat: add collapsible panel for custom emit functionality in realtime app
* refactor: improve code readability by formatting and organizing JavaScript in admin.js
* chore: update OpenAPI generation paths to ensure correct output location and enhance documentation links
* chore: update OpenAPI documentation file path to save in public directory
* feat: implement recent items feature in admin lookup, displaying recent selections based on user input
* feat: implement bulk delete and clear all functionality in admin interface, including UI updates for selection and sorting
* feat: add filtering options for event logs in realtime app, including UI elements for enabled listeners and listener selection
* feat: add admin authentication and login page
* refactor: improve S3 upload implementation with streaming and better error handling
* feat: add comprehensive HTTP status codes and improve OpenAPI response definitions
* refactor: standardize OpenAPI response schemas across auth, blog, and user modules
* refactor: reorganize utilities into focused modules and move error handler to middlewares
* refactor: extract admin login JS to separate file and update production config
* feat: add Google OAuth redirect URI utility function
* fix: google sign in support with zod schema and url builder
* chore: update gitignore and PM2 ecosystem configuration
* chore: add favicon
* fix: script path in ecosystem.config.js
* feat: add intelligent port resolver with conflict detection and fallback
* refactor: remove unused validation function and clean up S3 upload logic
* refactor: enhance src/lib structure
* refactor: update email provider integration and improve file storage references
* feat: implement multi-provider storage configuration with AWS S3, Cloudflare R2, and local filesystem support
* feat: enhance admin file upload handling with local storage provider and improved error logging
* feat: implement cache provider abstraction with Redis and in-memory support
* refactor: reorganize observability plugin structure and enhance health check routes
* refactor: update routing and status code references to use new MagicRouter and plugins structure
* refactor: update ESLint configuration and enhance plugin import paths for better module organization
* refactor: reorganize import paths and add port resolver utility for enhanced server startup
* refactor: improve logging structure in createApp by using child logger for plugin registration
* fix: enable authentication guard for admin dashboard in app initialization
* refactor: update module registration paths and improve user schema structure
* refactor: enhance port availability check by using direct socket connections for improved accuracy (win-fix)
* refactor: update seeder registration paths and enhance error handling in middleware
* chore: add robots.txt to disallow all web crawlers
* feat: add Resend email provider and update email configuration options in .env.sample
* refactor: reorganize static asset paths and enhance HTML file references for improved structure
* feat: implement queue authentication with login page and session management
* feat: add custom CSS and JS injection for BullBoard with logout functionality
* style: update BullBoard layout and theme with improved CSS overrides and reposition logout button
* feat: add logo asset and enhance BullBoard theme with improved CSS structure
* feat: implement TypeScript Backend Toolkit CLI with commands for generating plugins, middleware, modules, and seeders
* feat: enhance CLI with options for seeder and factory generation, and introduce introspection utility for model metadata
* refactor: remove basicParserPlugin and streamline middleware usage in MagicRouter
* chore: update .gitignore to include cursor AI rules
* fix: update module registration path in documentation and correct TypeScript SDK path in VSCode settings
* feat: add basicparserPlugin for enhanced request parsing and middleware integration
* refactor: rename basicparserPlugin to basicParserPlugin for consistency and clarity
* docs: update controller guidelines with ResponseExtended pattern
- Replace successResponse() with typed ResponseExtended helpers
- Add optional chaining for JWT payload (req.user?.sub)
- Document two error handling approaches: typed responses vs thrown errors
- Update examples to use res.ok?.(), res.created?.(), res.notFound?.() patterns
- Remove legacy successResponse() documentation
- Add response type annotations to controller signatures
* docs: update routing guidelines with formidable integration
- Replace multer middleware with formidable integration
- Document multipart route configuration with multipart: true
- Add comprehensive file upload workflow with zFile() and zFiles() helpers
- Include schema validation patterns for file uploads
- Update controller examples to access files via req.body (not req.file)
- Document MIME_GROUPS and file validation options
- Add mixed field (text + files) upload examples
* docs: enhance schema guidelines with response type workflow
- Add complete response schema workflow section
- Document end-to-end type safety from schema to controller
- Update naming conventions: camelCase for schemas, PascalCase for types
- Add router configuration examples with response schemas
- Include controller typing with ResponseExtended
- Document available response builders (R.success, R.paginated, etc.)
- Remove deprecated zod import patterns, enforce named imports
* docs: update service error handling patterns
- Document that services ALWAYS throw errors, controllers decide handling
- Add decision tree for error handling approaches
- Include pattern examples for null returns vs thrown errors
- Document permission errors, validation errors, and business logic failures
- Add guidance on when to return null vs throw errors
- Include unexpected error handling (let bubble up as 500)
* chore: update gitignore for development files
* docs: rewrite README with AI-optimized development focus
- Highlight AI assistant compatibility (Cursor, Windsurf, Claude, ChatGPT)
- Document comprehensive AI agent configuration with .cursor/rules/
- Add AI-optimized workflow examples with CLI commands
- Restructure architecture section to emphasize plugin-based system
- Update key features to include OpenAPI, auth, file upload, queues, realtime
- Add comprehensive documentation links and development commands
- Include production deployment instructions
- Modernize formatting and add contribution guidelines
* docs: developer-first README, highlight Artisan-like CLI, remove emojis
- Clarify intent (beginner→expert) and predictable structure for tools without guesswork
- Highlight auto-generated admin dashboard, OpenAPI docs, plugin system
- Add dedicated CLI section; switch examples to 'pnpm tbk'
- Remove emojis; clean anchors for consistency
- Replace webp logo with png and update references for consistent rendering
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
* docs: update module creation instructions and enhance MongoDB ID validation
- Add recommended command for generating modules using pnpm tbk
- Specify the main app file path for router registration in module creation output
- Introduce zMongoId for improved MongoDB ObjectId validation with customizable error messages
- Update common schema to utilize zMongoId for ID validation
* docs: add CLAUDE.md for comprehensive project guidance
- Introduce CLAUDE.md to provide detailed instructions for using the TypeScript Backend Toolkit
- Outline project overview, common commands, critical architecture patterns, and module structure
- Include guidelines for response schemas, validation with Zod, and error handling
- Document plugin system, session management, and environment configuration
- Emphasize the importance of using the CLI for module creation and maintaining consistency
* docs: update module generation command in CLAUDE.md
- Simplify the command for generating modules by removing the path specification
- Ensure clarity in instructions for scaffolding project files following established patterns
* docs: add create-module and create-seeder commands for module scaffolding
- Introduce create-module.md to guide users in generating a fully-typed module with necessary files and integration steps.
- Add create-seeder.md to assist in creating seeders and factories for populating test data, including registration and execution instructions.
- Update .gitignore to remove the .claude directory from tracking.
* docs: add NEXT_STEPS and SCAFFOLDING_SUMMARY for project progression
- Introduce NEXT_STEPS.md to outline upcoming tasks including documentation and beta testing.
- Add SCAFFOLDING_SUMMARY.md to summarize the completion of Phase 1 and readiness for Phase 2.
- Update pnpm-lock.yaml and pnpm-workspace.yaml for package management consistency.
- Enhance README.md with installation instructions and environment configuration.
- Introduce new files in create-tbk-app package for project scaffolding, including configuration, templates, and utility functions.
* feat: complete Phase 1 and Phase 2 of project scaffolding
- Finalize Phase 1 and Phase 2 Week 1-3 tasks, ensuring all three presets (minimal, standard, full) are functional and generate successfully.
- Extract and templatize approximately 4500 lines of code for improved maintainability.
- Update NEXT_STEPS.md to reflect the completion of major milestones and outline future tasks.
- Introduce new files and templates for admin and authentication modules, enhancing project structure and functionality.
- Remove outdated test-minimal files to streamline the project.
* chore: update package metadata and improve documentation links
- Set author information in package.json for better attribution.
- Add repository, homepage, and bugs URLs to package.json for enhanced project visibility.
- Update README.md with direct links to the main repository, documentation, and issue reporting for user convenience.
- Modify prompts.ts to ensure type safety by casting to 'any'.
- Update config.types.ts to make googleOAuth optional, improving flexibility in project configuration.
- Adjust template.engine.ts to provide a default value for AUTH_GOOGLE_OAUTH, enhancing robustness.
---------
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>1 parent e0c806a commit fdf93cc
File tree
337 files changed
+43099
-2920
lines changed- .claude
- commands
- .cursor
- commands
- rules
- .vscode
- bin
- actions
- utils
- docs
- packages/create-tbk-app
- bin
- src
- constants
- generators
- types
- utils
- templates
- admin/src/plugins/admin
- utils
- auth/src
- middlewares
- modules
- auth
- session
- user
- factories
- seeders
- plugins/auth
- queues
- seeders
- base
- public
- admin
- assets
- images
- scripts
- styles
- queues
- realtime
- src
- app
- common
- config
- extras
- lib
- middlewares
- plugins
- basicParser
- lifecycle
- magic
- observability
- routes
- utils
- bullboard/src/plugins/bullboard
- cache/src/plugins/cache
- email/src
- email
- templates
- lib
- observability/src/modules/healthcheck
- queues
- realtime/src/plugins/realtime
- security/src/plugins/security
- storage/src/lib
- public
- admin
- assets
- images
- scripts
- styles
- queues
- realtime
- scripts
- src
- app
- common
- config
- email
- templates
- extras
- healthcheck
- lib
- middlewares
- modules
- auth
- session
- blog
- factories
- seeders
- healthcheck
- upload
- user
- factories
- seeders
- openapi
- plugins
- admin
- utils
- auth
- basicparser
- bullboard
- cache
- lifecycle
- magic
- observability
- realtime
- security
- queues
- routes
- seeders
- upload
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
337 files changed
+43099
-2920
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
0 commit comments