Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
3c292ad
revamped test branch
Curiouspaul1 Jun 29, 2020
284efc3
updated requirements.txt
Curiouspaul1 Jun 29, 2020
a9e25ff
updated requirements
Curiouspaul1 Jun 29, 2020
fc02c06
updated views
Curiouspaul1 Jun 29, 2020
3ede112
updated emailing route
Curiouspaul1 Jul 1, 2020
6879d5d
updated routes
Curiouspaul1 Jun 29, 2020
1968423
updated config keys and email service
Curiouspaul1 Jul 1, 2020
4e6d950
added debug feat
Curiouspaul1 Jul 1, 2020
7e7d3b2
fixed configbug
Curiouspaul1 Jul 2, 2020
a2e485b
Added new route
Curiouspaul1 Jul 2, 2020
e4b3252
updated schema
Curiouspaul1 Jul 2, 2020
bbcd517
added flagging for doctors
Curiouspaul1 Jul 2, 2020
9855ead
added flagging for doctors to views
Curiouspaul1 Jul 2, 2020
789aa9a
updated files
Curiouspaul1 Jul 2, 2020
3ec949d
took out the trash
Curiouspaul1 Jul 2, 2020
ea6a992
Update models.py
Curiouspaul1 Jul 2, 2020
13f6211
Update views.py
Curiouspaul1 Jul 2, 2020
48958f5
Fixed index bug
Curiouspaul1 Jul 2, 2020
603accb
Updated doc views
Curiouspaul1 Jul 3, 2020
4ecfdf5
Merge branch 'test' of github.com:Curiouspaul1/Coveed into test
Curiouspaul1 Jun 29, 2020
a6ae509
fixed import error
Curiouspaul1 Jul 4, 2020
d3e28d0
successfully integrated and tested the firebase plugin for token veri…
Curiouspaul1 Jul 14, 2020
730ba2e
code cleanup
Curiouspaul1 Jul 14, 2020
91b8cd6
Added cookies
Curiouspaul1 Jul 15, 2020
847f1bd
added refresh token auth endpoint
Curiouspaul1 Jul 16, 2020
573ff90
fixed bug
Curiouspaul1 Jul 16, 2020
a428df9
added firebase config
Curiouspaul1 Jul 16, 2020
24b143c
updated config vars
Curiouspaul1 Jul 17, 2020
b454dcc
testing something
Curiouspaul1 Jul 17, 2020
c062cde
updated procfile
Curiouspaul1 Jul 17, 2020
2287d5d
added key
Curiouspaul1 Jul 17, 2020
8692bab
removed key
Curiouspaul1 Jul 17, 2020
2a292aa
updated firebase config
Curiouspaul1 Jul 17, 2020
23f1d2d
updated config method
Curiouspaul1 Jul 17, 2020
1db9dc5
updated config method
Curiouspaul1 Jul 17, 2020
b03d613
mehn
Curiouspaul1 Jul 17, 2020
59083ea
tayad
Curiouspaul1 Jul 17, 2020
ac8ae6c
nawa o...config again
Curiouspaul1 Jul 17, 2020
3f8fb8b
nawa o...config again
Curiouspaul1 Jul 17, 2020
0244e49
nawa o...config again
Curiouspaul1 Jul 17, 2020
0da1c58
nawa o...config again
Curiouspaul1 Jul 17, 2020
8554f9e
nawa o...config again
Curiouspaul1 Jul 17, 2020
ebb2f1f
nawa o...config again
Curiouspaul1 Jul 17, 2020
d9b9aab
still testing
Curiouspaul1 Jul 17, 2020
1a70bf9
Hope restored
Curiouspaul1 Jul 17, 2020
73717f8
Hope restored
Curiouspaul1 Jul 17, 2020
ef8f326
Hope restored
Curiouspaul1 Jul 17, 2020
f0e3352
updated login required decorator
Curiouspaul1 Jul 17, 2020
4d3d406
updated models and views
Curiouspaul1 Jul 17, 2020
bb0f42f
i think i fixed the bug
Curiouspaul1 Jul 17, 2020
0707efc
fixed minor bug
Curiouspaul1 Jul 17, 2020
802f14a
updated models
Curiouspaul1 Jul 20, 2020
79c2fb1
updated files
Curiouspaul1 Jul 20, 2020
03e9fa8
Update views.py
Curiouspaul1 Jul 20, 2020
5d79c84
Update models.py
Curiouspaul1 Jul 20, 2020
f3615e2
Update views.py
Curiouspaul1 Jul 20, 2020
28400ce
Update views.py
Curiouspaul1 Jul 20, 2020
3df6888
Update views.py
Curiouspaul1 Jul 20, 2020
96486ac
Update views.py
Curiouspaul1 Jul 20, 2020
3f02559
Update schema.py
Curiouspaul1 Jul 20, 2020
4b77f36
Update views.py
Curiouspaul1 Jul 20, 2020
8d8bd6b
updated emergency email tmeplate
Curiouspaul1 Jul 22, 2020
a66e454
Merge branch 'test' of github.com:Curiouspaul1/Coveed into test
Curiouspaul1 Jul 22, 2020
b6595c1
fixed that stupid bug
Curiouspaul1 Jul 22, 2020
ec50997
updated signup data
Curiouspaul1 Jul 24, 2020
316da96
signup works
Curiouspaul1 Jul 24, 2020
03671d3
Tests
briefgaming Jul 26, 2020
22199b1
Tests
briefgaming Jul 26, 2020
511813c
Allow tests run
briefgaming Jul 26, 2020
25190b5
Merge pull request #5 from Bashorun97/test
briefgaming Jul 26, 2020
bee6634
Update views.py
Curiouspaul1 Jul 28, 2020
2b57c34
Update views.py
Curiouspaul1 Jul 28, 2020
82a569d
added config back
Curiouspaul1 Jul 28, 2020
db7a159
Update views.py
Curiouspaul1 Jul 29, 2020
b42b66e
Update views.py
Curiouspaul1 Jul 29, 2020
57af02b
Update views.py
Curiouspaul1 Jul 29, 2020
7c32e54
Update views.py
Curiouspaul1 Jul 29, 2020
09ede73
Update views.py
Curiouspaul1 Jul 29, 2020
2f3a242
Update views.py
Curiouspaul1 Jul 29, 2020
96353a7
Update views.py
Curiouspaul1 Jul 30, 2020
ebcc74d
Update views.py
Curiouspaul1 Jul 30, 2020
cc4a2e6
Update __init__.py
Curiouspaul1 Jul 30, 2020
277eea1
fixed cors bug - i think
Curiouspaul1 Jul 30, 2020
970366c
Update __init__.py
Curiouspaul1 Jul 30, 2020
ad8d82f
Update views.py
Curiouspaul1 Jul 30, 2020
660fa34
Update views.py
Curiouspaul1 Jul 30, 2020
8df2103
Update views.py
Curiouspaul1 Jul 30, 2020
1229501
added samesite option to setcookie
Curiouspaul1 Aug 1, 2020
a233543
Added secure parameter in cookies
Curiouspaul1 Aug 1, 2020
d4ccbab
new auth blueprint, starte on admin panel
Curiouspaul1 Sep 14, 2020
9ba2676
added tailwind css to admin teemplates
Curiouspaul1 Sep 14, 2020
828e2d5
added admin login,signup,handlers,auth systems for admin transactions…
Curiouspaul1 Sep 15, 2020
f2313d3
fixed bugs, got admin signup and signin working, well integrated with…
Curiouspaul1 Sep 16, 2020
b86b7aa
code cleanup with flake8 to suit PEP8 standard
Curiouspaul1 Sep 23, 2020
53ec920
added login redirect to login.js, durther aligning code with PEP8 sta…
Curiouspaul1 Sep 23, 2020
62bb537
Pep8 , fixed minor bug, working on admin login decorator
Curiouspaul1 Sep 30, 2020
f1ed26a
auth decorator ship sailed!
Curiouspaul1 Sep 30, 2020
05f5664
Added Dockerfile
Curiouspaul1 Oct 13, 2020
2c67785
added admin panel ui
Curiouspaul1 Oct 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .flaskenv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
FLASK_APP=run.py
FLASK_ENV=development

