Home Applications IRIS-FlaskBlog

IRIS-FlaskBlog

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
5
1 reviews
0
Awards
203
Views
0
IPM installs
2
1
Details
Releases
Reviews
Issues
Pull requests
Videos
Articles
Realworld Application using Flask, SQLAlchemy, and InterSystems IRIS

What's new in this version

Initial Release

Summary

IRIS-FlaskBlog Application is a real-world application that leverages the functionality of Flask web framework, SQLALchemy ORM, and InterSystems IRIS.
The application contains user registration and authentication with the help of Flask-Login python library, a responsive user interface to create and edit posts.

Application layout

main

Features

  • User registration and authentication
  • Creation of a data structure with SQLALcemy model classes
  • Responsive user interface to create, edit, and delete posts
  • Like and add comments to the post
  • Search based on the user and based on the tags

Used Technologies

Flask: A micro web framework for Python that allows you to build web applications quickly and efficiently.Conduit.

SQLAlchemy: An Object-Relational Mapping (ORM) library that provides a high-level, Pythonic interface for interacting with databases.

InterSystems IRIS: A high-performance, data platform that combines a powerful database with integration, analytics, and AI capabilities.

Installation

  1. Clone/git pull the repo into any local directory
git clone https://github.com/mwaseem75/IRIS-FlaskBlog.git
  1. Open a Docker terminal in this directory and run:
docker-compose build
  1. Run the IRIS container:
docker-compose up -d 

Getting Started

Run the application

To run the application Navigate to http://localhost:4040

Home Page

image

Register a User

To register a user, Click on Sign Up link
image

Once registered, the user will log in automatically, To sign out click on the User Name link and then click on Sign out.
In order to log in, click on sign in link
image

Create a post

From the home page, click on Create a Post button to create a post.
Enter the title, Content, and Related Tags and save the post.
image

View a post (Edit, Delete, Like, or add comments)

Click on the title or on the content of the post in order to Edit or Delete a Post, or Like or add comments to the post.
ViewPost

Edit post

In order to modify the Post, click on Edit Post from the view post page
editpost

List Posts based on User or Tags

Click on Post User to list down all the posts related to users or click on a Tag to list all the related posts.
userfeed

Application database

SQLALchemy will create below tables:

  • user: To store User information
  • post: To store Posts related data
  • tags: To store Tags against the post
  • tags_association: To store links between Posts and Tags
  • comments: To save post comments by users
  • like: To store likes details by users

To view table details, navigate to
http://localhost:52775/csp/sys/exp/%25CSP.UI.Portal.SQL.Home.zen?$NAMESPACE=USER#
image

Special Thanks to:

Dmitry Maslennikov for sqlalchemy-iris liabrary (An InterSystems IRIS dialect for SQLAlchemy ) which was helpful to connect with IRIS

Read more
Made with
Version
1.0.006 Sep, 2023
Ideas portal
https://ideas.intersystems.com/ideas/DPI-I-399
ObjectScript quality test
Category
Frameworks
Works with
InterSystems IRISCaché
First published
28 Aug, 2023
Last checked by moderator
11 Sep, 2023Works