Skip to content

A Full utility Platform example made in ReactJS Framework, full authentication utility using the firebase database.

Notifications You must be signed in to change notification settings

x86senniral/ReactJS-Platform-Advermte

Repository files navigation

About

A full template of a React platform with full-authentication utlity, messaging system/Threads and creating public posts that can be seen by other users. Additionally each user has their own IDs & customizable Public profile that also can be seen by other users as well. The focus on the platform is mostly based on backend. Front-end is an extremely basic design made using tailwindcss.

Initialization.

The Initialization is as simply as initializing your firebase firestore and configurations:

  • Register a a firebase account.
  • Create your project.
  • Enable "Web Application" / Create a "Web Application" in firebase settings.
  • Enable the "Register with email and password" option. (Found under authentication > Sign In Methods)
  • Enable Firestore Storage.

Great, now you have your own database and storage. Next step is to allow read and write, go inside your Firestore Database > Rules and change it to:

rules_version = '2';

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}

Then click publish to confirm.

Replacements.

Now that you have everything set up, when creating your firebase project you should've been provided with your firebase configuration settings, should look something like this:

import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";
import { getFirestore } from "firebase/firestore"; 
import { getStorage } from "firebase/storage"; 

// Your web app's Firebase configuration
const firebaseConfig = {
  apiKey: "",
  authDomain: "",
  projectId: "",
  storageBucket: "",
  messagingSenderId: "",
  appId: ""
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);

// Initialize Firebase Authentication and get a reference to the service
export const auth = getAuth(app);

export const firestore = getFirestore(app);

export const storage = getStorage(app); // Initialize Firebase Storage

Although yours might be a little different the piece that you need to replace is firebaseConfig with your ACTUAL firebase configurations :

const firebaseConfig = {
  apiKey: "your api key",
  authDomain: "domain",
  projectId: "project id",
  storageBucket: "storage bucket",
  messagingSenderId: "sender id",
  appId: "appID"
};

That's pretty much it!

Deployment

  • Install all of the required dependencies: npm install
  • Deploy: npm run dev
  • Access the project at the localhost:port specified. In our case it's most likely http:https://localhost:5173/ since i'm using vite.

SHOWCASE:

A couple of screenshots of how the web application looks like and operates.

  • Landing Page (It's mostly animated with waves and typing libraries):

  • Authentication Pages:

  • Landing Page (OnLogin)

  • Settings Page:

(I'll showcase the threads at the end)

  • Public profile

  • Public posts The posts also have the "Post limit per page" feature.

  • Pricings Sayyyy you're building some advertising website or something you'd like to showcase, then we have:

There's still more but this is the general showcase.

THREADS / MESSAGING system showcase

Additionally, as a user, say you're browsing the "posts" page. Let's make another account:We are now logged in as "GreatApe" Lets browse the "posts" page: We can now see the posts we published using our other account "VAH" and can message them about it. This is where threads comes in, on the click of the message button: Now logging back into our VAH account, Landing Page: Threads Page (settings): We are now able to see that someone has sent us a message and therefore can simply reply:

There is still more to it but I can't cover the entire thing through screenshots. :D

About

A Full utility Platform example made in ReactJS Framework, full authentication utility using the firebase database.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages