This is a business website template for a company built using React 18 (with TypeScript 4), Material UI 5, Django 4, and Django REST Framework 3.
- Prerequisites
- Installation
- Running the application
- Running the tests
- Adding data to the application
- Customizing the application
- Copyright and License
Install the following prerequisites:
- Python 3.8-3.11
This project uses Django v4.2.4. For Django to work, you must install a correct version of Python on your machine. More information here. - Node.js
- Visual Studio Code
From the root directory, run:
cd backend
python -m venv venv
From the backend directory, run:
On macOS:
source venv/bin/activate
On Windows:
venv\scripts\activate
From the backend directory, run:
pip install -r requirements.txt
From the backend directory, run:
python manage.py makemigrations
python manage.py migrate
From the backend directory, run:
python manage.py createsuperuser
When prompted, enter a username, email, and password.
From the root directory, run:
cd frontend
npm install
To run the application, you need to have both the backend and the frontend up and running.
From the backend directory, run:
python manage.py runserver
From the frontend directory, run:
npm start
Go to http://localhost:3000/ to view the application.
From the backend directory, run:
python manage.py test --pattern="tests.py"
From the frontend directory, run:
npm run test
Add data through Django Admin.
Go to http://127.0.0.1:8000/admin to access the Django Admin interface and # using the admin credentials.
This section describes how to customize the application.
To modify the title and subtitle of the Products section, make changes in the frontend/src/components/Products.tsx
file.
To modify the title and subtitle of the Services section, make changes in the frontend/src/components/Services.tsx
file.
To modify the title and subtitle of the # section, make changes in the frontend/src/components/#.tsx
file.
To modify the title and subtitle of the About section, make changes in the frontend/src/components/About.tsx
file.
To modify the title and subtitle of the Contact section, make changes in the frontend/src/components/Contact.tsx
file.
To modify the colors in the application, make changes in the frontend/src/theme/palette.ts
file.
To modify the fonts in the application, first, add a new font to the frontend/public/index.html
file, and then make changes in the frontend/src/theme/theme.ts
file.
To modify the logo in the application, make changes in the frontend/src/layout/Header.tsx
and frontend/src/layout/Sidebar.tsx
files.
To modify the two buttons in the Hero section, make changes in the frontend/src/components/HeroButtons.tsx
file.
Copyright © 2022 Bob's Programming Academy. Code released under the MIT license.