Single Page Web App to manage a movie database using Amazon's DynamoDB
- node v11.6.0
- python 3.7.2
- quasar 0.17.19
- vue 3.2.3
Npm's dynalite
package claims to easily run local DynamoDB, but is not
available for the current Node version.
Tested only on Ubuntu
- sudo apt-get install python3 awscli openjdk-11 libcairo2-dev
- sudo rpm i python3 awscli openjdk
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html
- pip3 install pyenv-virtualenv pyenv-virtualenvwrapper
- edit api/scripts/startDynamo.sh to call
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
- Install Homebrew
brew install python3 --with-brewed-openssl
brew install awscli cask node pyenv-virtualenv pyenv-virtualenvwrapper cairo
brew cask install dynamodb-local
Dynamovie: A responsive, single page progressive movie database using Amazon's DynamoDB. It is possible to adapt this with your legacy web application. Uses Quasar Vue.js framework, and Python Django ReST framework.
Todo (send feedback)
- Consider Cygwin or Windows 10 Bash shell
Linux may require sudo
for the following
npm i -g eslint-plugin-vue quasar-cli vue-cli @vue/cli-init
git clone [email protected]:bingalls/dynamovie.git
cd dynamovie
- aws configure
- aws_access_key_id = fakeMyKeyId
- aws_secret_access_key = fakeSecretAccessKey
- region = us-east-1 # see aws docs for your local region
- output = json
Note that DynamoDB uses the same default port 8000 as Django. api/scripts sets DynamoDB's port to 8008
cd api/scripts
bash createMoviesTable.sh
bash seedMovie.sh
# optional
cd api
python3 -m virtualenv venv
# not necessary, if you already run python3pip3 check
pip3 install -r requirements.txt
ln -s venv ..
# for your IDE
Mac & Linux users may clean up newlines for git:
find venv -name RECORD|xargs dos2unix -
./start.sh
- Should automatically open browser with http://localhost:8080/
- You can debug ReST API in http://127.0.0.1:8000/movies/
- Call
./stop.sh
before closing terminal, to clean up background services - Edit api/dynamovie/settings.py before running in production! Settings are not secure
This has only been tested on a desktop, with DynamoDB running on localhost. Robust static analysis has been applied, including
- eslint
- stylelint
- flake8
- pydocstyle
- pylama
However, this code needs unit and integration testing
This code is not fully polished for production. With community support, the following will be improved:
- Quasar is still a beta release
- Fewest Quasar files were changed, to ease upgrades. For example, side menu is unchanged.
- No TLS, nor authentication. Updates & deletes should be restricted for a production release.
- API's host url setting in Index.vue should be moved to a file similar to quasar.conf.js
- API can be richer: versioning, schema, graphql, etc
- Pagination is currently client side, only. Server pagination is commented, untested.
- Studios & Genres come from a limited static list
- Move to TypeScript, just like the next version of Vue & Quasar
- The table is too wide for mobile. Open to suggestions.
- Sanitization disallows '&' in movie titles, for example
- Deleting a row reloads page. Perhaps too heavy, and untested on native mobile