flask-forum icon indicating copy to clipboard operation
flask-forum copied to clipboard

A Forum built on top with Flask

Flask Forum PRs Welcome GitHub license

This application can be used as starter kit if you want to get started building a fullstack application with the framework Flask. This is a classic forum using features like registration and signing in, managing threads, commenting, searching threads, like threads and replies, mark replies as best and many other feature which can be found in most web applications.

Technologies

Frontend

  • Bootstrap 4 - Bootstrap is the most used CSS framework.
  • Vue JS - The Progressive JavaScript Framework for building great user interfaces.
  • Other front-end library will be found in a package.json file.

Backend

  • Python 3.7
  • SQLite3 for development and MySQL for production.
  • Flask - A Python Micro-Framework
  • Other Python librairies used in the project can be found in the requirements.txt file

Features

  • CRUD (create / read / update / delete) on threads.
  • CRUD (create / read / update / delete ) on replies.
  • Mark replies as best by the thread's owner.
  • Like threads for authenticated users
  • Favorite replies for authenticated users
  • Pagination on threads listing
  • Searching on threads
  • Registration with confirmation mails

Prerequisites

  • Python (3.6 or above)
  • SQLite3
  • Git
  • Composer
  • Npm (or Yarn)

Installing / Getting started

  • Clone the project from Github
    $ git clone https://github.com/juvpengele/flask-forum.git
    $ cd flask-forum
  • Create the .env file:
    $ cp .env.example .env

In the .env file, there are config related to the database and mail that must be added.

  • Create the virtual environment file. I use virtualenv for the example but you are free to use any other tool to create your virtualenv:
    $ virtualenv venv
    $ . venv/bin/activate
  • Install dependencies from requirements.txt file
    $ pip install -r requirements.txt
  • Seeds required data to the database
    $ flask seed run --root="forum/database/seeds"
  • Start the development server
    $ flask run

Licensing

MIT