GithubHelp home page GithubHelp logo

umutplvn / mirror_ai-app Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 208 KB

Icon Generator

Home Page: https://mirror-icon-umut.netlify.app/

HTML 9.38% JavaScript 90.34% CSS 0.28%
authentication firebase provider-state-management react state tailwindcss useeffect usestate

mirror_ai-app's Introduction

Mirror AI App

Description

Project aims to create a Icon Generator App by using AI.

Note: Api let us to generate only 100 icon per day.

Project Skeleton

009 - Icon Generator App (folder)
|
|----readme.md         
SOLUTION
├── public
│     └── index.html
├── src
│    ├── auth
│    │     └── firebase.js
│    ├── components
│    │     ├── Mirror.js
│    │     └── Navbar.js
│    ├── context
│    │     └── AuthContext.js
│    ├── pages
│    │     ├── Login.js
│    │     ├── Register.js
│    ├── router
│    │     └── Router.js
│    ├── App.js
│    ├── App.css
│    ├── index.js
│    └── index.css
├── package.json
└── yarn.lock

Objective

Build a Icon Generator App using ReactJS.

At the end of the project, following topics are to be covered;

  • HTML

  • CSS

  • JS

  • ReactJS

At the end of the project, students will be able to;

  • improve coding skills within HTML & CSS & JS & ReactJS.

  • use git commands (push, pull, commit, add etc.) and Github as Version Control System.

Steps to Solution

  • Step 1 : Create React App using npx create-react-app movie-app and install firebase npm i firebase / yarn add firebase

  • Step 2 : Signup https://firebase.google.com/ and create new app in firebase. Firebase is a backed application development software that enables developers to develop iOS, Android and Web apps. It provides developers with a variety of tools and services to help them develop quality apps, grow their user base, and earn profit. It is built on Google’s infrastructure. Firebase offers a number of services, including: analytics,authentication, cloud messaging, realtime database, performance and test lab. Firebase is categorized as a NoSQL database program, which stores data in JSON-like documents.

  • Step 3 : Use https://firebase.google.com/docs/auth/web/start and create Authentication operations.

    • Add the Firebase Authentication JS codes in your firebase.js file and initialize Firebase Authentication:
import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";

// TODO: Replace the following with your app's Firebase project configuration at project settings part
// See: https://firebase.google.com/docs/web/learn-more#config-object
const firebaseConfig = {
  // ...
};

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

// Initialize Firebase Authentication and get a reference to the service
const auth = getAuth(app);
  • Use this method to Sign up new users :
import { getAuth, createUserWithEmailAndPassword } from "firebase/auth";

createUserWithEmailAndPassword(auth, email, password)
  .then((userCredential) => {
    // Signed in
    const user = userCredential.user;
  })
  .catch((error) => {
    console.log(error);
  });
import { getAuth, signInWithEmailAndPassword } from "firebase/auth";

signInWithEmailAndPassword(auth, email, password)
  .then((userCredential) => {
    // Signed in
    const user = userCredential.user;
  })
  .catch((error) => {
    console.log(error);
  });
  • Use this method to Set an authentication state observer and get user data :
import { getAuth, onAuthStateChanged } from "firebase/auth";

onAuthStateChanged(auth, (user) => {
  if (user) {
    // User is signed in, see docs for a list of available properties
    // https://firebase.google.com/docs/reference/js/firebase.User
  } else {
    // User is signed out
  }
});
import { GoogleAuthProvider } from "firebase/auth";

const provider = new GoogleAuthProvider();

signInWithPopup(auth, provider)
  .then((result) => {
    // The signed-in user info.
    const user = result.user;
  })
  .catch((error) => {
    // Handle Errors here.
    console.log(error);
  });
  • Use this method to Sign Out :
import { getAuth, signOut } from "firebase/auth";

signOut(auth)
  .then(() => {
    // Sign-out successful.
  })
  .catch((error) => {
    // An error happened.
  });
  • Use this method to Send a password reset email :
import { getAuth, sendPasswordResetEmail } from "firebase/auth";

sendPasswordResetEmail(auth, email)
  .then(() => {
    // Password reset email sent!
  })
  .catch((error) => {
    const errorMessage = error.message;
    // ..
  });
  • Step 4 : Signup https://mirror-ai-api-docs.gitbook.io/mirror-ai-api/ and get API key.

  • Step 5: You can use css frameworks Tailwindcss.

Notes

  • You can add additional functionalities to your app.

☺ Happy Coding ✍

mirror_ai-app's People

Contributors

umutplvn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.