Skip to content

ombima56/netfix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

155 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetFix

NetFix Logo

Django Python SQLite License

Table of Contents

Overview

NetFix is a comprehensive home services platform built with Django that connects customers with service providers. Whether you need electrical work, plumbing, housekeeping, or any other home service, NetFix provides a seamless platform to find and request professional services.

The platform supports two types of users:

  • Companies: Service providers who can create and manage their service offerings
  • Customers: Users who can browse and request services from registered companies

Features

For Companies

  • Service Management: Create, edit, and manage service offerings
  • Request Management: View and manage incoming service requests
  • Profile Management: Maintain company profile and service portfolio
  • Field Specialization: Specialize in specific service categories or offer "All in One" services
  • Real-time Notifications: Get notified of new service requests

For Customers

  • Service Discovery: Browse services by category, price, or popularity
  • Service Requests: Request services with detailed requirements
  • Cost Estimation: Real-time cost calculation based on estimated hours
  • Request History: Track all previous service requests
  • Profile Management: Manage personal information and preferences

Technology Stack

Backend

  • Framework: Django 3.1.14
  • Language: Python 3.8+
  • Database: SQLite (development)
  • Authentication: Django's built-in authentication system
  • Admin Interface: Django Admin for backend management

Frontend

  • Templates: Django Templates with custom template tags
  • Styling: Custom CSS with modern design principles
  • JavaScript: Vanilla JavaScript for interactive features
  • Responsive Design: Mobile-first approach with CSS Grid and Flexbox

Development Tools

  • Virtual Environment: Python venv for dependency isolation
  • Static Files: Django's static file handling
  • Forms: Django Forms with custom validation
  • URL Routing: Django's URL dispatcher

Project Structure

netfix/
├── manage.py                 # Django management script
├── requirements.txt          # Python dependencies
├── db.sqlite3               # SQLite database (development)
├── static/                  # Static files (CSS, JS, images)
│   └── css/
│       ├── style.css        # Main stylesheet
│       └── logo.png         # Application logo
├── netfix/                  # Main project configuration
│   ├── __init__.py
│   ├── settings.py          # Django settings
│   ├── urls.py              # Main URL configuration
│   ├── views.py             # Project-level views
│   └── wsgi.py              # WSGI configuration
├── main/                    # Main app (home, navigation)
│   ├── models.py
│   ├── views.py
│   ├── urls.py
│   └── templates/
│       └── main/
│           ├── base.html    # Base template
│           ├── home.html    # Homepage
│           └── navbar.html  # Navigation component
├── users/                   # User management app
│   ├── models.py            # User, Company, Customer models
│   ├── views.py             # Authentication and profile views
│   ├── forms.py             # User registration and login forms
│   ├── urls.py
│   ├── admin.py
│   └── templates/
│       └── users/
│           ├── login.html
│           ├── register.html
│           ├── register_company.html
│           ├── register_customer.html
│           ├── customer_profile.html
│           └── company_profile.html
└── services/                # Services management app
    ├── models.py            # Service and RequestedService models
    ├── views.py             # Service CRUD and request handling
    ├── forms.py             # Service creation and request forms
    ├── urls.py
    ├── admin.py
    └── templates/
        └── services/
            ├── list.html
            ├── create.html
            ├── single_service.html
            ├── request_service.html
            ├── field.html
            └── most_requested.html

Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)
  • Git (for cloning the repository)

Step-by-Step Setup

  1. Clone the Repository

    git clone https://github.com/ombima56/netfix.git
    cd netfix
  2. Create Virtual Environment

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Database Setup

    python manage.py makemigrations
    python manage.py migrate
  5. Create Superuser (Optional)

    python manage.py createsuperuser
  6. Collect Static Files

    python manage.py collectstatic
  7. Run Development Server

    python manage.py runserver
  8. Access the Application

    • Open your browser and navigate to http://127.0.0.1:8000
    • Admin panel: http://127.0.0.1:8000/admin

Requirements.txt

Django==3.1.14
Pillow==8.3.2
python-decouple==3.4

Usage

For New Users

  1. Registration

    • Visit the homepage and click "Register"
    • Choose between "Customer" or "Company" registration
    • Fill in the required information
    • Verify your email (if email verification is enabled)
  2. Login

    • Use your username/email and password to log in
    • Access your dashboard based on your user type

For Companies

  1. Create Services

    • Navigate to "Create Service" from your dashboard
    • Fill in service details (name, description, price per hour, category)
    • Submit to make your service available to customers
  2. Manage Requests

    • View incoming service requests in your dashboard
    • Accept or decline requests
    • Communicate with customers about service details

For Customers

  1. Browse Services

    • Explore services by category or search
    • View service details and company profiles
    • Compare prices and ratings
  2. Request Services

    • Select a service you need
    • Fill in the request form with address and estimated hours
    • Submit your request and wait for company response

API Endpoints

Authentication

  • GET /login/ - Login page
  • POST /login/ - Process login
  • GET /register/ - Registration options
  • GET /register/customer/ - Customer registration
  • POST /register/customer/ - Process customer registration
  • GET /register/company/ - Company registration
  • POST /register/company/ - Process company registration
  • GET /logout/ - Logout user

