sopermaf / polyglossa Goto Github PK
View Code? Open in Web Editor NEWWebsite for teaching English in group seminars
Website for teaching English in group seminars
A payment system must be integrated with the lesson request form to allow the users to pay for the lesson, and ensure that the student isn't signed up for the lesson until payment is confirmed.
Problems
Have an option to allow students to go directly from the course description page to the
booking form with the class selection already prefilled.
This would allow students students to easily navigate the site.
Looks cool and fast.
Avoid trying to remember the name of the seminar when going to the booking page
Existing slots can't be edited and saved at the same time.
Validation thinks a new slot is trying to overwrite an existing slot.
This shouldn't raise an error.
Ensure that polyglossa.com redirects to www.polyglossa.com
See issue stated here https://help.pythonanywhere.com/pages/NakedDomains/ and a discussion here
https://www.pythonanywhere.com/forums/topic/686/
TODO:
Add in lesson type selection to form
Load allowed times and dates from backend
Submit page loads to new page on success
Timezone management within frontend
Paypal page redirection after email
A free trial seminar should be possible to be offered. This will lead to a confirmation page on signup that won't require the paypal form.
TODO
The frontend system needs to present users with local times for their region
and interpret the backend times with the correct timezone.
All systems must use timezone offset to maintain consistency.
Currently no consistency between front and backend and timezone information is lost.
Redesign based on pdf, same functionality
Provide a backend management option in Django to allow for easily sending an email to all students that are in a particular Seminar.
This should be a manual action that can be triggered on the specific seminar slot.
Once a payment is made or declined, the database should be updated
How to relate the pricing of Activities and Slots? Directly relative or entirely controlled by Activity?
Important to consider the possiblity of sub slotting in the future? E.g. slot of 60 mins created, but student can choose just 30 mins and a new remaining slot will be created. #8
Activity
modelIn the current setup the easiest change would be to change price
to be pricing per hour
and then have some sort of relationship between time and price e.g. sp = p * t
where
sp
is the slot price p
is the price per hour in the Activity
t
is the time duration of the slot✔️ :advantages
❌ disadvantages
Activity
level[30, 45, 90, 120]
✔️ advantages
❌ disadvantages
30 mins, 45 mins, 60 mins
This should allow the admin page to modify certain page data
The page with payments needs to be updated to look better before being sent to paypal
Issue noticed to do with a lesson request not processing with 400 error after recently created lesson.
It's assumed the issue was to do with using the local SQLlite db or also not using async functions.
Automate the CD process for the website
Check daily for branch updates?
Steps
Creating a docker image of the project could make it much easier and more flexible for hosting in the future.
Not currently required but could provide better CD integration in future.
Flexbox needs to be added everywhere to allow for the usage of different screensizes.
Give the users an explanation to the failures on the submission failure
Email field for user model needs to be updated to use the model EmailField instead of model TextField
Should seminars that are not being shown to users, i.e. is_bookable=False
, be allowed to have new slots created?
Is there a valid case for this? Could there possible issues with allowing it?
Suggestion
Track the click through rate for each video page
This will provide an analysis of the video page, and see roughly how many viewers are going through the website.
Page to allow site config
Should the project be converted to be a single page application and
use the API to retreive all data?
✔️ Advantages
❌ Disadvantages
Add a new page for showing video pages. Unlisted Youtube videos will be shown on the seminar associated with a particular slot for 24 hours, before they become unavailable.
TODO
Reduce the number of requests being handled by the BookingForm. A single request with slots for each type on page load should be enough, and perform much better.
TODO
{sem1: slots, sem2: slots}
Create model unit tests
Create datetime range filter
Update existing tests
Add state management to the slots
On mobile view for iphone users the nav bar icon is not showing
Checkout CircleCI for running integration tests and avoiding forgetting to run them manually before commits.
Home Page Implementation
Slot times will be set by the admin and can't be a subset of this time.
For example if a slot of 60 mins is created, students won't be able to book a lesson of 30 mins, as the slot times are decided in advance.
As it's a Single Page Application, we must configure the user history so that when they press the back button they go to the expected area.
example: navigating back to the course page from the booking form
This is a list of the tasks to be completed for version 1 of Polyglossa
and their progress
Setup SSL cert to allow for HTTPS connections so that site is secure.
Also important to ensure that students trust the website.
Consider using virtual scrollers and v-tabs to separate the different language levels
Should have levels A1-C1 and a section for Exercises, Reading Materials, and Videos. The sections might have a lot of links so consider the virtual scroller or expandable sections to allow for easy access.
Key points
Which site for hosting? How to?
Currently setup Vue and Django for on pythonanywhere as trial run for Django and Vue configurations, but has limited capacity.
Consider using Heroku for the ease of deployment and integration with Git. CD process seems easy with them
SQLite is currently being used as the default DB. This needs to be changed before actual launch as it will probably be too slow with a global DB lock.
Options depend on hosting, MySQL and PostgreSQL both options on pythonanywhere
Reduce the compiled asset size with lazy imports where possible.
Index seems to be the biggest culprit.
ferdia@ferdia-pc frontend]$ npm run build
> [email protected] build /home/ferdia/Desktop/projects/polyglossa/frontend
> vue-cli-service build
⠇ Building for production...
WARNING Compiled with 3 warnings 16:08:48
warning
asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
css/index.aec5f2c3.css (448 KiB)
js/index.fab9f7a1.js (585 KiB)
warning
entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
index (1.01 MiB)
css/index.aec5f2c3.css
js/index.fab9f7a1.js
warning
webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
File Size Gzipped
dist/js/index.fab9f7a1.js 585.16 KiB 169.08 KiB
dist/css/index.aec5f2c3.css 448.13 KiB 51.71 KiB
Images and other types of assets omitted.
DONE Build complete. The dist directory is ready to be deployed.
INFO Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html
Remove the crsf_exempt decorator from Vue Form Submission methods
Extra security should be added to the booking form to avoid spam.
The suggested and easiest solution is to add a recaptcha button.
Links:
TODO
Produce a QR code that the link to the website and can be redirected at any later point without requiring changing the QR codes.
This would allow a single distribution of QR codes without worrying about having to change the QR code if the desired link destination changes.
Should students received an email to confirm that their order has been received and confirmed?
This needs to be run on another thread so as not to block the website, i.e. a background job.
Check out celery or python threads.
The payment model would be expanded with 2 options:
Required changes:
Possible changes:
Logging should be added for events in the website. It shouldn't log sensitive information in the stack traces like passwords or env variables that could be recovered later.
Ensure logged in admins can access the video page at anytime.
This will be helpful for viewing the page ahead of time and checking for errors.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.