
Collective Blog / Digital Magazine
React / Next.js / Tailwind / Firebase
Summary
Blog structure built from scratch using Next.js 13 and Tailwind CSS.
Description
This project consists of a blog or magazine that can be updated by creating new posts. Users can create a username and password. The editing feature present in this project was motivated by the demand of a client who expressed the need to be able to edit and publish his own content. Only logged in users can modify the content of the platform. The solution I created even makes it possible for a group of people to maintain the site's content collectively.
Once logged in, users can create new posts, edit existing posts and delete posts. On the post editing/creation page, the user can use the Markdown language to format the texts. It is also possible to add images to posts. Markdown is an easy-to-learn language for users with little or no technical knowledge. With it, you can easily add highlighted headings, numbered lists, italics, bold, and other formatting. There are some posts on the blog itself that explain how to use this feature.
Technical Specifications
The project was written in React 18 syntax, using the Next.js 13 routing framework.
For the styles, Tailwind CSS integrated with Next.js was used. The page is fully responsive, and all elements can be viewed on devices such as computers, cell phones and tablets. The homepage header contains animations powered by React Framer Motion.
For real-time data storage, Firebase Firestore was used. For storing users and authentication data, Firebase Auth was used. This way, data added by users persists and can be accessed from any device.
The routes that lead to the creation of new posts and editing the content of existing posts are protected in two ways: client-side, the application directs non-logged-in users to the login page; server-side, the database only accepts GET requests from non-logged in users, and POST request will be denied. Thus, non-logged in users can read the content of posts, but cannot edit the content. In a production context, links and routes for editing content can be protected, guaranteeing access only to blog/magazine editors.
Therefore, this solution combines the best of both worlds: on the one hand, there is the speed of an application made in React/Next.js; on the other hand, there is the interactivity and ease of feeding existing content on websites hosted on platforms such as Wordpress, Wix, etc. - and without the need to pay for these services.
Technologies
Next.js
React JS
Tailwind
Firebase
Framer Motion
Markdown
back