Quizoinator is divided into two modules: community portal and quiz portal. The community portal is a place where users can create posts, comment on them, like them and make relationships with other users. The quiz portal is a place where users can create quizzes and solve them. The application is written in Python using the Flask framework. The database used is sqlalchemy.
- Python
- Flask
- SQLAlchemy
- HTML
- CSS
- JavaScript
- Bootstrap
- Docker
- Docker-compose
After successful setup, the application will be available at http://localhost:5000
git clone https://github.com/KubiakJakub01/quizoinator.git
cd quizoinator
- Linux:
sudo apt install python3
For MacOS you can also use Homebrew:
brew install python3
For more information visit:
https://docs.python-guide.org/starting/install3/osx/
After installing python, make sure that it is added to the PATH. Check it by running the following command:
python3 --version
Follow the instructions on: https://pip.pypa.io/en/stable/installation/ to install pip.
Follow the instructions on: https://docs.docker.com/get-docker/ to install docker.
Create a virtual environment and install the requirements:
python3 -m venv .venv
source venv/bin/activate
pip install -r requirements.txt
python -m venv .venv
.\venv\Scripts\activate
pip install -r requirements.txt
Then run the application:
python3 app.py
Build the image:
docker build -t quizoinator .
Run the container:
docker run -p 5000:5000 -v ./instance:/app/instance -v ./src/static/user/images:/app/src/static/user/images quizoinator
docker compose up
To fill the database with sample data, run the following script:
python3 feed_db_with_sample_data.py \
[--db_url instance/database.db] \
[--pictures_dir images/sample_avatars] \
[--pictures_save_dir src/static/user/images] \
[--posts_num 10] \
[--comments_num 30] \
[--likes_num 50] \
[--relationships_num 20]
- Home page:
- Sign up page:
Click on the Sign up
button in the navbar.
- Login page:
Click on the Login
button in the navbar.
- User home page:
After successful login, you will be redirected to the user home page.
- Update user profile page:
Click on the Update
button in the navbar.
- Browse blog:
Click on the Blog
button in the navbar to browse the blog.
Click on the View posts
button to view blog.
- Post view:
Click on the View
or in the post title to view post.
- Like view:
Click on the likes text to view who liked the post.
- Add comment:
Write a comment and click on the Add
button.
Your comment will be added to the post.
- Write post:
To write a post, click on the Blog -> Add post
button in the navbar.
Write title, content and click on the Add
button.
After adding the post, you will be redirected to the blog.
- Like post:
To like a post, click on the Like
button.
- Search posts:
You can search posts by title or content.
- Add friend:
To search for users write their username in the search bar.
Then click on the Search
button. If the user exists, you will be redirected to his profile.
You can send a friend request by clicking on the Add friend
button.
You can view your friends by clicking on the Friends
button in the navbar.
- Friend request:
If someone sends you a friend request in Friends view you will see a notification. You can accept or reject the friend request.
- Accepted friend request:
- Admin panel:
To access the admin panel, you must be logged in as an admin.
- Admin panel - users:
- Admin panel - admin users:
- Admin panel - add admin:
In the admin panel, you can add a new admin.
Click on the Add admin
button.
Then write id of the user you want to add as an admin and click on the Add
button.
After this new user will be able to access the admin panel.