How konnn04/rent-house-app works
Project Type and Purpose
• This is a full-stack “Rent House” application comprising:
• A mobile frontend built with React Native (Expo)
• A backend REST API built with Django & Django REST Framework
• A relational database (MySQL/PostgreSQL)
• Cloudinary for image storage, OAuth2 for authentication, email notifications, chat, reporting, and an admin console
File-Structure Analysis
• Top level:
• rent_house/ → React Native app
• rent_house_server/ → Django backend
• Frontend folders:
• components/ (UI organized by feature & screen)
• services/ (API wrappers using Axios)
• contexts/, hooks/, utils/, constants/, styles/, assets/
• Backend folders (rent_house_server/rent_house/):
• models/, serializers/, views/ (REST endpoints)
• admin/ (Django admin configuration)
• templates/, static/ (admin UI & email templates)
• management/commands/ (data seeding, OAuth app creation)
• Deployment scripts: buildspec.yml, appspec.yml, CI/CD hooks, shell scripts
Key Architecture Insights from README
• Frontend communicates over HTTP(s) to backend OAuth-protected endpoints
• Backend handles user roles (owner/tenant), chat, notifications, reporting
• External integrations: Cloudinary (images), SMTP (email), OAuth2 toolkit
• Admin console is part of the Django app
Main Components
a. Mobile Client (React Native/Expo)
• UI Screens & Navigation (AuthStack, Main TabScreens)
• State management (Redux or Contexts)
• API layer (services/*.js via Axios/AsyncStorage)
b. API Gateway (Django REST Framework)
• Authentication (OAuth2 endpoints)
• Business logic in views/serializers/services
• Django admin interface
c. Database
• User, House, Chat, Post, Rate, Comment tables
d. Cloudinary
• Image upload & thumbnail generation
e. Email/Notifications
• SMTP server for emails (reset password, verify email, new house alerts)
• Push notifications (Firebase credentials present)
f. External Services
• OAuth2 provider (Django OAuth Toolkit)
• Optional Telegram for alerts
Relationships and Interactions
• Mobile client → REST API calls (login, fetch listings, chat, post)
• API → Database CRUD via Django ORM
• API → Cloudinary for media storage
• API → SMTP for transactional emails
• API → Notification Service (push)
• Admin user → Django admin UI → interacts with the same API/database
Architectural Patterns and Principles
• Separation of concerns: UI vs services vs data vs business logic
• RESTful API design with token-based OAuth2 authentication
• Modular React Native components by feature
• Django app structured by model-view-serializer-service
• Management commands for data population and setup