DaraDara è un'applicazione web per l'ascolto e la pubblicazione di podcast.
Il nome deriva dall'onomatopea giapponese「だらだら」che, secondo Tofugu, si usa per indicare il "rumore" che si crea quando una persona sta "parlando o spiegando qualcosa di molto poco chiaro e ci sta mettendo tantissimo tempo per farlo"
Per avviare l'applicazione è sufficente collocarsi nel percorso file opportuno e digitare i seguenti comandi sul proprio terminale
pip install -r requirements.txt
flask run
Dopodichè sarà necessario aprire una pagina web all'inidirizzo 127.0.0.1:5000
nel proprio browser preferito (Google Chrome o Firefox).
Per terminare l'applicazione basterà premere CTRL + C
ripetutamente nello stesso terminale
Eventualmente, se non si volessero installare le dipendenze pyhton contenute in requirements.txt a livello globale, prima di avviare i comandi sopra elencati, è possibile creare e attivare un python virtual enviroment con i seguenti comandi
Per macchine OSX / Linux
python3 -m venv venv
. venv/bin/activate
Per macchine Windows
python -m venv venv
. venv/Scripts/activate
per terminare il virtual enviroment è sufficiente digitate deactivate
sempre nello stesso terminale
DaraDara è ideato per funzionare sui moderni smartphone, tablet e desktop (tutti i dispositivi con almeno 375px di larghezza e 600x di altezza)
DaraDara è responsive e si adatta alle dimensoni di vari schermi grazie all'utilizzo di bootstrap
Qui sotto potete trovare elencate una serie di linee guida per utilizzare e debuggare DaraDara
Non esiste un tasto che dalla homepage rimandi direttamente alla registrazione, bisogna prima dirigersi nella pagina di login con il tasto accedi e poi premere sulla scritta rossa "Registrati!"
Ogni icona rappresentante un occhio che indica se si vuole tenere quella data sezione del profilo pubblica o privata a gli altri utenti. Se l'icona è un normale un occhio allora la data sezione è pubblica a gli altri utenti, se c'è una barra sopra l'occhio allora la sezione è privata e solo il proprietario del profilo può vederla
I 4 podcast più in voga, visualizzabili esclusivamente nella home, sono i podcast con più seguaci su DaraDara, condizione necesaria affinché un podcast possa finire in voga è di aver almeno 1 seguace e almeno 1 episodio
Note Se ci sono meno di 4 podcast con almeno 1 seguace e 1 episodio vengono visualizzati quanti se ne può
Il tasto "sorprendimi", presente nella navabar, sceglie semplicemente a caso un podcast tra i vari disponibili su DaraDara e lo mostra all'utente
Per facilitare il debug sono state aggiunte due root "nascoste" per ripulire i dati relativi a Flask-Session e Flask-Login, da utilizzare al bisogno.
- Route per ripulire le sessioni:
/clear_session
- Route per ripulire il login:
/clear_login
Si consieri che queste route non sarebbero ovviamente pubblicate in un applicazione web aperta al pubblico, sono da utilizzare solo a scopo di debugging.
In aggiunta è possibile trovare dentro la cartella data
una sottocartella chiamata backup
dove vi risiedono alcuni file utili a riprendere un backup passato del database
Vi si possono già trovare
- 1 copia di backup del database chiamata
data.db
con tutti i dati di default forniti con questo progetto senza le eventuali aggiunte che possono essere state fatte durante il debugging dell'app - 1 database vuoto chiamato
empty.db
con la stessa struttura di questo database, dov'é possibile riempirlo di dati nuovi, eventualmente con lo scriptdao_filler.py
- 1 script python chiamato
dao_filler.py
che attraverso il DAO aggiunge i dati di base forniti con questo progetto
Si consideri che l'app è progettata per avere un minimo di serie ed episodi e non per essere completamente vuota.
DaraDara è già fornito di alcuni dati di esempio per fornire un esperienza utente basilare per testare tutte le feature messe a disposizione e richieste dal tema d'esame
In DaraDara ci sono già 6 utenti: 2 ascoltatori e 4 creatori
Ogni utente è identificato da un indirizzo email e il suo account è protetto da una password
Note Per motivi di debugging gli utenti forniti di default non rispettano gli standard di sicurezza di DaraDara in materia di password, ovvero le loro password sono lunghe meno di 8 caratteri e contengono solo lettere minuscole. Tuttavia questo non significa che un nuovo utente non debba rispettare questi standard, infatti ogni nuovo utente, come si potrà notare nella UI, deve rispettare una serie di regole in fase di registrazione per quanto riguarda la complessità della password
- John Doe (email:
john.doe@email.com
password:john
) - Jane Smith (email:
jane.smith@email.com
password:jane
) - Robert Johnson (email:
robert.johnson@email.com
password:robert
) - Michael Brown (email:
michael.brown@email.com
password:michael
)
- Emily Williams (email:
emily.williams@email.com
password:emily
) - Massimiliano Carli (email:
admin@daradara.it
password:admin
)
In DaraDara ci sono già 6 serie, solo Soccer e Basketball dispongono già di alcuni episodi, le altre non hanno nessun episodio
Alcuni utenti già seguono alcune serie, altri ancora hanno già salvato degli episodi. Queste informazioni sono facilmente reperibili del database data.db dentro la cartella data, nelle tabelle saves e follows
- Soccer (di John)
- Baseball (di John)
- Golf (di John)
- Football (di Robert)
- Basketball (di Jane)
- Tennis (di Michael)
DaraDara è stato scritto utilizzando i seguenti linguaggi:
- HTML
- CSS
- JavaScript
- Python (server-side)
DaraDara è stato inoltre creato utilizzando varie librerie e risorse esterne, tutte elencate qui sotto:
- Flask (Flask-Login e Flask-Session) abbinato con Jinja per servire la pagine web
- Bootstrap per standardizzare e rendere più intuitiva e responsive la UI
- SQLite per salvare i dati in maniera permanente
- Googlefonts e Fontawesome per font e icone utilizzate nell'applicazione
- La collezione di immagini TechLife di Karthik Srinivas per rendere la UI più gradevole
- Il sito di design Canva per sviluppare il logo visibile nella barra di navigazione e come .ico nella scheda del browser
- I siti Pexels e FreeMusicArchive per reperire le immagini e gli audio già presenti nell'applicazione
- Le librerie python Dateutil e Pillow per gestire le date e la modifica delle immagini server-side
- La libreria javascript Dayjs per gestire le date client-side
DaraDara is a web application for listening to and publishing podcasts.
The name comes from the Japanese onomatopoeia「だらだら」which, according to Tofugu, is used to describe the "sound" that happens when a person is "speaking or explaining something very unclear and taking an incredibly long time to do it."
To launch the application, simply navigate to the appropriate file path and run the following commands in your terminal:
pip install -r requirements.txt
flask run
Then, open a webpage at the address 127.0.0.1:5000
in your preferred browser (Google Chrome or Firefox).
To stop the application, just press CTRL + C
repeatedly in the same terminal.
If you don’t want to install the dependencies listed in requirements.txt
globally, you can create and activate a Python virtual environment before running the above commands, using the following commands:
For OSX / Linux machines:
python3 -m venv venv
. venv/bin/activate
For Windows machines:
python -m venv venv
. venv/Scripts/activate
To deactivate the virtual environment, simply type deactivate
in the same terminal.
DaraDara is designed to work on modern smartphones, tablets, and desktops (any devices with at least 375px width and 600px height).
DaraDara is responsive and adapts to various screen sizes using Bootstrap.
Below you can find a list of guidelines for using and debugging DaraDara.
There is no button that directly leads to the registration page from the homepage. First, go to the login page using the "Login" button, then click on the red "Register!" text.
Each eye icon indicates whether a specific section of the profile should be public or private to other users. If the icon is a normal eye, the section is public, and other users can see it. If there is a line above the eye, the section is private, and only the profile owner can view it.
The 4 most popular podcasts, visible only on the homepage, are the podcasts with the most followers on DaraDara. For a podcast to be considered popular, it must have at least 1 follower and at least 1 episode.
Note If there are fewer than 4 podcasts with at least 1 follower and 1 episode, as many as possible will be displayed.
The "Surprise me" button in the navbar randomly selects a podcast from the available ones on DaraDara and shows it to the user.
For debugging purposes, two "hidden" routes have been added to clear Flask-Session and Flask-Login data, to be used when needed:
- Route to clear sessions:
/clear_session
- Route to clear login:
/clear_login
These routes would obviously not be published in a public-facing web application and are intended solely for debugging.
In addition, inside the data
folder, you will find a subfolder called backup
where some files are stored to restore a previous database backup.
Inside, you can find:
- 1 backup copy of the database named
data.db
with the default data provided with this project, excluding any changes made during debugging. - 1 empty database named
empty.db
with the same structure as the original database, where you can fill it with new data using thedao_filler.py
script. - 1 Python script called
dao_filler.py
that uses the DAO to add the basic data provided with this project.
Note that the app is designed to have a minimum number of series and episodes, not to be completely empty.
DaraDara comes with some sample data to provide a basic user experience for testing all the features required by the exam topic.
DaraDara already has 6 users: 2 listeners and 4 creators.
Each user is identified by an email address, and their account is protected by a password.
Note For debugging purposes, the default users do not meet the security standards of DaraDara regarding passwords. Specifically, their passwords are shorter than 8 characters and contain only lowercase letters. However, this does not mean a new user can disregard these standards. In fact, every new user, as you will see in the UI, must comply with certain password complexity rules during registration.
- John Doe (email:
john.doe@email.com
, password:john
) - Jane Smith (email:
jane.smith@email.com
, password:jane
) - Robert Johnson (email:
robert.johnson@email.com
, password:robert
) - Michael Brown (email:
michael.brown@email.com
, password:michael
)
- Emily Williams (email:
emily.williams@email.com
, password:emily
) - Massimiliano Carli (email:
admin@daradara.it
, password:admin
)
DaraDara already contains 6 series, with only Soccer and Basketball having some episodes. The others do not have any episodes.
Some users already follow some series, while others have saved certain episodes. This information can easily be found in the data.db
database inside the data
folder, in the saves
and follows
tables.
- Soccer (by John)
- Baseball (by John)
- Golf (by John)
- Football (by Robert)
- Basketball (by Jane)
- Tennis (by Michael)
DaraDara was written using the following languages:
- HTML
- CSS
- JavaScript
- Python (server-side)
DaraDara was also created using various libraries and external resources, all listed below:
- Flask (Flask-Login and Flask-Session) paired with Jinja to serve the web pages
- Bootstrap to standardize and make the UI more intuitive and responsive
- SQLite to store data permanently
- Googlefonts and Fontawesome for fonts and icons used in the application
- The image collection TechLife by Karthik Srinivas to enhance the UI's appearance
- The design site Canva to create the logo seen in the navigation bar and as an .ico in the browser tab
- The websites Pexels and FreeMusicArchive to obtain the images and audio already included in the app
- The Python libraries Dateutil and Pillow for handling dates and modifying images server-side
- The JavaScript library Dayjs to manage dates client-side