Skip to content

Commit

Permalink
docs: Add detailed project documentation and setup guide for Dandelio…
Browse files Browse the repository at this point in the history
…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
mollybeach committed Nov 13, 2024
1 parent 04a0ee3 commit b84fdbd
Showing 1 changed file with 381 additions and 0 deletions.
381 changes: 381 additions & 0 deletions src/components/Projects.tsx
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",
Expand All @@ -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",
Expand Down

0 comments on commit b84fdbd

Please sign in to comment.