Python (with sockets) + MongoDB + Flutter
- Note: all commands are run in Terminal
- Download and install Python 3.11, Flutter, VS Code (or other code editor)
- (Set up Github SSH key and)
git clone git@github.com:teal-towns/tealtowns.gitthencd tealtownsinto the code repository and run all commands from here.
Note, may have to replace all pip with pip3 and python with python3. Type python -V to see your version of python. If it is not 3.11, try python3 -V instead.
pip install -r ./requirements.txt- Download and copy over
config.ymlandfrontend/.env cd frontend && flutter build web(for frontend)
- backend (server):
python web_server.py - frontend (browser):
cd frontend && flutter run -d chrome --web-port=PORT- OR for non chrome (will have to manually open browser, type in URL & reload page for updates),
flutter run -d web-server --web-port=PORT
- Stripe testing:
stripe listen --forward-to localhost:8081/web/stripe-webhooks
python -m pytestcd frontendthenflutter test
Note: git status -s to see current status/changes.
git checkout main && git pull origin maingit checkout -b MY-BRANCH- [Write your code and bump the version in
frontend/pubspec.yml(e.g. incrementversion: 1.0.0+6toversion: 1.0.0+7)] git add . && git commit -am 'SUMMARY OF MY CODE CHANGES'git checkout main && git pull origin main && git checkout MY-BRANCH && git rebase maingit push origin MY-BRANCH- Open a pull request on github.com. Make sure tests pass, then ask for a code review. Once approved, merge it on github.com This will automatically deploy your code.
git checkout main && git pull origin main && git branch -d MY-BRANCH
- update version & build in pubspec.yaml & run
flutter clean - iOS
flutter build ios- Open Runner.xcworkspace & use xCode to archive & upload the build to AppStoreConnect & submit for review
- Android
flutter build appbundle- Use Google Play to upload app bundle & submit for review
- Add WhatsApp message templates on twilio.com Content Template Builder, then add / update the ids in
config.yml