-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add detailed project documentation and setup guide for Dandelioβ¦
β¦n Salon app - Updated project structure and dependencies in README with setup steps, schema, and environment configurations. - Included PostgreSQL schema setup and example service, user, and appointment entries. - Added detailed tech stack, deployment instructions, and project structure for easier onboarding. - Documented project features and live demo link.
- Loading branch information
1 parent
04a0ee3
commit b84fdbd
Showing
1 changed file
with
381 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,382 @@ | ||
// path: src/components/Projects.tsx | ||
import React from 'react'; | ||
import ProjectCard from './ProjectCard'; | ||
/*# Dandelion Salon Application | ||
A web application for managing salon appointments and services. Made with Django. | ||
## Features | ||
- Make appointments | ||
- Create user accounts with email online | ||
- View hair styles and services | ||
- Online payment processing | ||
- Admin dashboard for salon management | ||
## Live Demo | ||
Visit the live application at: https://madeleinecoiffure.herokuapp.com/ | ||
## Tech Stack | ||
- Django 3.2.5 | ||
- Python 3.9 | ||
- PostgreSQL (via Heroku) | ||
- HTML/CSS/JavaScript | ||
- Heroku for deployment | ||
## Setup | ||
1. Clone the repository | ||
```bash | ||
git clone [repository-url] | ||
``` | ||
2. Create and activate virtual environment | ||
```bash | ||
python -m venv env | ||
# Activate it (Mac specific) | ||
source env/bin/activate | ||
``` | ||
3. Install dependencies | ||
```bash | ||
pip install -r requirements.txt | ||
python3 manage.py makemigrations | ||
python3 manage.py migrate | ||
python3 manage.py collectstatic | ||
python3 manage.py createsuperuser | ||
python3 manage.py runserver | ||
``` | ||
4. Set up environment variables | ||
```bash | ||
cp .env.example .env | ||
# Edit .env with your configurations | ||
``` | ||
======= | ||
psql -v [email protected] -v DB_ADMIN_PASSWORD=yourpassword -v DB_ADMIN_USERNAME=yourusername -f init.sql | ||
# Edit .env with your configurations | ||
``` | ||
## Database Setup | ||
### PostgreSQL Schema | ||
To set up the PostgreSQL database for the Madeleine Salon de Coiffure booking system: | ||
# Create the database | ||
```` | ||
brew list | grep postgresql | ||
postgres --version | ||
brew install postgresql@14 | ||
brew services start postgresql@14 | ||
createdb salon_app | ||
createuser -s $(whoami) | ||
createdb salon_app | ||
psql -l | ||
psql salon_app | ||
touch schema.sql | ||
code schema.sql | ||
``` | ||
psql salon_app < schema.sql // After adding the below to the schema.sql file run this command | ||
Add the following to the schema.sql file: | ||
```sql | ||
-- Create Users table | ||
CREATE TABLE users ( | ||
id SERIAL PRIMARY KEY, | ||
username VARCHAR(100) NOT NULL UNIQUE, | ||
email VARCHAR(255) NOT NULL UNIQUE, | ||
password VARCHAR(255) NOT NULL, | ||
is_active BOOLEAN DEFAULT true, | ||
date_joined TIMESTAMP DEFAULT CURRENT_TIMESTAMP | ||
); | ||
-- Create Services table | ||
CREATE TABLE services ( | ||
id SERIAL PRIMARY KEY, | ||
name VARCHAR(100) NOT NULL, | ||
description TEXT, | ||
duration INTEGER NOT NULL, -- Duration in minutes | ||
price DECIMAL(10,2) NOT NULL, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP | ||
); | ||
-- Create Appointments table | ||
CREATE TABLE appointments ( | ||
id SERIAL PRIMARY KEY, | ||
user_id INTEGER REFERENCES users(id), | ||
service_id INTEGER REFERENCES services(id), | ||
firstname VARCHAR(100) NOT NULL, | ||
lastname VARCHAR(100) NOT NULL, | ||
email VARCHAR(255) NOT NULL, | ||
telephone VARCHAR(20), | ||
appointment_time TIMESTAMP NOT NULL, | ||
status VARCHAR(20) DEFAULT 'scheduled', -- scheduled, completed, cancelled | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP | ||
); | ||
-- Insert sample services | ||
INSERT INTO services (name, description, duration, price) VALUES | ||
('Haircut', 'Basic haircut and styling', 60, 50.00), | ||
('Color', 'Full hair coloring', 120, 120.00), | ||
('Highlights', 'Partial or full highlights', 90, 100.00), | ||
('Blowout', 'Wash and blowout styling', 45, 40.00), | ||
('Treatment', 'Deep conditioning treatment', 30, 35.00); | ||
-- Insert sample user | ||
INSERT INTO users (username, email, password) VALUES | ||
('madeleine', '[email protected]', 'hashed_password_here'); | ||
-- Insert sample appointments | ||
INSERT INTO appointments ( | ||
user_id, | ||
service_id, | ||
firstname, | ||
lastname, | ||
email, | ||
telephone, | ||
appointment_time | ||
) VALUES | ||
(1, 1, 'Jane', 'Doe', '[email protected]', '123-456-7890', '2024-03-20 10:00:00'), | ||
(1, 2, 'Mary', 'Smith', '[email protected]', '123-456-7891', '2024-03-20 14:00:00'); | ||
``` | ||
### Database Setup Instructions | ||
1. Create the database in PostgreSQL: | ||
```bash | ||
createdb salon_app | ||
``` | ||
2. Apply the schema: | ||
```bash | ||
psql salon_app < schema.sql | ||
``` | ||
3. Update your Django settings.py DATABASE configuration: | ||
```python | ||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.postgresql', | ||
'NAME': 'salon_app', | ||
'USER': 'your_username', | ||
'PASSWORD': 'your_password', | ||
'HOST': 'localhost', | ||
'PORT': '5432', | ||
} | ||
} | ||
``` | ||
Then apply the schema: | ||
```` | ||
psql salon_app < schema.sql | ||
``` | ||
This schema provides: | ||
- A `users` table for authentication | ||
- A `services` table for different salon services | ||
- An `appointments` table that tracks all bookings | ||
Key features: | ||
- Foreign key relationships between tables | ||
- Timestamp tracking for appointments | ||
- Status tracking for appointment state | ||
- Price and duration tracking for services | ||
- Contact information for clients | ||
# Project Structure | ||
``` | ||
dandelionCoiffure/ | ||
βββ .git/ | ||
βββ deployment/ | ||
βββ docs/ | ||
β βββ static/ | ||
β βββ users/ | ||
β β βββ index.html | ||
β βββ .DS_Store | ||
β βββ about.html | ||
β βββ calendar.html | ||
β βββ clients.html | ||
β βββ contact.html | ||
β βββ index.html | ||
β βββ login.html | ||
β βββ payment.html | ||
β βββ profile.html | ||
β βββ register.html | ||
βββ env/ | ||
βββ salonapp/ | ||
β βββ __pycache__/ | ||
β βββ migrations/ | ||
β βββ static/ | ||
β βββ __init__.py | ||
β βββ .DS_Store | ||
β βββ admin.py | ||
β βββ apps.py | ||
β βββ models.py | ||
β βββ tests.py | ||
β βββ urls.py | ||
β βββ views.py | ||
βββ salonproject/ | ||
β βββ __pycache__/ | ||
β βββ __init__.py | ||
β βββ .DS_Store | ||
β βββ asgi.py | ||
β βββ settings.py | ||
β βββ temp.py | ||
β βββ urls.py | ||
β βββ wsgi.py | ||
βββ staticfiles/ | ||
β βββ admin/ | ||
β β βββ css/ | ||
β β β βββ vendor/ | ||
β β β βββ autocomplete.css | ||
β β β βββ base.css | ||
β β β βββ changelists.css | ||
β β β βββ dashboard.css | ||
β β β βββ fonts.css | ||
β β β βββ forms.css | ||
β β β βββ login.css | ||
β β β βββ nav_sidebar.css | ||
β β β βββ responsive_rtl.css | ||
β β β βββ responsive.css | ||
β β β βββ rtl.css | ||
β β β βββ widgets.css | ||
β β βββ fonts/ | ||
β β β βββ LICENSE.txt | ||
β β β βββ README.txt | ||
β β β βββ Roboto-Bold-webfont.woff | ||
β β β βββ Roboto-Light-webfont.woff | ||
β β β βββ Roboto-Regular-webfont.woff | ||
β β βββ img/ | ||
β β β βββ gis/ | ||
β β β β βββ move_vertex_off.svg | ||
β β β β βββ move_vertex_on.svg | ||
β β β βββ calendar-icons.svg | ||
β β β βββ icon-addlink.svg | ||
β β β βββ icon-alert.svg | ||
β β β βββ icon-calendar.svg | ||
β β β βββ icon-changelink.svg | ||
β β β βββ icon-clock.svg | ||
β β β βββ icon-deletelink.svg | ||
β β β βββ icon-no.svg | ||
β β β βββ icon-unknown-alt.svg | ||
β β β βββ icon-unknown.svg | ||
β β β βββ icon-viewlink.svg | ||
β β β βββ icon-yes.svg | ||
β β β βββ inline-delete.svg | ||
β β β βββ LICENSE | ||
β β β βββ README.txt | ||
β β β βββ search.svg | ||
β β β βββ selector-icons.svg | ||
β β β βββ sorting-icons.svg | ||
β β β βββ tooltag-add.svg | ||
β β β βββ tooltag-arrowright.svg | ||
β β βββ js/ | ||
β β β βββ admin/ | ||
β β β β βββ DateTimeShortcuts.js | ||
β β β β βββ RelatedObjectLookups.js | ||
β β β βββ vendor/ | ||
β β β βββ actions.js | ||
β β β βββ autocomplete.js | ||
β β β βββ calendar.js | ||
β β β βββ cancel.js | ||
β β β βββ change_form.js | ||
β β β βββ collapse.js | ||
β β β βββ core.js | ||
β β β βββ inlines.js | ||
β β β βββ jquery.init.js | ||
β β β βββ nav_sidebar.js | ||
β β β βββ popup_response.js | ||
β β β βββ prepopulate_init.js | ||
β β β βββ prepopulate.js | ||
β β β βββ SelectBox.js | ||
β β β βββ SelectFilter2.js | ||
β β β βββ urlify.js | ||
β β βββ .DS_Store | ||
β βββ .DS_Store | ||
βββ templates/ | ||
β βββ users/ | ||
β β βββ index.html | ||
β βββ .DS_Store | ||
β βββ about.html | ||
β βββ calendar.html | ||
β βββ clients.html | ||
β βββ contact.html | ||
β βββ login.html | ||
β βββ payment.html | ||
β βββ profile.html | ||
β βββ register.html | ||
βββ venv/ | ||
βββ .DS_Store | ||
βββ .env | ||
βββ .env.example | ||
βββ .gitignore | ||
βββ app.json | ||
βββ app.py | ||
βββ db.sqlite3 | ||
βββ init.sql | ||
βββ latest.dump | ||
βββ LICENSE.txt | ||
βββ manage.py | ||
βββ Procfile | ||
βββ README.md | ||
βββ requirements.txt | ||
βββ runtime.txt | ||
βββ schema.sql | ||
appdirs==1.4.4 | ||
asgiref==3.4.1 | ||
certifi==2021.5.30 | ||
charset-normalizer==2.0.3 | ||
click==8.0.1 | ||
DateTime==4.3 | ||
distlib==0.3.2 | ||
dj-database-url==0.5.0 | ||
Django==3.2.5 | ||
django-deep-serializer==0.1.3 | ||
django-heroku==0.3.1 | ||
filelock==3.0.12 | ||
Flask==2.0.1 | ||
gunicorn==20.1.0 | ||
heroku==0.1.4 | ||
idna==3.2 | ||
insultgenerator==1.0.3 | ||
itsdangerous==2.0.1 | ||
Jinja2==3.0.1 | ||
loremipsum==1.0.5 | ||
MarkupSafe==2.0.1 | ||
numpy==1.21.0 | ||
panda==0.3.1 | ||
pbr==5.6.0 | ||
Pillow==8.3.1 | ||
psycopg2==2.9.1 | ||
psycopg2-binary==2.9.1 | ||
python-dateutil==1.5 | ||
pytz==2021.1 | ||
python-dotenv==1.0.1 | ||
requests==2.26.0 | ||
six==1.16.0 | ||
sqlparse==0.4.1 | ||
stevedore==3.3.0 | ||
urllib3==1.26.6 | ||
virtualenv==20.4.7 | ||
virtualenv-clone==0.5.4 | ||
virtualenvwrapper==4.8.4 | ||
virtualenvwrapper-win==1.2.6 | ||
Werkzeug==2.0.1 | ||
White-Noise==0.1.0 | ||
whitenoise==5.3.0 | ||
zope.interface==5.4.0 | ||
```*/ | ||
const projects = [ | ||
{title: "Spectra", | ||
date: "Jan 2024 - Present", | ||
|
@@ -21,6 +396,12 @@ const projects = [ | |
technologies: ["React", "Python", "Threejs", "Typescript", "Astro", "Azure-ml", "Ai-prompts"], | ||
link: "https://mollybeach.github.io/genaigraphics/agent/" | ||
}, | ||
{title: "Python-Django-Appointment-Calendar-Salon", | ||
date: "Mar 2020 - Dec 2020", | ||
description: "Django web application for managing salon appointments and services.", | ||
technologies: ["Django", "Python", "PostgreSQL", "Heroku", "HTML", "CSS", "JavaScript"], | ||
link: "https://mollybeach.github.io/dandelionCoiffure/" | ||
}, | ||
{ | ||
title: "ihaehada", | ||
date: "Mar 2020 - Dec 2020", | ||
|