This is a platform to help coaches to keep their sessions organized. A coach can add all their coachees and then book sessions with them. In a session, there is everything they talk about in the previous sessions. So that coaches have a powerful tool in their hands. This project have a membership system with three categories. Happy Code! ๐จโ๐ป Happy days!
- UX๐ฏ
- Wireframes and Flowcharts๐จโ๐ง
- Features๐ค
- Technologies used๐
- Languages๐
- Libraries and Frameworks๐
- Tools๐ง
- Testing
- Bugs๐
- Future Implementations๐ธ
- Deployment
- Credits
- This web platform has to work well on all kind of devices like mobile phones, tables and desktops.
- I want to have a clear dashboard with icons.
- I want to have a profile.
- I want to add, update and delete coachees.
- I want to add, update and delete sessions.
- I want to be able to update materials.
- This web platform has to be user friendly.
- Visually appealing web application.
- Have a valuable web platform.
- Have great tools to help coaches get organized.
- Have membership plans.
- To be able to register for the web platform so I can have my personal environment.
- To login after I created an account and see my previous inserted information.
- To be able to add, update, and delete coachees.
- To be able to add, update, and delete sessions.
- To see the content of the previous sessions in the current session.
- To send some materials after each session via email.
- To add, update and delete my own material.
- To be able to subscribe to a plan.
- To add, update, and delete some interesting news for coaches subscribed.
- To add, update, and delete material.
- To have clean pages.
- To have three different plans.
- Easy to navigate by using few buttons.
- Appealing dashboard with a functional overview.
- Easy way to subscribe.
- Ability to add, edit, and delete coachees.
- Ability to add, edit, and delete sessions.
- Ability to add, edit, and delete materials like books, movies, and activities.
- See a report with information about hours spent in the platform.
- A powerful platform to organize all coachees and sessions.
- To have a dashboard where all the necessary information is visible.
- It should be easy to add, edit, and delete coachees, sessions and materials.
- It should be multiplatform.
TO BE DEFINED
TO BE DEFINED
I will use Boootstrap to create an overall structure for the web platform. Bootstrap provides various elements of CSS and Javascript which is very helpful to keep a good structure throughout the pages.
I used Draw.io to create wireframes for my website.
You can find my wireframes below:
- Sign-In and Out functionality
- Payment system
- Add multiple coachees per user
- CRUD Functions:
- Create: possibility to add various coachees.
- Read: list all your coachees
- Update: edit your coachees
- Delete: delete your coachees
- CRUD Functions:
- Create: possibility to add various appointments.
- Read: list all your appointments
- Update: edit your appointments
- Delete: delete your appointments
- CRUD Functions:
- Create: possibility to add various sessions.
- Read: list all your sessions
- Update: edit your sessions
- Delete: delete your sessions
- Have a fucionality to depends on plan show more or less indications.
- Have a more extensive management over the system.
- Have a functionality to report time spent in the platform
- Have a functionality to show old appointments
User story: As a user, I would like to be able to register for the web platform so I can have my personal environment.
-
Plan
Use allauth and then create a coach -
Implementation
Allauth manages the registration -
Test
One can register by insert email, username and password -
Verdict
The test has passed all the criteria and works like planned.
User story: As a user, I want to login after I created an account and see my previous inserted information.
-
Plan
Use allauth to gain access to the platform -
Implementation
Allauth manages the login -
Test
One can login by insert username and password -
Verdict
The test has passed all the criteria and works like planned.
-
Plan
Create view, urls and templates to create, read, update and delete coachees. -
Implementation
Created the logic in the view and a template for each crud step. -
Test
One can create, read, update and delete coachees. -
Verdict
The test has passed all the criteria and works like planned.
-
Plan
Create view, urls and templates to create, read, update and delete sessions. -
Implementation
Created the logic in the view and a template for each crud step. -
Test
One can create, read, update and delete sessions. -
Verdict
The test has passed all the criteria and works like planned.
- Setup and account and log in to Heroku
- On the apps page select
NEW
. - Give the app a name and select the closest region โ then click
Create App
. - Click on Resources tab to provision a new Postgres database for it.
- Search in the Addons search bar for
Heroku Postgres
. - Select your Development plan.
- To use postgres open project in GitPod and install:
* pip3 install dj_database_url
* pip3 install psycopg2-binary
* Update requirements: pip3 freeze > requirements.txt
In Settings.py
:
- Make sure import os is there.
- Add:
import dj_database_url
. - Go to Database settings and comment out existing database setting and add below example to point the database at the new Postgres database.
example:
DATABASES = {
'default': dj_database_url.parse( # ***paste in the database URL from Heroku***)
}
-
Run Migrations.
Migrations have now been made to the Postgres Database.
-
Now we can create a superuser -:
python3 manage.py createsuperuser
. -
Runserver and login as superuser to the admin page.
-
Restart the server and check admin
-
Go to Settings - Database settings - remove the Postgres database URL.
-
Create an if/else code block to check if the os.environ variable is defined. if it is defined that will mean we are on Heroku so we will use the Postgres database. Else we will be in our local environment and so use the default database.
Example:
if 'DATABASE_URL' in os.environ:
DATABASES = {
'default': dj_database_url.parse(os.environ.get('DATABASE_URL'))
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
- In the Terminal install gunicorn as our webserver:
pip3 install gunicorn
- Freeze requirements.
Pip3 freeze > requirements.txt
- Create a Procfile at the same level as the project.
- Enter the following code into the Procfile to tell Heroku to create a web dyno that will run gunicorn and serve eHand:
web: gunicorn ehand.wsgi:application
- Temporarily disable collect static โ to do this:
- login via the terminal: heroku login โi.
- Enter heroku email and password.
- Enter the following in the terminal:
heroku config:set DISABLE_COLLECTSTATIC=1 --app mr-smyth-ehand
In Settings.py
:
- Add the hostname of the Heroku app โ to ALLOWED_HOSTS (also include localhost):
ALLOWED_HOSTS = ['my-coachee.herokuapp.com', '127.0.0.1'].
- Ensure all .env variables such as the Django and stripe secret keys remain private. Also, make sure they are set up inside Heroku's config vars.
In The Terminal
:
- Deploy to Heroku:
- Add and push to GitHub
- git add .
- git commit โm โyour-messageโ
- git push
- Now initialize heroku git remote (because we created our app on the website rather than with the CLI):
-
heroku git:remote -a my-coachee
- Then push to heroku : git push heroku master
In The Heroku
:
- Setup automatic deployment in Heroku:
- Go to the deploy tab
- Set deployment method to GitHub
- Search for my-coachee
- Click connect
- Scroll down and click Enable Automatic Deploys
ehand is now deployed to Heroku
Before starting, some prerequisites:
- Before starting you should have an IDE set up - Visual Studio Code. - for example.
- Its advisable to have a virtual environment setup. Pythons own can be used :
python3 -m .venv venv
.venv\Scripts\activate
- Have at least the following installed:
- Python3 - to run the application.
- Pip - to install any requirements.
- GIT - required for version control.
- Open a Git Bash Command line, in your preferred destination.
- Enter git clone and paste in this link
https://github.com/alychinque/my-coachee
. - Open the cloned repo in your IDE.
- Create a .env file containing private credentials.
Example of env file
DEVELOPMENT_LOCAL=True
SECRET_KEY=from a genetrator
STRIPE_PUBLIC_KEY=from stripe
STRIPE_SECRET_KEY=from stripe
The above example displays an env for a local purpose only.
- Install all requirements for the application by using this command:
sudo -H pip3 -r requirements.txt
- In the IDE terminal, use the following command to start my-coachee:
python manage.py runserver
my-coachee should now be running locally on localhost port 8000. (http://127.0.0.1:8000)
- After running Django initially, it will create the local database db.SQLite3.
- Make all migrations:
python3 manage.py makemigrations --dry-run
python3 manage.py makemigrations
python3 manage.py migrate --plan
python3 manage.py migrate
- Create a superuser:
python3 manage.py createsuperuser
***Enter username, email and password***
You should now have a local copy of my-coachee.