Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProjectCare

A full-stack application with Django backend and React frontend.

Project Structure

ProjectCare/
├── backend/          # Django backend
│   ├── projectcare/  # Django project settings
│   ├── api/          # API app
│   ├── customer/     # Customer app
│   └── manage.py
└── frontend/         # React + Vite frontend
    └── src/
        ├── components/
        └── pages/

Setup Instructions

Backend Setup

  1. Navigate to the backend directory:
cd backend
  1. Create a virtual environment (recommended):
python -m venv venv
  1. Activate the virtual environment:

    • Windows: venv\Scripts\activate
    • Linux/Mac: source venv/bin/activate
  2. Install dependencies:

pip install -r requirements.txt
  1. Run migrations:
python manage.py migrate
  1. Create admin superuser:
python create_admin.py

This creates an admin user with:

  • Username: admin
  • Password: admin123
  • Email: admin@projectcare.com
  1. Start the Django development server:
python manage.py runserver

The backend will be available at: http://localhost:8000

Frontend Setup

  1. Navigate to the frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev

The frontend will be available at: http://localhost:5173

Local Testing Links

Features

Backend

  • Django REST Framework
  • CORS enabled for local development
  • Sample API endpoints
  • SQLite database (for local testing)
  • Customer app with PhoneNumberField support
  • Pillow for image handling
  • Customized admin interface (Customer Administration)

Frontend

  • React 18 with Hooks (useState, useEffect)
  • React Router for navigation
  • Vite for fast development
  • 3 sample pages/templates:
    • Home (with counter example)
    • About (with toggle example)
    • Sample Data (fetches from Django API)

API Endpoints

  • GET /api/health/ - Health check endpoint
  • GET /api/sample/ - Returns sample data

Development Notes

  • Both servers need to be running simultaneously for full functionality
  • The frontend is configured to proxy API requests to the backend
  • CORS is configured to allow requests from localhost:5173

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages