I tried to build this around the database requirements and stuck to it as close as possible
The ones in square brackets are additional fields.
DB schemas
User(UserID, Name, [Password, Email, Admin] )
Question(QuestionID, Option1, Option2, Answer)
Attempt(AttemptID, UserID, QuestionID, Response)
CountAttempt(UserID, QuestionID, NumAttempts, [Correct, PracticeAttempts] )
- UserID login, rather than outsourcing to Google or using email (Email is collected for future password-reset versions)
- Uses ReCaptcha v2 (visible) instead of v3 (invisible to users) to give users peace of mind that there are some security considerations when making this website.
- Does not store user password directly but stores a hashed version (reverse hashing is very hard!)
Google ReCaptcha, MySQL
HTML, CSS (Bulma), Javascript (Jquery)
Python, flask, flask_sqlalchemy, wtforms
- Python/Flask has many third-party libraries out there for security, database management, email etc. Use them.
- Third-party CSS is good for building websites quickly, though you may have to sacrifice on flexibility.
- (IMPORTANT!!) Always spend some time planning how the entire website would work, and what databases/technologies are needed. Don't end up spending 4 entire days doing what could be done in 2 🙃
- Use sockets to verify if a userID has been taken instead of having the user to submit a form? hmm
- Admin rights to add and remove questions
- Open-ended questions (haha)
- Question tags.