14 changes: 10 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
coveed/
*__pycache__
coveed-dev.sqlite
*.sqlite
*__pycache__/
.vscode/
venv
venv/
coveed-19-firebase-adminsdk-5pl26-f8a920fad1.json
data.json
devsdb.sqlite
user_dat.xlsx
coveed-dev.sqlite-journal
*.sqlite
*.stackdump
.vs/
node_modules/
*yarn.lock
*tailwind.config.json
package.json

18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.7

# set work directory
WORKDIR /app

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# install dependencies
RUN pip install --upgrade pip
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt

# copy source code
COPY . /app/

CMD ["flask", "run", "--host=0.0.0.0"]
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
web: gunicorn run:app

touch /app/google-credentials.json
echo ${GOOGLE_CREDENTIALS} > /app/google-credentials.json
26 changes: 15 additions & 11 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,38 @@

basedir = os.getcwd()


class Config:
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECRET_KEY = os.getenv("SECRET_KEY")
SECRET_KEY = os.environ['APP_KEY']
ADMIN_EMAIL = ''
APP_EMAIL = os.environ.get('APP_EMAIL')
AGENT_EMAILS = os.environ.get('AGENT_EMAILS')
#F_KEY = os.environ['FIREBASE_KEY'].replace('\\n','\n')
#CLIENT_EMAIL = os.environ['FIREBASE_CLIENT_EMAIL']
F_KEY = os.environ['FIREBASE_KEY'].replace('\\n','\n')
CLIENT_EMAIL = os.environ['FIREBASE_CLIENT_EMAIL']


