This simple blog application has been developed using Firebase. Users can log in, create new posts, and delete their own posts if they are the author.
-
Login: Users can log in using Firebase Authentication.
-
Create Posts: Users can create blog posts.
-
Delete Posts: Users who created a post can delete their own posts.
-
Create a Firebase Project: Create a new project on the Firebase console and configure the necessary settings.
-
Firebase Configuration: Create
src/firebase-config.js
file and import your Firebase configuration.// src/firebase-config.js import { initializeApp } from "firebase/app"; import { getFirestore } from "firebase/firestore"; import { getAuth } from "firebase/auth"; const firebaseConfig = { apiKey: "your-api-key", authDomain: "your-auth-domain", projectId: "your-project-id", storageBucket: "your-storage-bucket", messagingSenderId: "your-messaging-sender-id", appId: "your-app-id", }; const app = initializeApp(firebaseConfig); const db = getFirestore(app); const auth = getAuth(app); export { db, auth };
-
Install Dependencies: Open the terminal in the project directory and run the following command to install dependencies:
npm install
-
Run the Application: Start the application with the following command:
npm start
-
Login: Open the app, log in with your google account.
-
Create a Post: Navigate to the create post section and write your blog post.
-
Delete a Post: If you authored a post, you will see a delete button. Click it to remove your post.