Skip to content
Shop

CommunityJoin Our DiscordDonate

Sponsored Ads

Sponsored Ads

Blog App ​

Build a blog app with the following features. You can Buy the solution from the Dev Shop.

Functional Requirements ​

  • Create,Read,Update,Delete
  • Notification new posts
  • Search
  • Commenting on Posts
  • Reacting to posts
  • Liking posts

Sample below:

python
class Post(x):
    print("do bank stuff")

Non Functional Requirements ​

  • Reliable
  • Available

Schema ​

POST has many COMMENTS
COMMENT belongs to a POST
USER has many posts
POST belongs to a USER

Post

columndescription
idid of the item
contentname of the item
image_urlname of the item
video_urlname of the item
youtube_urlname of the item
audio_urlname of the item
user_iduser who made the post

Comment

columndescription
idid of the item
contentname of the item
post_idname of the item
namename of the item
namename of the item

User

columndescription
idid of the item
emailname of the item
passwordname of the item
first_namename of the item
last_namename of the item

PostLikes

columndescription
idid of the item
post_idname of the item
user_idname of the item

PostReactions

columndescription
idid of the item
namename of the item
reactionenum of name of the item

Business Rules ​

Rules about how things should work...

Solution
py
class Bank:
    def __init__(self,name="New Bank"):
        self.name = name
        self.accounts = []
    def add_account(self,x):
        self.accounts.append(x)

class Account:
    def __init__(self,name="New Account",account_holder=None):
        self.amount = 0
        self.name = name
        self.account_holder = account_holder
    def withdraw(self,x):
        self.amount -= x
    def deposit(self,x):
        self.amount += x
    def __repr__(self):
        return str({
            "name": self.name, 
            "amount": self.amount, 
            "account_holder": self.account_holder
            })

chase = Bank("Chase")
print(chase.name)

my_account = Account("Household","Tutorial Doctor")
my_account.deposit(600.00)
my_account.withdraw(100.00)
print(my_account.amount)

chase.add_account(my_account)

print(my_account)

print(chase.accounts)

Things to consider ​

  • What libraries could you use? built-in?
  • What design patterns?

Discord