Capstone is a casting agency site which illustrates a company that is in the business of matching actors to movies in production. Capstone gives one ease of seeing actors and movies managed by the company at different access levels.
Our tech stack will include:
- SQLAlchemy ORM to be our ORM library of choice
- PostgreSQL as our database of choice
- Python3 and Flask as our server language and server framework
- Flask-Migrate for creating and running schema migrations
- Angular for our website's frontend
Overall:
- Models are located in
models.py
. - Controllers are located in
run.py
. - The web frontend is located in
frontend/
,
First, install Flask if you haven't already.
$ cd ~
$ sudo pip3 install Flask
To start and run the local development server,
- Initialize and activate a virtualenv:
$ cd YOUR_PROJECT_DIRECTORY_PATH/
$ virtualenv --no-site-packages env
$ source env/bin/activate
- Install the dependencies:
$ pip install -r requirements.txt
- Run the development server:
$ cd backend
$ export FLASK_APP=run.py
$ export FLASK_ENV=development # enables debug mode
$ python3 run.py
-
Navigate to Home page http://localhost:5000
-
Active endpoints
Functionality Endpoint Casting assistant Casting Director Executive Producer Fetches a list of actors GET /actors ✔️ ✔️ ✔️ Fetches a list of movies GET /movies ✔️ ✔️ ✔️ Fetches a specific actor GET /actors/<int:id> ✔️ ✔️ ✔️ Fetches a specific movie GET /movies/<int:id> ✔️ ✔️ ✔️ Creates an actor POST /actor/create ❌ ✔️ ✔️ Patches an actor PATCH /actors/<int:id>/edit; ❌ ✔️ ✔️ Delete an Actor DELETE /actors/<int:id>; ❌ ✔️ ✔️ Creates a movie POST /movies/create ❌ ❌ ✔️ Deletes a movie DELETE /movies/<int:id> ❌ ❌ ✔️ Patches a movie PATCH /movies/<int:id>/edit; ❌ ❌ ✔️ -
Live project
- The backend has been deployed to heroku platform https://capstone-fullstack.herokuapp.com/
-
API Documentation
-
Testing run command
$ cd backend
$ pytest
to run existing tests
To run the development frontend end follow these steps.
$ cd frontend/
$ npm i
$ ng serve
-
Create a new Auth0 Account
-
Select a unique tenant domain
-
Create a new, single page web application
-
Create a new API
- in API Settings:
- Enable RBAC
- Enable Add Permissions in the Access Token
- in API Settings:
-
Create new API permissions:
- "add:actors",
- "add:movie",
- "delete:actors",
- "delete:movies",
- "edit:actor",
- "edit:movie",
- "view:actors",
- "view:movies"
-
Create new roles for:
-
Casting Assistant
- Can view actors and movies
-
Casting Director
- All permissions a Casting Assistant has and…
- Add or delete an actor from the database
- Modify actors or movies
-
Executive Producer
- All permissions a Casting Director has and…
- Add or delete a movie from the database
-