Giter Site home page Giter Site logo

berubejd / teamblog Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 371 KB

A small Flask application that provides a means for a team of bloggers to create and manage a public blog

Home Page: https://berubejd.pythonanywhere.com/

Python 26.72% CSS 7.53% Jinja 65.75%
flask passwordless flask-uploads flask-simplemde sendgrid-api flask-wtf wtforms flask-flatpages

teamblog's Introduction

Team Blog

Team Blog is a small Flask application that provides a means for a team of bloggers to create and manage a public blog.

Features

Custom passwordless authentication

While most Flask applications use an authenticaton system based on flask-login, I wanted to implement a passwordless system. Rather than require a local password to be stored or to depend on a third-party OAuth system, access is provided via encrypted tokens delivered by email. Email delivery, in this implementation, is now being provided by Resend's API.

Markdown generated HTML blog pages

The blog pages themselves are generated from markdown stored on the filesystem using flask-flatpages. This markdown, and the associated metadata required to properly manage those pages, is created via the custom Admin page located at '/admin'. (Since accounts are "closed" to only invited team members, the admin page is not linked from the main website.)

The admin page uses a JavaScript library called SimpleMDE (provided by flask-simplemde) to provide an incredible editor that allows the final page to be previewed before being published.

Image file management

Finally, the image management page leverages a small amount of custom JavaScript written using jQuery and flask-reupload (an up to date version of flask-uploads). Although the original project does appear to still be active, the maintainer has decided to no longer publish up to date project files to Pypi. The flask-reupload project has expanded upon the original work, while maintaining backwards compatibility, and provides the updated extension via Python package to make it easy to incorporate into your project.

Screenshots

Landing Page

Landing

Admin Page

Admin

Blog Cards

Cards

Image Management

Management

Other Resources

Although a number of tools have already been mentioned, there were also a few tutorials that were helpful in completing this project. Those tutorials were:

The entire website has been implemented using Flask, Flask-WTF, and Bootstrap 4, but was designed based on a template created for Jamstack with Stackbit:

Future Improvements

  • The app is complicated enough and already organized around three "functions" (blog, admin, image management). Migrating those pieces into blueprints would make future application development easier to manage.
  • This Flask app was designed using the "traditional" app.py pattern but would potentially benefit from being implemented using the "factory pattern".
  • Having implemented passwordless authentication, creating an extension from it would improve its use in future projects.
  • It is currently possible to view blog entries by date and by tag but not by author.

teamblog's People

Contributors

berubejd avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.