This is a Next.js application for managing apartment stays and tenants.
First, install the dependencies:
npm install
Then, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
The project is organized as follows:
src/app
: Contains the frontend pages of the application.src/api
: Contains the backend of the application, including use cases, domain entities, repositories, and controllers.src/components
: Contains reusable UI components.src/hooks
: Contains custom React hooks.src/lib
: Contains utility functions, constants, and environment variable handling.src/modules
: Contains the different modules of the application, such as admin and stay.public
: Contains static assets, such as images.
- Next.js - React framework for building full-stack applications.
- TypeScript - Typed superset of JavaScript.
- Tailwind CSS - Utility-first CSS framework.
- Radix UI - Unstyled, accessible UI components.
- Lucide React - Icon library.
- Firebase - Platform for building web and mobile applications.
- Zod - TypeScript-first schema validation library.
- Axios - Promise-based HTTP client for the browser and node.js.
- ESLint - Pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.
In the project directory, you can run:
npm run dev
: Runs the app in the development mode.npm run build
: Builds the app for production to the.next
folder.npm run start
: Starts a Next.js production server.npm run lint
: Runs ESLint to check for linting errors.
The API endpoints are defined in the src/app/api
directory.
POST /api/stay/create
: Creates a new stay.GET /api/stay/[id]
: Retrieves a stay by its ID.POST /api/tenant/create
: Creates a new tenant.GET /api/tenant/list
: Retrieves a list of tenants.