Services

  • GET /services/ - List all services
  • GET /services/create/ - Create service form (companies only)
  • POST /services/create/ - Process service creation
  • GET /services/<id>/ - Service detail page
  • GET /services/<id>/request/ - Request service form
  • POST /services/<id>/request/ - Process service request
  • GET /services/field/<field>/ - Services by category
  • GET /services/most-requested/ - Most requested services

User Profiles

  • GET /customer/<username>/ - Customer profile
  • GET /company/<username>/ - Company profile
  • GET /company/requests/ - Company's received requests (companies only)

Admin

  • GET /admin/ - Django admin interface

User Roles

Customer Role

  • Registration: Simple registration with username, email, password, and optional birth date
  • Service Discovery: Browse all available services with filtering and sorting options
  • Service Requests: Submit detailed service requests with address and time estimates
  • Profile Management: View and edit personal information
  • Request History: Track all submitted service requests and their status
  • Cost Calculation: Real-time cost estimation based on service hourly rates

Company Role

  • Registration: Registration with company-specific information and field specialization
  • Service Management: Create, edit, and delete service offerings
  • Request Management: View and respond to incoming service requests
  • Profile Management: Maintain company profile and service portfolio
  • Field Restrictions: Limited to services within their specialization (except "All in One" companies)
  • Dashboard: Comprehensive view of all company services and requests

Admin Role

  • User Management: Manage all users, companies, and customers
  • Service Oversight: Monitor and manage all services on the platform
  • Request Monitoring: View all service requests across the platform
  • Data Analytics: Access to platform usage statistics and reports

Service Categories

The platform supports the following service categories:

  1. Air Conditioner - AC installation, repair, and maintenance
  2. Carpentry - Furniture making, repairs, and custom woodwork
  3. Electricity - Electrical installations, repairs, and maintenance
  4. Gardening - Landscaping, plant care, and garden maintenance
  5. Home Machines - Appliance repair and maintenance
  6. Housekeeping - Cleaning services and home organization
  7. Interior Design - Home decoration and space planning
  8. Locks - Lock installation, repair, and security services
  9. Painting - Interior and exterior painting services
  10. Plumbing - Pipe installation, repairs, and maintenance
  11. Water Heaters - Water heater installation and repair
  12. All in One - Companies that can provide services across all categories

Field Restrictions

  • Companies can only create services within their registered field of work
  • Exception: "All in One" companies can create services in any category
  • Services cannot be categorized as "All in One" (only companies can have this designation)

Development

Setting Up Development Environment

  1. Fork and Clone

    git fork https://github.com/original-repo/netfix.git
    git clone https://github.com/yourusername/netfix.git
    cd netfix
  2. Install Development Dependencies

    pip install -r requirements-dev.txt
  3. Environment Variables Create a .env file in the project root:

    DEBUG=True
    SECRET_KEY=your-secret-key-here
    DATABASE_URL=sqlite:///db.sqlite3
  4. Pre-commit Hooks (Optional)

    pip install pre-commit
    pre-commit install

Code Style and Standards

  • Python: Follow PEP 8 guidelines
  • Django: Follow Django coding style
  • HTML/CSS: Use semantic HTML and modern CSS practices
  • JavaScript: Use ES6+ features where appropriate
  • Comments: Document complex logic and business rules

Database Migrations

When making model changes:

python manage.py makemigrations
python manage.py migrate

Static Files Development

For CSS/JS changes:

python manage.py collectstatic --noinput

Common Django Commands

# Create new app
python manage.py startapp appname

# Shell access
python manage.py shell

# Database shell
python manage.py dbshell

# Check for issues
python manage.py check

# Show migrations
python manage.py showmigrations

Testing

Running Tests

# Run all tests
python manage.py test

# Run specific app tests
python manage.py test users
python manage.py test services

# Run with coverage
coverage run --source='.' manage.py test
coverage report
coverage html

Test Structure

tests/
├── test_models.py      # Model tests
├── test_views.py       # View tests
├── test_forms.py       # Form tests
└── test_utils.py       # Utility function tests

Contributing

We welcome contributions to NetFix! Please follow these guidelines:

Getting Started

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

Contribution Guidelines

  • Code Quality: Ensure your code follows the project's coding standards
  • Testing: Add tests for new features and bug fixes
  • Documentation: Update documentation for any new features
  • Commit Messages: Use clear, descriptive commit messages
  • Pull Requests: Provide detailed descriptions of changes

Areas for Contribution

  • Bug Fixes: Help identify and fix bugs
  • New Features: Implement new functionality
  • UI/UX Improvements: Enhance the user interface and experience
  • Performance: Optimize database queries and page load times
  • Documentation: Improve and expand documentation
  • Testing: Increase test coverage

License

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

Support

For support and questions:

Acknowledgments

  • Django community for the excellent framework
  • Contributors who have helped improve this project
  • Open source libraries and tools used in this project

© 2025 NetFix. All rights reserved.

About

NetFix is a comprehensive home services platform built with Django that connects customers with service providers. Whether you need electrical work, plumbing, housekeeping, or any other home service, NetFix provides a seamless platform to find and request professional services.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors