No Description

chopin42 8f77043a3e Cleaning and changing Makefile 4 years ago
templates 4d9b28af08 first commit 4 years ago
Makefile 8f77043a3e Cleaning and changing Makefile 4 years ago
README.md 4b7cee6223 Correcting last commit 4 years ago
app.py 4ef5587611 Updating the script because of login.py 4 years ago
data.db 48031381ce Adding login.py 4 years ago
helper.py 4ef5587611 Updating the script because of login.py 4 years ago
login-ex.py 1d12ca0c9d Upgrading login.py 4 years ago
login.md 48031381ce Adding login.py 4 years ago
login.py 1d12ca0c9d Upgrading login.py 4 years ago
requirements.txt 66657ac72a Adding requirements.txt file 4 years ago
todo.md 4d9b28af08 first commit 4 years ago

README.md

Simple forum

This is a simple forum built-in Flask framework in Python. The main code is less than 100 lines to be as lightweight as possible. For the moment the forum is very basic.

Features

  • Manage accounts
  • Order the topics by most active, new and categories
  • Like the topics and answers
  • Integrate HTML formating (need to change this for security purposes)
  • Bumb the posts by reply (the posts are ordered by the last actives)

In the future I want to integrate the following ones as well

  • Trust system and badges
  • Notifications
  • Private msgs
  • Change the password and manage the account
  • Manage categories and limit them
  • Create a search bar to search through, topics and replies

Why I made it

I made this forum because I want to make a serie of basic lightweight web apps that can be used to make other projects as well. I challenged myself to make apps with the following lines limits:

  • 100 lines for the main logic code (app.py)
  • 100 lines for the non-logic code (helper.py)
  • Not really a limit, but trying to keep it small anyway for the templates. But not using external imports. Raw CSS only.
  • Other modules are allowed, only if they can be used for a various projects (login.py)

So these are the advantages:

  • You got a full control over the code because it's simple and basic. You can make it more complex if you want to, but it remmains under your control
  • You can use it for education purposes by understanding the code
  • You can kickstart your project by integrating this one as a base
  • Less lines, less bugs, less troubleshooting :p
  • The code is durable, there are less chances that the code becomes obsolete
  • Peer to peer friendly, you can adapt the code to make a peer to peer app
  • Low-end servers and clients friendly.
  • Fast websites. Because the code is limited and no more unneccessary CSS and JS is included the website is much faster

In bonus you can also uses the 'login.py' script to speed up the devloppement of the account management in your own Flask apps.

How to build the source code

  1. Install the depedencies

Debian:

sudo apt install python3 python3-pip
pip3 install -r requirements.txt --user

Fedora:

sudo dnf install python3 python3-pip
pip3 install -r requirements.txt --user
  1. (Optional) Change the template to fit your needs
  2. Run the main file:

    python3 app.py
    

Note: to change the style of the website I highly recommend you to use the 'Style inspector' built-in in Firefox.

How to use the login.py

You can find the login.py's documentation here.