Previous Project

Swipe right

Next Project

Swipe left

Blog

2024

Idea

The primary goal of this project was to develop a full-stack application using a technology stack comprising Express.js, PrismaORM, and PostgreSQL. I specifically selected this stack out of a desire to deepen my knowledge of Express.js and to explore the use of an ORM that integrates well with a relational database. I decided to create a blog application because it includes all CRUD operations, providing a comprehensive learning experience. Additionally, a cloud service would be needed to ensure persistance for the images.

Implementation

The project is structured in a typical REST service architecture. The backend is built with Express.js, which provides endpoints for all CRUD operations required by the frontend. The backend is layered into a modular structure consisting of a services and routes module. The service module provides the logic regarding authentication and CRUP operations, which then are made use of inside their respective routes.

The frontend, built with React, allows users to upload, edit, fetch, and delete blog posts. User authentication is handled using JSON Web Tokens (JWT). When a user logs in, a token is generated and signed with user information, then stored as an HTTP cookie. A profile endpoint continuously validates the token whenever the header gets mounted and responds with the corresponding user information. The blog creation and editing functionalities utilize the React-Quill library. React-Quill offers a user-friendly text editor, allowing users to create and edit posts effortlessly. All user and blog post data is stored in a PostgreSQL database. Firebase Cloud is used to provide a persistent storage for the file images in order to achieve reliabilty, even after restarts and redeployments. The database schema is designed to reference user and post entries, ensuring data integrity.

The frontend is deployed using Netlify, providing a great deployment pipeline for the React application. The backend server and the PostgreSQL database are deployed using Railway, ensuring reliable hosting for the server and database.

Deployment

Visit the deployment on https://myfullstacktechblog.netlify.app