Tech Stack Used :
- Frontend : HTML, CSS, JS, React
- Backend : appWrite
- For Text Editor : tinyMCE
- For Forms : React-hook-form
- html-react-parser
Steps Involved :
- Create Vite App ✅
npm create vite@latest
-
Install dependencies ✅
-
Install Redux Toolkit
npm install @reduxjs/toolkit react-redux
-
Install React Redux
npm install react-redux
-
Install React Router Dom
npm install react-router-dom
-
Install appwrite
npm install appwrite
-
Install tinyMCE
npm install tinymce
-
install html-react-parser
npm install html-react-parser
-
Install React hook form
npm install react-hook-form
-
Install Tailwind and Configure
npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p
-
-
Test Server ✅
npm run dev
-
Setup Environment Variables ✅(.env file)
-
git ignore for .env file ✅
-
Initialize Environment Variables (appWrite) ✅
- Create Project
- Create DataBase
- Create Collection
- Create Attributes (title, content, featuredImage, status, userID)
- Create Index (status)
- Create Bucket / Storage (Images)
- Configure Environment Varibales ✅
- Create a Service (AuthService : It is a Class), in a file auth.js ✅
- Define Constructor Mehtod ✅
- Define all other Mehods for : (SignUp, Login, Logout and getCurrentUser) ✅
For Better Practices, we use try catch in all these methods so that we can easily handle errors.
Here is documentation on How to use Appwrite for Authentication
- Create Config.js service ✅
- Create Constructor Mehod and Initialize variables ✅
- Post Related Services : Database Docs
- createPost Method : Create a Document ( taking slug as id ) ✅
- updatePost Method : Update the Document ( No need to pass UserID, as only the owner can use this method) ✅
- deletePost Method : Deletes the Document ✅
- getPost Method : On Clicking a Particular Post, that post opens up. ✅
- getPosts Method : All the posts available on the feed. Query Docs ✅ [Here, We got to know how to pass Queries, and what Other parameters we can give in this method ( i.e Pagination , Number of Results, etc)]
- File Upload Services : Storage Docs
- uploadFile Method : Upload the File to the Storage (or Bucket) ✅
- deleteFile Method : Delete the File Using the fileId provided during uploadFile() ✅
- getFilePreview Method : Previews the File, It is fast and hence We don't need to use async - await here. ✅
- Setting up a store using Redux toolkit : (store.js, configureStore({}))✅
- Creating and configuring redux store and authentication slice (authSlice.js, createSlice({name, initialState, reducers : {//actions(methods)}}), authSlice.reducers, authSlice.actions) ✅
- Configuring Redux Toolkit for managing state and actions in big projects (state, action, action.payload)✅
Create Components ✅
- setLoader ✅
- getCurrentUser and dispatch() ✅
- change Loader value ✅
- Conditional Rendering ✅
- Container
- Updating Footer Component ✅
- Create Logo Component
- Create LogoutBtn Component in Header
- update Header Component ✅
- Create Button Componenet ✅
- Create Input Component ✅
- Importing components in React using index file ✅
- Create Select Component ✅
- Create PostCards Component ✅
- Create Login Component ✅
- Create Signup Component