Skip to content

Commit

Permalink
Reduce HTML, Fix Cross-Access bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
charlestang06 committed Mar 18, 2024
1 parent 8e99ed4 commit fc69bb5
Show file tree
Hide file tree
Showing 22 changed files with 351 additions and 280 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This Django tutoring app was developed as a tutor/student portal for [Iridium Tutoring](https://www.iridiumtutoring.org), a nationwide 501(c)(3) nonprofit tutoring organization serving K-12 students with free, personalized educational support in all subjects. Our mission is to provide high-quality, accessible, and equitable tutoring to students in need, regardless of their background or financial status. We are committed to helping students reach their full potential and achieve academic success.

This dashboard is a B2C tutor + student web application that streamlines the tutoring session registration process and tutor sign-up process and replaces Excel/Google-Sheets/Forms platforms. Utilizes Model-View-Template (MVT) architecture for models `Tutors`, `Students`, and `Tutoring-Sessions`; views `studentView`, `tutorView`, `index`, `etc`; and Bootstrapped configurable templates for each view. Developed by the 2024 Iridium Tutoring's founder, Charles Tang.
This dashboard is a B2C tutor + student web application that streamlines the tutoring session registration process and tutor sign-up process and replaces Excel/Google-Sheets/Forms platforms. Utilizes Model-View-Template (MVT) architecture for models `Tutors`, `Students`, `Tutoring-Sessions`, and `Recurring-Sessions`; views `studentView`, `tutorView`, `index`, `etc`; and Bootstrapped configurable templates for each view. Developed by the 2024 Iridium Tutoring's founder, Charles Tang.

## Tech Stack
- **Frontend**: HTML, CSS (Bootstrap 5.0), JavaScript, FullCalendar
Expand All @@ -13,10 +13,10 @@ This dashboard is a B2C tutor + student web application that streamlines the tut
Italicized features are prioritized for implementation. These are ordered in terms of priority.
- [x] (MVP #1) Admin dashboard (manage tutor, student, and session registrations)
- [x] (MVP #2) Student session registration (sign up for tutoring sessions, email confirmation, automatic account generation)
- [x] (MVP #3) Student dashboard (custom auth login/logout, see past/upcoming sessions, register session, see session details, see tutor details, cancel session)
- [x] (MVP #4) Tutor session dashboard (custom auth login/logout, see available sessions, see historical sessions, sign up for sessions, past taken sessions, add session / recurring sessions utility, calendar view)
- [x] (MVP #3) Student dashboard (custom auth login/logout, see past/upcoming sessions/recurrings, register session, see session details, see tutor details, cancel session)
- [x] (MVP #4) Tutor session dashboard (custom auth login/logout, see available sessions, see historical sessions, sign up for sessions, past taken sessions, add/manage recurring sessions utility, calendar view, profile dashboard)
- [ ] (MVP #5) Office hours (landing page, meeting link, tutor availability)
- [x] Deployed onto CPanel, configured DNS for a subdomain (portal.iridiumtutoring.org), 90-day SSL from Let's Encrypt Provider (HTTPS)
- [x] Tutor profile dashboard (volunteering hours)
- [x] CI/CD pipeline for semi-automatic deployment from GitHub to CPanel, pre-prod server for staging

## Contributing
Expand Down
Binary file modified iridisite/__pycache__/settings.cpython-312.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions iridisite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django_extensions',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
Expand Down
9 changes: 9 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
asgiref==3.7.2
black==24.2.0
click==8.1.7
colorama==0.4.6
dj-database-url==2.1.0
Django==5.0.3
django-debug-toolbar==4.3.0
django-extensions==3.2.3
gunicorn==21.2.0
mypy-extensions==1.0.0
mysqlclient==2.2.4
packaging==23.2
pathspec==0.12.1
platformdirs==4.2.0
psycopg2-binary==2.9.9
sqlparse==0.4.4
typing_extensions==4.10.0
tzdata==2024.1
Binary file modified tutoring_student/__pycache__/urls.cpython-312.pyc
Binary file not shown.
Binary file modified tutoring_student/__pycache__/views.cpython-312.pyc
Binary file not shown.
24 changes: 3 additions & 21 deletions tutoring_student/templates/404.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
<!DOCTYPE html>
<html lang="en">
{% include 'tutoring_student/header.html' %}
<head>
<meta charset="UTF-8" />
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css"
rel="stylesheet"
/>
{% load static %}
<link href="{% static 'tutoring_student/style.css' %}" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title id="title">Iridium Tutoring | 404</title>
<title>404 Error</title>
</head>
<body>
{% load static %}
Expand Down Expand Up @@ -65,7 +52,7 @@
>
</div>
</div>
</nav>
</nav>

<div class="container mt-3">
<h1 class="text-center mt-5">Error</h1>
Expand All @@ -77,9 +64,4 @@ <h1 class="text-center mt-5">Error</h1>
<!-- Footer-->
{% include 'tutoring_student/large-footer.html' %}
</body>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"
></script>
</html>
23 changes: 23 additions & 0 deletions tutoring_student/templates/tutoring_student/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Header -->
<head>
<meta charset="UTF-8" />
<!-- Bootstrap Imports -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css"
rel="stylesheet"
/>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"
></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
{% load static %}
<link href="{% static 'tutoring_student/style.css' %}" rel="stylesheet" />
</head>
59 changes: 22 additions & 37 deletions tutoring_student/templates/tutoring_student/index.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<!-- Header -->
{% load static %}
{% include 'tutoring_student/header.html' %}
<head>
<meta charset="UTF-8" />
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css"
rel="stylesheet"
/>
<title>Iridium Tutoring</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
{% load static %}
<link href="{% static 'tutoring_student/style.css' %}" rel="stylesheet" />
<script>
var i = 0;
var text = "Free, unlimited tutoring.";

function typeWriter() {
if (i <= text.length) {
var element = document.getElementById("typewriter");
element.innerHTML = text.substring(0, i);
i++;
setTimeout(typeWriter, Math.random() * 35 + 35);
}
}
</script>
</head>

<!-- Body -->
<script>
var i = 0;
var text = "Free, unlimited tutoring.";

function typeWriter() {
if (i <= text.length) {
var element = document.getElementById("typewriter");
element.innerHTML = text.substring(0, i);
i++;
setTimeout(typeWriter, Math.random() * 35 + 35);
}
}
</script>
<body onload="typeWriter();">
<!-- Nav Bar-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
Expand Down Expand Up @@ -63,6 +50,11 @@
href="{% url 'tutoring_student:index' %}"
>Home</a
>
<a
class="nav-link fw-bold"
href="{% url 'tutoring_student:officeHours' %}"
>Office Hours</a
>
<a
class="nav-link fw-bold"
href="{% url 'tutoring_student:studentView' %}"
Expand Down Expand Up @@ -106,8 +98,8 @@ <h1 class="text-white mb-3 display-2 fw-bold" id="typewriter">
<div
class="justify-content-md-start text-white lead"
>
<span class="fw-bold text-orange pb-4">500+</span>
students impacted. <span class="fw-bold text-orange pb-4">10,000+</span> sessions offered. <span class="fw-bold text-orange pb-4">100+</span> tutors nationwide.
<span class="fw-bold text-orange pb-4 value1">500+</span>
students impacted. <span class="fw-bold text-orange pb-4 value2">10,000+</span> sessions offered. <span class="fw-bold text-orange pb-4 value3">100+</span> tutors nationwide.
</div>
<div
class="d-flex flex-row gap-1 pt-5 justify-content-center align-items-center text-white"
Expand Down Expand Up @@ -548,11 +540,4 @@ <h3 class="h4">
<!-- Footer-->
{% include 'tutoring_student/large-footer.html' %}
</body>

<!-- BootstrapJS -->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"
></script>
</html>
182 changes: 182 additions & 0 deletions tutoring_student/templates/tutoring_student/officeHours.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
<!DOCTYPE html>
<html lang="en">
<!-- Header -->
{% load static %}
{% include 'tutoring_student/header.html' %}
<head>
<title>Iridium Tutoring - Office Hours</title>
</head>
<script>
var i = 0;
var text = "Office hours, every night.";

function typeWriter() {
if (i <= text.length) {
var element = document.getElementById("typewriter");
element.innerHTML = text.substring(0, i);
i++;
setTimeout(typeWriter, Math.random() * 35 + 35);
}
}
</script>
<!-- Body -->
<body onload="typeWriter();">
<!-- Nav Bar-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="https://www.iridiumtutoring.org"
><img
src="{% static 'tutoring_student/images/iridiumbannerheader.png' %}"
class="img-fluid"
style="height: 3rem"
alt="Iridium Tutoring Logo"
/></a>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a
class="nav-link fw-bold"
href="{% url 'tutoring_student:index' %}"
>Home</a
>
<a
class="nav-link active fw-bold"
aria-current="page"
href="{% url 'tutoring_student:officeHours' %}"
>Office Hours</a
>
<a
class="nav-link fw-bold"
href="{% url 'tutoring_student:studentView' %}"
>Students</a
>
<a
class="nav-link fw-bold"
href="{% url 'tutoring_student:tutorView' %}"
>Tutors</a
>
</div>
</div>
<div class="nav navbar-nav ml-auto mr-0">
<a class="nav-link fw-bold" href="https://www.iridiumtutoring.org"
>Back To Main Site</a
>
</div>
</div>
</nav>

<!-- Landing splash -->
<section class="py-6 py-xxl-10 bg-dark">
<div class="container">
<div class="row align-items-center gy-lg-6 gy-3 pt-4 pb-2">
<div class="pb-5 p-5">
<div
class="d-flex flex-column gap-3 text-center text-md-start pt-5 pb-5"
>
<div>
<h1 class="text-white mb-3 display-2 fw-bold" id="typewriter">
Office hours, every night.
</h1>
<p class="mb-0 lead text-white mt-3">
Hosted every night virtually at 6:30 PM EST.
</p>
</div>
<div
class="justify-content-md-start text-white lead"
>
<a
href="https://meet.google.com/jau-gxoy-bqu"
target="_blank"
class="btn btn-orange btn-lg text-white fw-bold mt-3 rounded-pill"
>Join Now</a
>
</div>
<div
class="d-flex flex-row gap-1 pt-5 justify-content-center align-items-center text-white"
>
<a
href="#what_we_offer"
class="text-white bi bi-chevron-compact-down floating"
></a>
</div>
</div>
</div>
</div>
</section>

<!-- Calendar -->
<!-- Offerings-->
<section class="pb-3" style="background-color: #eae9ec">
<div class="container pb-5">
<div class="row">
<div class="col-md-12">
<div class="text-center pb-3">
<p id="what_we_offer" class="mt-5 mb-5 display-5 fw-bold">
Office Hours
</p>
</div>
</div>
</div>
<div class="row gy-6 pb-3">
<div class="col-lg-4 col-md-6 mb-3">
<div>
<div class="mb-4">
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" class="bi bi-1-circle-fill" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M9.283 4.002H7.971L6.072 5.385v1.271l1.834-1.318h.065V12h1.312z"/>
</svg>
</div>
<div>
<h3 class="h4">Join Meeting</h3>
<p class="mb-0">
Join our meeting link. We will be available starting at 6:30 PM.
</p>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-3">
<div>
<div class="mb-4">
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" class="bi bi-2-circle-fill" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M6.646 6.24c0-.691.493-1.306 1.336-1.306.756 0 1.313.492 1.313 1.236 0 .697-.469 1.23-.902 1.705l-2.971 3.293V12h5.344v-1.107H7.268v-.077l1.974-2.22.096-.107c.688-.763 1.287-1.428 1.287-2.43 0-1.266-1.031-2.215-2.613-2.215-1.758 0-2.637 1.19-2.637 2.402v.065h1.271v-.07Z"/>
</svg>
</div>
<div>
<h3 class="h4">Breakout Rooms</h3>
<p class="mb-0">
Our tutors will assign you to a breakout room based on your needs.
</p>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6">
<div>
<div class="mb-4">
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" class="bi bi-3-circle-fill" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-8.082.414c.92 0 1.535.54 1.541 1.318.012.791-.615 1.36-1.588 1.354-.861-.006-1.482-.469-1.54-1.066H5.104c.047 1.177 1.05 2.144 2.754 2.144 1.653 0 2.954-.937 2.93-2.396-.023-1.278-1.031-1.846-1.734-1.916v-.07c.597-.1 1.505-.739 1.482-1.876-.03-1.177-1.043-2.074-2.637-2.062-1.675.006-2.59.984-2.625 2.12h1.248c.036-.556.557-1.054 1.348-1.054.785 0 1.348.486 1.348 1.195.006.715-.563 1.237-1.342 1.237h-.838v1.072h.879Z"/>
</svg>
</div>
<div>
<h3 class="h4">Receive Support</h3>
<p class="mb-0">
A tutor will be present to help you with any questions you have.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer-->
{% include 'tutoring_student/large-footer.html' %}
</body>
</html>
Loading

0 comments on commit fc69bb5

Please sign in to comment.