Video Demo: https://www.youtube.com/watch?v=BI27aOo4Af0
V2CS is a tiny and user-friendly fourm.
To get start on development mode, You need to:
- Install redis by following the link: https://redis.io/docs/getting-started/installation/
- Start redis on its default port, or configure the port to which v2cs will connect with
app.config['SESSION_REDIS'] = address:port
inapp.py
- Register at mailgun, create SMTP account, and save SMTP username and password
- Export mail username and password as environment variable:
$ export MAIL_USERNAME=xxx@xxxx.ltd $ export MAIL_PASSWORD=xxxxxxxxxx
- To run the program locally with out TLS, you must set:
$ export DEV_MODE=on
- Use
to install requirements
$ pip3 install -r requirements.txt
- Use
to run.
$ flask run
The default database v2cs.db
has 6 users, and all their passwords are adminadmin
, just for test.
They are:
UID | username | |
---|---|---|
1 | admin | admin@example.com |
2 | malan | malan@harvard.edu |
3 | brian | brian@cs.harvard.edu |
4 | jack | jack@example.com |
5 | jerry | jerry@example.com |
6 | jitewaboh | jitewaboh@lagify.com |
Open http://127.0.0.1:5000
, and you can see the page.
- Click on the button
Sign up
, type in your email address, and click submit. - Open the link sent to your mail box (check spam), and fill in username, password to finish your registration.
- After your registration, you will be automatically logged in
- Post must has a title, but content is not neccessary.
- Post content support markdown, UTF-8 and even code highlight.
- To make sure you didn’t mess up the layout, you must preview it before post it when the content is not empty.
- Click submit, and your post is submitted!
- Comments support markdown as well.
- Latest comments are always on the top.
- Click submit and your comment is submitted.
- Every node has a color attached to it. (Inspired by Discourse)
- Admins can add or edit nodes.
- Every node has a unique id and a unique node name, node id is used for foreign key, and node name is used for url so lowercased letters are recommended, while node display name can be actually UTF-8 characters.
- You can view the posts posted by the user, comments commented by the user, and more awesome information on user profile page.
- Times (Joined at XXXX) are shown in your timezone and the format habit in your country set in the browser.
- Avatar is provided by Gravatar.
- You can easily change your username, email, and password in settings, just in few clicks.
- If anything goes wrong, a prompt will give you some advice.
- Admins can update the meta data of the posts, update nodes, and add new nodes.
- However, for security, we don’t allow them to edit or update user info.
- Latest is a posts table sorted by the last activity.
- Hot is a posts table sorted by comments number and in 24h.
- NSFW is a table of posts tagged as NSFW, either by user or admins.
More features, just run and try!
!!! Although I have tried my best, never use this for production unless you have analyzed the whole project for security!!!