# Swimmer Network-based tile tool. ## Installation First, install miniconda and node. ``` conda create env -f environment.yml yarn install ``` (this should work on Linux as well but let me know if it doesn't) ## Development Monitor the Javascript for changes (run in another window): ``` nvm use v12 yarn watch ``` Generate a new migration if you've modified the database: ``` ./cli.py db revision --autogenerate -m 'describe the changes' ./cli.py db upgrade head ``` Run the frontend demo flask server (port 3000): ``` yarn demo ``` To programmatically create pages, modify `cli/commands/site/populate.py` ## Running the site Before running the commands, enter the client directory, load the Conda environment, and make sure the database is current: ``` cd cli conda activate swimmer ./cli.py db upgrade head ``` Then build the frontend and run the Flask server: ``` yarn build:dev yarn server ``` The server will be running on http://0.0.0.0:5000/ ## Customizing builds If the functionality of the live site needs to change, make a new router and go from there. See `frontend/site/projects/museum/app.js` for an example. To customize the built site HTML, create files in `data_store/content/{graph_path}`: - `data_store/content/{graph_path}/header.html` - for custom header tags (i.e. social tags) - `data_store/content/{graph_path}/content.html` - for custom site content - `data_store/content/{graph_path}/footer.html` - for custom site footer (i.e. analytics)