A composable foundation for rental marketplace innovation
This codebase bootstraps a production-ready architecture with shared design tokens, Firebase integrations, and batteries-included testing so teams can focus on delivering features.
Architecture
Repositories mediate data access, services own business logic, and React components render state. Each feature owns its slice and exposes clear boundaries.
Firebase Integration
Firestore, Storage, Authentication, and Pub/Sub initialize once and automatically connect to emulators while running locally.
Testing
Unit tests rely on Jest + Testing Library, while Playwright orchestrates end-to-end scenarios against the Firebase emulator suite.
Layered by design
Features reside in src/features, services and repositories live under src/core, and shared UI primitives stay in src/components/ui. This keeps dependencies flowing inward and prevents tight coupling.
Create new features with their own repositories, services, and presentation directories to maintain consistent boundaries.
Firebase ready for local-first development
- SDK initialization is centralized under
src/core/firebase, reusing apps across renders. - Emulator ports are configurable through
.env.localor rely on sane defaults. - Pub/Sub is exposed via the Firebase Admin SDK and respects the emulator host when enabled.
Cloud resources, local workflows
Deployments target Firebase Hosting with Firestore, Auth, Storage, and Pub/Sub. Local development mirrors production thanks to the emulator suite and thoughtful defaults.
The .env.example file contains all required configuration keys. Duplicate it as .env.local to get started.
Emulator orchestration scripts live in the package.json scripts section and will be expanded as features grow.
Test everything, everywhere
Jest covers unit and integration scenarios with lightweight Firebase mocks, while Playwright automates user journeys against the emulator-backed Next.js app.
Continuous integration will execute both suites to guarantee confidence before deploying to Firebase Hosting.
How to contribute
- Sync environment variables from
.env.example. - Run
npm run devto boot Next.js and Firebase emulators. - Develop features within their dedicated
src/features/*folder. - Cover changes with Jest and Playwright tests before opening a pull request.