Inspired by music streaming website such as soundcloud and spotify. This project is a Fullstack project. I intend to learn the full cycle development of fullstack enginnering. At the same time, sharpen my python, flask, Rest API, Mongodb skills.
“Learn_partial_content_static_file_stream.py”, “Music folder”, “template/test.html” & “template/test2.html” are for partial content local(static) file streaming. I played with static streaming in the beginning. “Gridfs_usage_playground.py” is for me to learn mongoDB - gridfs.
Files and folders mentioned above are not required for the project to run. But they can be helpful if you’d like to learn about static file streaming and gridfs.
Topics related:
front-end - Jinja & HTML/CSS
back-end - python & mongodb
file-storage: mongodb-gridfs
back-end driver - pymongo & flask-pymongo
http & cookies & responses
This project has function such as
- index page
- login/logout - with sessions and g.user(flask) / cookies | login logout
- view your own and others' profiles and listen to soundtracks they uploaded | profile, audio streaming
- upload & delete music track if the track belongs to you | upload delete
- change email addr and password page | account page
- I just learnt mongodb a while ago, and I wanted to practice my mongodb skills.
- mongodb is a great tools as a No-SQL database and its flexibility to expand and grow as user base grows is a great features.
- Mongodb has exceptional capacity when it comes to scaling. Its built-in helper function such as sharding, and replications are great.
- I have just worked with JSON/Python-Dict type data for data management, this is also a great opportunity to practice more of json and python.
as long as you have docker & docker-compose installed. you can just run "./up.sh" to start the server. Home Page: 127.0.0.1:5000
you can just run "./down.sh" to shutdown the server.
- UI can be a lot more beautiful for both PC and Mobiles
- add user profile photo for user
- add comment function
- add follow/unfollow function
- add search music function at index page
- ... and a lot more other features could be built on
-
I learnt a lot from this project. I've also learnt that when I build a project, it's better to just look one step ahead. And You can always move on to the next step. Don't overthink how huge the project might be. It only slows your process down. just calm down and relax when you are stressed. You might find better solution while relaxed.
-
There will be lots of things that you don't know or understand. However, as you encounter those problems, you can always learn it and find ways to solve it. Project Based Learning is really helpful. I realize that I can't learn everything about a project and then to build a project. This process will just be really boring and unproductive. And I will never learn everything about the world. I just have to learn as I build. It's a better way to learn.
-
Solve it indirectly is better than wasting time and having no clue. This doesn't mean you can should solve everything lazily(unoptimized). However, if you really can't solve sth in a smart way at first even after trying, you should solve it indirectly(find ways to work around it). you might find better solution as you go along later. Sometimes I just realize that I suddenly understood things that I could not figure out previously even though I've tried it. This is interesting. Sometimes, I will encounter problems that I thought that I can not solve it directly, I solved it indirectly and after building more of this project, I realize and found ways to actually solve it directly. This is a quite interesting phenomenon. I guess we sometimes just can't solve a problem immediately, however, maybe try to solve it indirectly and you might be able to come back and find better solution later. So don't get stuck on it and get frustrated, solve it and move on.
-
don't give up. Great things takes time to come to fruition. Give it time and be patient. move forward step by step. It's okay to take rest and breaks. Don't be too harsh on yourself. rest can be really helpful for you in the long run. so it's necessary. we are all human.
Stay Hungry, Stay Foolish - Steve Job
Author: Zhihong Li([email protected])
Date: Jul 8th 2020