Welcome to LandPost!
LandPost is an environmentally focused blog which allows users to upload posts in the form of photos and bodies of text.
LandPost is centered around a vision for an app that is focused completely on nature and our experiences within it. There is not a like button, there is only the ability to comment on other's photos. Designed minimally, LandPost reflects a more relaxed and fun focused social media. This app is free of advertisements and video.
LandPost is a cloud-based app that was built using express within a "Model, View, Controller" framework. Data is stored in a remote Mongo cloud database. All of the functionality is written in javscript. The aesthetics and layout of the app are handled by CSS.
Data input through forms on the site is stored,updated and deleted in a remote Mongo database. Within the database, there are three main collections of data. Each of these collections share entity relationships with one another. The user may create 0 to many posts. Each post is tied to a specific username. Every post can have 0 to many comments. Every comment is tied to a specific user via the username data.
New data sets are entered via forms on their respective EJS pages. Each form is modeled after its corresponding schema in the models folder. For instance, whenever a user creates a new post, a hidden piece of data (the current user's username) is entered automatically as the post's username in the database. Therefore, the app becomes dynamic based off of whether the current user is the author of a post or is just a viewer of the post. If the user owns the post, they can edit or delete the post.
The same functionality applies to comments as well. When a comment is entered, the current user's username is stored as a key/value pair in the comment collection. If a user wrote a comment, they can delete the comment. If the user owns the post, they can delete the comment.
The main index page displays the current user's name. Each post listed on the main page displays it's authors name and appropriate avatar image.
Hidden Inputs on Forms
Upon arrival on the application's home page, the user is presented with a login:
Email: 'String' Password: 'String'
Both the email and username must be entered correctly. If login credentials are incorrect, user is denied entry. At current state, user must go back to login page to either try again or register with the following credentials:
Email: 'String' Password: 'String' Username: 'String'
While all three credentials are required, only the the email and username must be unique. Upon valid registration, user may enter submit and is navigated to login screen.
Once logged in, a user is directed to the main index page and a new session begins. Cookies are stored for two weeks.
On the index page, the user is presented with options. They may either logout (ends the session and returns to login), click on a post to navigate to its show page, or create a new post (directs user to create new post page). At any point in the user's experinece after logging in, the user can navigate to the main index page by clicking the LandPost logo at the top navigation bar.
On the Create Post Page, the user must enter the following:
body: String, image: String, location: String
The image is the only required field of the Post data collection. A hidden field automatically enters the username and avatar image. When submit is hit, user is taken back to index page.
On the show post page, the user views a selected post from the main index page. The user can comment on the post by clicking the comment button. If the user is the author of the post, they can edit or delete the post.
The user can edit any post that they themselves have posted. On this page, they can change any of the following:
body: String, image: String, location: String
When submitted, the user is redirected back to their newly edited post.
The delete post function is only made available if the current user is the author of the post. This button deletes the post from the database and redirects the user back to the main index page.
On the new comment page, a user may write text and submit their comment. When submitted, user can view the comment by navigating back to the post.
MetaRUs @7vma @vvela2022 @bbakercello










