Firebase account and authentication route modules for @aegisjsproject/router
This project provides modular, event-driven authentication and account management routes for web applications using Firebase and @aegisjsproject/router. It enables seamless integration of sign-in, sign-up, password reset, email verification, and profile management features, with each route implemented as a separate, dynamically loaded module.
- Modular Routing: Each account-related route (sign-in, sign-up, reset-password, verify-email, verify-reset, profile) is a standalone ES module, loaded on demand.
- Event-Driven Architecture: Custom events are dispatched for account actions, enabling flexible cross-component communication.
- Firebase Integration: Uses Firebase JS SDK for authentication flows. Modules preload required Firebase packages for optimal performance.
- UI Rendering: Uses tagged template literals (
html) for declarative UI construction.
- The main entry (
main.js) dispatches requests to the correct route module based on the requested page, using theROUTESmap fromconsts.js. - Route modules handle their own UI, event registration, and Firebase logic.
- Events and navigation are managed via
@aegisjsproject/routerand@aegisjsproject/callback-registry.
- Lint:
npm run lint:js(ESLint, config in.github/linters/.eslintrc.yml) - Test:
npm run test(runs lint and Node.js tests) - Start Dev Server:
npm start(uses@shgysk8zer0/http-server) - Versioning:
npm run version:bump[:patch|:minor|:major]
main.js: Central route dispatcher and title resolverconsts.js: Route metadata and event namesauth.js,profile.js,sign-in.js,sign-up.js,reset-password.js,verify-email.js,verify-reset.js: Route logicutils.js: User sanitization and module preloadingevents.js: Event helpers