Skip to content

A property management system with real-time maintenance tracking, digital lease management, and payment processing. Built with Next.js, TypeScript, Prisma, PostgreSQL, TailwindCSS, and Stripe integration. Features RBAC, automated notifications, and responsive dashboard.

License

Notifications You must be signed in to change notification settings

t1m41n4/NyumbaGrid

Repository files navigation

NyumbaGrid - Property Management System

NyumbaGrid is a comprehensive property management system built with Next.js, Prisma, and TypeScript, designed to streamline rental property management.

Note

🚧 Project Status: Active Development 🚧

This project is currently under active development. Current working features:

  • ✅ User Authentication (Login/Register)
  • ✅ Role-Based Access (Landlord/Tenant separation)
  • ✅ Property Creation (Basic functionality)

In Development:

  • 🚧 Maintenance Request System
  • 🚧 Payment Integration
  • 🚧 Document Management
  • 🚧 Announcements & Polling
  • 🚧 Calendar & Events
  • 🚧 Real-time Notifications

Feel free to:

  • Watch the repository for updates
  • Submit feature requests
  • Report bugs
  • Contribute to development

🚀 Features

  • User Authentication & Authorization (Landlords/Tenants)
  • Property & Unit Management
  • Maintenance Request System
  • Payment Tracking
  • Announcements & Polling System
  • Document Management
  • Calendar & Event Management
  • Real-time Notifications
  • Responsive Dashboard

🛠 Tech Stack

  • Frontend: Next.js 15+, React 18, TypeScript
  • Styling: Tailwind CSS, Radix UI
  • Backend: Next.js API Routes
  • Database: PostgreSQL with Prisma ORM
  • Authentication: NextAuth.js
  • Email: SMTP/Gmail Integration
  • Payments: Stripe Integration (Optional)
  • Hosting: Vercel (Recommended)

📋 Prerequisites

  • Node.js 18+ (Required for Next.js 15)
  • PostgreSQL Database or Supabase account (Currently configured for Supabase)
  • npm (v9+) or yarn (v1.22+)
  • Git (v2.3+)
  • An email account for SMTP (Gmail recommended)
  • Stripe account (Optional - for payment features)

🚀 Getting Started

  1. Clone the repository

    git clone https://github.com/yourusername/NyumbaGrid.git
    cd NyumbaGrid
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.template .env

    Fill in the required variables in .env:

    • Database URLs (POSTGRES_PRISMA_URL, POSTGRES_URL_NON_POOLING)
    • Auth secrets (NEXTAUTH_SECRET, JWT_SECRET_KEY)
    • SMTP settings for email
    • Stripe keys (optional)
  4. Set up the database

    # Generate Prisma client
    npm run db:generate
    
    # Run migrations
    npm run db:migrate:dev
    
    # Seed the database (optional)
    npm run db:seed
  5. Start the development server

    npm run dev

    Visit http://localhost:3000 to see the application.

📝 Environment Variables

Essential variables needed in your .env file:

# Database URLs (Required)
POSTGRES_PRISMA_URL="postgres://user:password@host:port/database"
POSTGRES_URL_NON_POOLING="postgres://user:password@host:port/database"

# Auth Configuration (Required)
NEXTAUTH_SECRET="your-secret-key"
NEXTAUTH_URL="http://localhost:3000"
JWT_SECRET_KEY="your-jwt-secret"

# Email Configuration (Required)
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="[email protected]"
SMTP_PASSWORD="your-app-specific-password"
EMAIL_FROM="[email protected]"

# Stripe Configuration (Optional)
STRIPE_PUBLISHABLE_KEY="your-publishable-key"
STRIPE_SECRET_KEY="your-secret-key"

🏗 Project Structure

NyumbaGrid/
├── app/                  # Next.js app directory
│   ├── api/              # API routes
│   ├── auth/             # Authentication pages
│   └── dashboard/        # Dashboard pages
├── components/           # React components
├── lib/                  # Utility functions
├── prisma/               # Database schema and migrations
└── public/               # Static files

🛠 Available Scripts

# Development
npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server

# Database
npm run db:generate  # Generate Prisma client
npm run db:migrate:dev # Run migrations
npm run db:seed      # Seed the database
npm run db:reset     # Reset the database

# Deployment
npm run vercel-build # Build for Vercel deployment

🌐 Deployment

  1. Set up a PostgreSQL database (Supabase recommended)
  2. Configure environment variables in your hosting platform
  3. Deploy using the Vercel Deploy Button or your preferred hosting

Deploy with Vercel

📄 License

This project is licensed under the MIT License with Commons Clause - see the LICENSE file for details.

What this means:

✅ You CAN:

  • Use this code for personal projects
  • Use this code for internal business operations
  • Modify the code for your own use
  • Study and learn from the code
  • Contribute improvements back to this project

❌ You CANNOT:

  • Sell this software as-is
  • Sell modified versions of this software
  • Include this software in a commercial product without permission
  • Remove the copyright notices
  • Use the project's name "NyumbaGrid" for your redistributions

To use this project in ways not permitted by the license, please contact the author for a commercial license.

Attribution Required

If you use this software, you must:

  1. Keep the copyright notice in the code
  2. Include a link to the original repository
  3. Mention "Based on NyumbaGrid by Tim Maina" in your documentation

For commercial licensing inquiries, please contact:

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A property management system with real-time maintenance tracking, digital lease management, and payment processing. Built with Next.js, TypeScript, Prisma, PostgreSQL, TailwindCSS, and Stripe integration. Features RBAC, automated notifications, and responsive dashboard.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages