- π Table of Contents
- π My Artists
My Artists is a musical venue and artist booking site that facilitates the discovery and booking of shows between local performing artists and venues. This site lets you list new artists and venues, discover them, and list shows with artists as venue owners.
My job is to build out the data models to power the API endpoints for this site by connecting to a PostgreSQL database for storing, querying, and creating information about artists and venues on Fyyur.
This is afully functioning site that is at least capable of doing the following, if not more, using a PostgreSQL database:
- creating new venues, artists, and creating new shows.
- searching for venues and artists.
- learning more about a specific artist or venue.
I want this to be the next new platform that artists and musical venues can use to find each other, and discover new music shows.
βββ README.md
βββ app.py *** the main driver of the app. Includes SQLAlchemy models.
"python app.py" to run after installing dependencies
βββ config.py *** Database URLs, CSRF generation, etc
βββ error.log
βββ forms.py *** Forms
βββ requirements.txt *** The dependencies needed to install with "pip3 install -r requirements.txt"
βββ static
βΒ Β βββ css
βΒ Β βββ font
βΒ Β βββ ico
βΒ Β βββ img
βΒ Β βββ js
βββ templates
βββ errors
βββ forms
βββ layouts
βββ pages
Overall:
- Models are located in the
MODELS
section ofapp.py
. - Controllers are also located in
app.py
. - The web frontend is located in
templates/
, which builds static assets deployed to the web server atstatic/
. - Web forms for creating data are located in
form.py
Highlight folders:
templates/pages
-- (Already complete.) Defines the pages that are rendered to the site. These templates render views based on data passed into the templateβs view, in the controllers defined inapp.py
. These pages successfully represent the data to the user, and are already defined for you.templates/layouts
-- (Already complete.) Defines the layout that a page can be contained in to define footer and header code for a given page.templates/forms
-- (Already complete.) Defines the forms used to create new artists, shows, and venues.app.py
-- (Missing functionality.) Defines routes that match the userβs URL, and controllers which handle data and renders views to the user. This is the main file that I will be working on to connect to and manipulate the database and render views with data to the user, based on the URL.- Models in
app.py
-- (Missing functionality.) Defines the data models that set up the database tables. config.py
-- (Missing functionality.) Stores configuration variables and instructions, separate from the main application code. This is where I will need to connect to the database.
Frontend
Backend
Database
- Post and find venues.
- Post a show.
- Post and find artists.
It will be available soon.
To get a local copy up and running, follow these steps.
In order to run this project you need:
Python
https://www.python.org/downloads/
Node.js
https://nodejs.org/en/download/
PostgreSQL
https://www.postgresql.org/download/windows/
Clone this repository to your desired folder:
cd my-folder
git clone https://github.com/Alejandroq12/App-to-book-artists.git
Install all necessary dependencies:
Download and install the dependencies mentioned above using pip
as:
pip install virtualenv
pip install SQLAlchemy
pip install postgres
pip install Flask
pip install Flask-Migrate
HTML, CSS, and Javascript with Bootstrap 5 for this website's frontend. Bootstrap can only be installed by Node Package Manager (NPM). Therefore, if not already, download and install the Node.js. Windows users must run the executable as an Administrator, and restart the computer after installation. After successfully installing the Node, verify the installation as shown below.
node -v
npm -v
Install Bootstrap 5
npm init -y
npm install bootstrap@5
- Initialize and activate a virtualenv using:
python -m virtualenv env
source env/bin/activate
Note - In Windows, the
env
does not have abin
directory. Therefore, you'd use the analogous command shown below:
source env/Scripts/activate
- Install the dependencies:
pip install -r requirements.txt
- Run the development server:
python app.py
- Verify on the Browser
Navigate to project homepage http://127.0.0.1:5000/ or http://localhost:5000
I will deploy this site soon.
π€ Julio Quezada
- GitHub: Alejandroq12
- Twitter: @JulioAle54
- LinkedIn: Julio Quezada
- I will deploy the database.
- I will deplot the frotend
- I will improve the user interface.
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project please give a star or send me a message with your feedback qjuliodev@gmail.com
I would like to thank Udacity because this project was assigned to me in order to develop the entire backend on my own.
-
What did you learned with this project?
- I learned how to use Python as a server side language and how to set up the database.
This project is MIT licensed.