Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luka2220/vocalytics
https://github.com/luka2220/vocalytics
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/luka2220/vocalytics
- Owner: luka2220
- Created: 2024-11-08T23:33:17.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-12T18:46:13.000Z (3 months ago)
- Last Synced: 2025-01-01T21:18:13.187Z (about 1 month ago)
- Language: Python
- Size: 13.3 MB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hack-Trent-2024
## Server Documentation
* The server code lives in the root directory with the main entry point in main.py
* It is a flask application with a sqlite database named hacktrent.db in `./db`
* The server's development environment is in a docker container as well, defined in the Dockerfile### Running the server with a python virtual environment
* NOTE: Make sure python is installed on your system
*Mac/Linux Setup*
- `python -m .venv`
- `source .venv/bin/activate`
- `python -m pip install -r requirements.txt`
- `create the .env file with secrets`
- `gunicorn --reload -w 4 -b 127.0.0.1:8000 "main:create_app()"`*Windows Setup*
- `python -m venv .venv`
- `.\.venv\Scripts\activate`
- `pip install requirements.txt`
- `create the .env file with secrets`
- `waitress-serve --host=127.0.0.1 --port=8001 main:app`### Running the server with docker
* NOTE: Make sure docker is installed on your system
*Run the Server Container*
- `docker build -t server-image -f .\docker\dockerfiles\Dockerfile .`
- `docker run -d -p 8001:8000 -v /db/hacktrent.db --name hack-trent-server-app server-image`*Run the Model Container*
### Performing database operations (if needed)
- *(Create a migration repo)*: flask --app main:create_app db init
- *(Create a db migration)*: flask --app main:create_app db migrate -m "users table"
- *(Apply the migration changes to the db)*: flask --app main:create_app db upgrade## Client Documentation
* The client code lives inside the client directory
* With the server code running open another terminal session to get started### Running the client
- In the root directory: `cd client`
- `npm i`
- `npm run dev`