https://github.com/ntfelix/rms
Die zentrale Plattform für die Verwaltung von Mieteingängen, Mietern, Wohnungen und die einfache Erstellung von Betriebskostenabrechnungen
https://github.com/ntfelix/rms
cloudflare cloudflare-pages cloudflare-workers nextjs posthog stripe supabase typescript
Last synced: 16 days ago
JSON representation
Die zentrale Plattform für die Verwaltung von Mieteingängen, Mietern, Wohnungen und die einfache Erstellung von Betriebskostenabrechnungen
- Host: GitHub
- URL: https://github.com/ntfelix/rms
- Owner: NtFelix
- Created: 2024-07-19T18:34:35.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-02-28T00:14:57.000Z (3 months ago)
- Last Synced: 2026-02-28T06:39:38.966Z (3 months ago)
- Topics: cloudflare, cloudflare-pages, cloudflare-workers, nextjs, posthog, stripe, supabase, typescript
- Language: TypeScript
- Homepage: https://mietevo.de/
- Size: 24.2 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 86
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Mietevo - Property Management System
Mietevo is a comprehensive property management SaaS application tailored for the German market. It provides tools for managing tenants (Mieter), apartments (Wohnungen), houses (Häuser), finances (Finanzen), and operating costs (Betriebskosten).
## Tech Stack
The application is built with a modern stack emphasizing performance, type safety, and developer experience:
- **Framework:** [Next.js 15 (App Router)](https://nextjs.org/)
- **Language:** [TypeScript](https://www.typescriptlang.org/) (Strict mode)
- **Frontend:** [React 18](https://react.dev/), [Tailwind CSS](https://tailwindcss.com/), [Shadcn/ui](https://ui.shadcn.com/)
- **Backend / Database:** [Supabase](https://supabase.com/) (PostgreSQL, Auth, Realtime, Storage)
- **State Management:** [Zustand](https://github.com/pmndrs/zustand)
- **Validation:** [Zod](https://zod.dev/)
- **Payments:** [Stripe](https://stripe.com/)
- **Analytics:** [PostHog](https://posthog.com/)
- **Testing:** [Jest](https://jestjs.io/), [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/), [Playwright](https://playwright.dev/)
## Prerequisites
- Node.js (v20 or higher recommended)
- npm
## Installation
1. Clone the repository:
```bash
git clone
cd mietevo
```
2. Install dependencies:
```bash
npm install
```
## Environment Variables
Create a `.env.local` file in the root directory. You will need credentials for Supabase, Stripe, and PostHog.
```env
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Stripe
STRIPE_SECRET_KEY=your_stripe_secret_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_WEBHOOK_SIGNING_SECRET=your_stripe_webhook_signing_secret
# PostHog (Analytics)
NEXT_PUBLIC_POSTHOG_KEY=phc_your_public_project_key
NEXT_PUBLIC_POSTHOG_HOST=/assets/v2
NEXT_PUBLIC_POSTHOG_UI_HOST=https://eu.posthog.com
POSTHOG_API_KEY=phc_your_server_project_key
POSTHOG_HOST=https://eu.i.posthog.com
POSTHOG_PERSONAL_API_KEY=phx_your_personal_api_key
# Optional: force the route-handler proxy if edge rewrites fail
# POSTHOG_PROXY_MODE=route
```
## Running the Application
Start the development server:
```bash
npm run dev
```
The application will be available at `http://localhost:3000`.
## Scripts
- `npm run dev`: Starts the development server with TurboPack.
- `npm run build`: Builds the application for production.
- `npm start`: Starts the production server.
- `npm run lint`: Runs ESLint to check for code quality issues.
- `npm test`: Runs the Jest test suite.
## Project Structure
- **`app/`**: Next.js App Router directory. Contains pages, layouts, and API routes.
- `app/(dashboard)`: Protected dashboard routes.
- `app/[entity]-actions.ts`: Server Actions for business logic (e.g., `mieter-actions.ts`).
- **`components/`**: Reusable React components.
- `components/ui/`: Shadcn/ui primitives.
- **`lib/`**: Backend utilities and service configurations (Supabase, Stripe).
- **`utils/`**: General utility functions (calculations, formatting).
- **`types/`**: TypeScript type definitions.
- `types/supabase.ts`: Generated database types.
- **`supabase/`**: Database migrations and configuration.
- **`public/`**: Static assets.
## Architecture & Conventions
### Server vs. Client Components
The application leverages Next.js Server Components for data fetching and initial rendering. Client Components (`'use client'`) are used for interactive elements.
### Server Actions
Data mutations (Create, Update, Delete) are handled via Server Actions located in `app/[entity]-actions.ts` files. These actions handle validation, database interaction, and revalidation.
### Database & Domain Language
While the code and documentation are in English, the database schema and business logic concepts use **German** terminology to match the domain:
- `Mieter` (Tenant)
- `Wohnung` (Apartment)
- `Haus` (House)
- `Betriebskosten` (Operating Costs)
### Deployment
The project is containerized using **Docker** and deployed to **Google Cloud Run**.
- **CI/CD:** GitHub Actions handles building the Docker image, pushing it to **Artifact Registry**, and deploying preview environments for pull requests.
- **Production:** The `main` branch is automatically deployed to production upon passing CI checks.
### Docker Support
You can build and run the application locally using Docker:
```bash
# Build the image
docker build -t mietevo .
# Run the container
docker run -p 3000:3000 --env-file .env.local mietevo
```
## Testing
The project maintains a comprehensive test suite.
- **Unit & Integration Tests**: Run via Jest.
```bash
npm test
```
- **Frontend Verification**: Playwright scripts are used for end-to-end verification.
## License
Private