Git Product home page Git Product logo

alychinque-my-coachee_sepresub's Introduction

My Coachee

multi platform

Project Goal

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!

Table of contents

User Goals

  • 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.

Site owners Goals

  • Have a valuable web platform.
  • Have great tools to help coaches get organized.
  • Have membership plans.

User Stories

As a user, I would like...

  • 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.

As a site's owner, I would like...

  • 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.

User Requirements and Expectations

Requirements

  • 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.

Expectations

  • 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.

Design Choices๐ŸŽจ

TO BE DEFINED

Fonts

TO BE DEFINED

Structure

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.

Wireframes and Flowcharts๐Ÿ‘จโ€๐Ÿ”ง

Wireframes

I used Draw.io to create wireframes for my website.

You can find my wireframes below:

Desktop Wireframes

Mobile Wireframes

Tablet Wireframes

Features๐Ÿค–

Existing Features

  • 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

Features to be implemented

  • 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

Technologies used๐Ÿ‘€

Languages๐Ÿ”

Libraries and Frameworks๐Ÿ“š

Tools๐Ÿ”ง

Testing

Register

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.

Login

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.

CRUD Coachees

User story: As a user, I would like to be able to add, update, and delete coachees.

  • 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.

CRUD Sessions

User story: As a user, I would like to be able to add, update, and delete sessions.

  • 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.

Deployment

Heroku Deployment

Steps to deploy my-coachee to Heroku using Postgres

In Heroku:

  1. Setup and account and log in to Heroku
  2. On the apps page select NEW.
  3. Give the app a name and select the closest region โ€“ then click Create App.
  4. Click on Resources tab to provision a new Postgres database for it.
  5. Search in the Addons search bar for Heroku Postgres.
  6. Select your Development plan.

In GitPod or IDE:

  1. 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 Django - setup new database:

In Settings.py:

  1. Make sure import os is there.
  2. Add: import dj_database_url.
  3. 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***)
    }
  1. Run Migrations. Migrations have now been made to the Postgres Database.

  2. Now we can create a superuser -: python3 manage.py createsuperuser.

  3. Runserver and login as superuser to the admin page.

  4. Restart the server and check admin

  5. Go to Settings - Database settings - remove the Postgres database URL.

  6. 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'),
            }
        }
  1. In the Terminal install gunicorn as our webserver: pip3 install gunicorn
  2. Freeze requirements. Pip3 freeze > requirements.txt
  3. Create a Procfile at the same level as the project.
  4. 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
  1. 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:

  1. Add the hostname of the Heroku app โ€“ to ALLOWED_HOSTS (also include localhost):
    ALLOWED_HOSTS = ['my-coachee.herokuapp.com', '127.0.0.1'].
  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:

  1. 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:

  1. 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

Local Deployment

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.

Steps to Deploy

  1. Open a Git Bash Command line, in your preferred destination.
  2. Enter git clone and paste in this link https://github.com/alychinque/my-coachee.
  3. Open the cloned repo in your IDE.
  4. 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.

  1. Install all requirements for the application by using this command:
    sudo -H pip3 -r requirements.txt
  1. 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)

  1. After running Django initially, it will create the local database db.SQLite3.
  2. Make all migrations:
python3 manage.py makemigrations --dry-run
python3 manage.py makemigrations
python3 manage.py migrate --plan
python3 manage.py migrate
  1. Create a superuser:
python3 manage.py createsuperuser
***Enter username, email and password***

You should now have a local copy of my-coachee.

alychinque-my-coachee_sepresub's People

Contributors

alychinque avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.