cd ~/projects
git clone https://github.com/tesslinden/hardback-hax0r.git
cd ~/projects/hardback-hax0r
pre-commit install
Ensure correct version of Python is being used (3.9.17):
python --version
If not, set python version to 3.9.17, then return here.
Set python interpreter in PyCharm to ~/projects/hardback-hax0r/hh-env/bin/python3.
Create virtual environment and install dependencies:
cd ~/projects/hardback-hax0r/
python3 -m venv hh-env
source hh-env/bin/activate
pip install -r requirements.txt --no-cache-dir --index-url https://pypi.org/simple
Check if you have Node.js installed:
cd ~/projects/hardback-hax0r/frontend
node -v
npm -v
If not, install Node.js, then return here.
cd ~/projects/hardback-hax0r/frontend
nvm install # installs the version of node specified in .nvmrc
nvm use # uses the version of node specified in .nvmrc
npm install # installs the dependencies listed in package.json
Run the backend:
cd ~/projects/hardback-hax0r
source hh-env/bin/activate # if not already activated
python backend/app.py
In a new terminal, run the frontend:
cd ~/projects/hardback-hax0r/frontend
npm start
Go to http://localhost:3000/ to see the website.
Alternatively, in PyCharm, run the HH configuration to start the backend and frontend together.
Major:
- Don't show option to log in until server has responded (may require server-responding context)
- Store user search history and allow them to browse it
- Allow user to star favorite searches
- Convert words.txt to SQL database and query it
- For each word, try pinging wiktionary and if it doesn't work then filter it out
- Paginate results if there are more than 100 (on backend and frontend)
Minor:
- Search should happen automatically rather than having to hit search
- Split webpage into 3 columns: letter counts; min length and max length inputs; search results
- Add button to clear all inputs, and ask user to confirm
- Add button to download results as text file or copy to clipboard
- Fix bug where you can put in a negative number for min/max length and if you hit search the page crashes
Workflow:
- Add tests
- Add CI/CD, maybe using AWS CodeBuild