-
appfolder: for code related to running the appapi.py: url and logic for api requests to be madeconfig.py: To contain the configuration of some of the critical variablesdatabase.py: Codes to manipulate the databaselogin.py: Login logic and url to loginvars.py: Some useful variables that might need to be used.views.py: To view the page. Avoid processing data here.
-
staticfolder: for scripts, css and images for any html page.-
styles.cssfor all the styling. -
scriptsfolder: for any js scriptsscript.js: for any general purpose js across multiple pagessummary.js: vue code for the summary page
-
assetsfolder: for images, fonts etcimagesfolder: for images
-
-
templatesfolder: for all the different html pages for Flask to render
utilitiesfolder:database_update.py: utility for updating/setting up the database
requirements.txt: the packages and version that is used.
Usepip freezeto generate it when in a virtual environment.
- To run the flask code, run the
run.pyfile. - Create any other files needed to improve the structure.
- Schema (database, api, css class): https://docs.google.com/document/d/1cnTBuBVuUCJdrRCjcoP0eZie31BGKTb4XK3g6L5Tw-s/edit?usp=sharing
- Go to http://nysecure.herokuapp.com/ to view the app.
- Add environment variables there.
Used for sensitive information, do not push to github
- Clone this git:
git clone https://github.com/code4ny/NYSecure.git - Change base branch to push/pull from:
git branch -u origin/development- If unsure, just push/pull from here for now.
(Assumed that the repository is set up)
- Select the correct branch.
- Pull:
git pull - Edit files.
- Add edited file:
git add <filename> - Commit:
git commit -m '<message>' - Push:
git push - Go github to merge branch if needed.
p.s. If you are using vscode, there is a source control tab that you can use to do step 4-5. And small refresh icons at the bottom for you to push/pull. The branch name is at the bottom. So you don't need to use the command line. Or download any other git gui at https://git-scm.com/downloads/guis.
In the case that the gui doesn't have the function
- Add edited files:
git add <filename>for some file, orgit add .for everything in the directory - Commit:
git commit -m '<message>' - Push: to send your edited files to the repo
git push - Pull: to update your current files from the repo
git pull - Select new branch from github branch:
git branch -u origin/<branch-name> - Select new branch:
git checkout <branch-name> - Check current branch/see all branch:
git branch(the one with asterisk is the current branch)