Giter Club home page Giter Club logo

dentest's Introduction

Dentest - Michael Kilian

Overview

Dentest was a web application designed to provide learning resources, mainly a database of questions and answers, to student dentists. Random quizes can be generated from the question bank, with options to limit the questions presented to a subset of the topics and alter the size of the quiz.

Users would subscribe yearly for access using Braintree to manage payments. Free users would have access to a limited subset of the questions available to try the app out, while paid users could access all questions and generate their own quizzes.

I began on Dentest as a side project with a friend who is a dentist. Ultimately, we decided not to progress with it. The code in this repository is presented as it was at the time we abandoned the project, at which time I was in the process of trying to produce a deployable version to test as a prototype on a live server. Needless to say, the code is far from perfect and would require significant work to productionize. I have included rough instructions for setting up the required dependencies and running the server and front-end.

Tools and Requirements

Dentest was built using Django 1.7.8 and AngularJS 1.3.14. The project was created with the CG-Angular Yeoman generator. The linked documentation contains install instructions.

Dependencies can be found in:

  • frontend/bower.json for Bower dependencies
  • frontend/package.json for NPM components
  • server/backend_requirements.txt for the Django/Python dependencies

Running Tests

Run the Jasmine tests for the Angular front-end by running grunt test from tgit he frontend folder.

Before running the server tests, you must set up the database first by running python manage.py migrate. Then use python manage.py test

Running Dentest

First start the server using python manage.py runserver. If this has succeeded use grunt server to start the front-end.

The web app will be available at localhost:9001 and the Django server is available at localhost:8000.

dentest's People

Contributors

mjkilian1992 avatar

Watchers

 avatar  avatar

dentest's Issues

Check password reset confirm logic on backend

Wierdly i put the attempt to confirm before any checks on the password. So if the passwords entered were invalid it would still expire the key. I have changed the order of this but need to confirm it and change the unit tests for this view.

Define AuthController Specification

Define the functionality of this controller, write a URL routing scheme for the Auth section of the app and implement the controller. Should produce a self contained subsection of the app related to user profile management.

Add subscription model

This should work the same way as an EmailConfirmation: A time of creation will be used to check if a subscription is out of date or not.

User Auth Via REST Framework

Need to define a way of registering users to the app via the REST API. Users should be readable and creatable (NOT DELETABLE). This will map to registering and logging in.

Fix Navbar

Navbar dropdown not working correctly when screen is compressed.

Build design for auth system

This should consist of the following:

  • High level description
  • Libraries used and how they fir together
  • Plan to manage subscriptions: create a 'hook' for logic to check a users payment method later.
  • User groups, one for free users and one for restricted
  • Adding a 'restricted' boolean to questions to allow a free subset of questions to be shown to new users,

Authentication not working properly with frontend

Can log in and return the token successfully but it appears that views which require the permissions.isAuthenticated permission to be satisfied raise a 401 UNAUTHORIZED. Implies a problem with the token.

Add password checking

Want to add some suitable validator for checking passwords. Will need to define suitable criteria first.

Get registration with email verification working

Users should register for a basic account by entering the following data:

  • Username (unique)
  • Email (unique)
  • First Name
  • Last Name

The email should be verified by sending an email to the user which gives them a verification token. Once the email has been verified, the user can log on. The following requirements must be met for email verification:

  • The verification email link should time out after a configurable time in days, after which the link is no longer valid.
  • There should be a way, presumably via a ModelManager, to detect completed, outstanding and expired confirmation codes so correct action can be taken on them. Additionally it may be useful to have a 'Delete expired confirmations' feature added to the admin page.
  • The email content and header should be configurable.

Disable CORS

Have added this for development. It must be disabled before deployment. Do so by uninstalling the django-cors python package

Add root view for browsable API

Djoser has an example of this in its root view, look at this for help.
Should have one for authentication and one for questions.

Remove or change privileged groups based on reaction to 'free' website

At some point the decision will be made between whether or not we wish to charge a subscription or have a free sponsored site. Whichever this is, I will need to sort out the user groups to either remove them or establish the following if we opt for subscriptions:

  • Regular users should be assigned to the 'Bronze' User group. This means they must be assigned this group by a custom serializer when they register
  • Paid users must be added to the silver group, and taken away from this group when they're subscription expires.

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.