class DevelopmentConfig(Config):
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir,'coveed-dev.sqlite') or os.getenv('DEV_URI')
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir,'Sdev.sqlite') or os.getenv('DEV_URI')
DEBUG = True
#cred = credentials.Certificate(os.getenv('GOOGLE_APPLICATION_CREDENTIALS'))
# CRED = credentials.Certificate(os.getenv('GOOGLE_APPLICATION_CREDENTIALS'))


class TestingConfig(Config):
TESTING =True
TESTING = True
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir,'coveed-test.sqlite') or os.getenv('TEST_URI')


class ProductionConfig(Config):
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
FLASK_ENV='production'
FLASK_ENV = 'production'


config = {
'development':DevelopmentConfig,
'Testing':TestingConfig,
'Production':ProductionConfig,
'development': DevelopmentConfig,
'Testing': TestingConfig,
'Production': ProductionConfig,

'default':DevelopmentConfig
'default': DevelopmentConfig
}

2 changes: 2 additions & 0 deletions debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[0922/224757.783:ERROR:registration_protocol_win.cc(103)] CreateFile: The system cannot find the file specified. (0x2)
[0922/225309.892:ERROR:registration_protocol_win.cc(103)] CreateFile: The system cannot find the file specified. (0x2)
15 changes: 13 additions & 2 deletions main/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@
from .extensions import db,ma,cors
from config import config
import os
import logging

def __call__(config_object):
app = Flask(__name__)
app.config.from_object(config[config_object])
app.config['SECRET_KEY'] = os.urandom(24)
app.config['KEY'] = os.urandom(24)

db.init_app(app)
ma.init_app(app)
cors.init_app(app, resources={r"/api/*":{"origins":"*"},r"/doctors/*":{"origins":"*"}})
cors.init_app(app, resources={
r"/api/*":{"origins":"*"},
r"/doctors/*":{"origins":"*"},
r"/admin/*":{"origins":"*"},
r"/auth/*":{"origins":"*"}},
supports_credentials=True
)
#logging.getLogger('flask_cors').level = logging.DEBUG

# register blurprint
from .api import api as api_blueprint
Expand All @@ -23,5 +31,8 @@ def __call__(config_object):

from .doctors import doctor as doc_blueprint
app.register_blueprint(doc_blueprint,url_prefix='/doctors')

from .auth import auth as auth_blueprint
app.register_blueprint(auth_blueprint,url_prefix='/auth')

return app
4 changes: 3 additions & 1 deletion main/admin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from flask import Blueprint

admin = Blueprint('admin',__name__)
admin = Blueprint(
'admin', __name__, template_folder='templates', static_folder='static'
)

from . import views
Loading