Welcome to the Arraytics Product Solution Frontend! This dynamic and modern user interface complements the powerful backend, providing a seamless experience for managing Arraytics product solutions. The frontend is crafted with cutting-edge technologies, ensuring a responsive and intuitive interface for users.
View the live site frontend here.
View the live site backend here.
+-------------------+ +-----------------+
| Item | | User |
+-------------------+ +-----------------+
| _id: ObjectId | | _id: ObjectId |
| name: String | | name: String |
| created_at: Date | | email: String |
| created_by: String| | password: String|
+-------------------+ | created_at: Date|
| created_by: String|
+-----------------+
- POST /auth/signup: Register a new user. ๐
- POST /auth/login: Log in a user. ๐
- GET /items: Get all items. ๐
- GET /items/:itemId: Get a specific item by ID. ๐
- POST /items/create-item: Create a new item. โจ
- PUT /items/:itemId: Update an item by ID. ๐
- DELETE /items/:itemId: Delete an item by ID. ๐๏ธ
- GET /users: Get all users. ๐งโ๐ผ
- GET /users/:userId: Get a specific user by ID. ๐งโ๐ป
- POST /users/create-user: Create a new user. โ
- PUT /users/:userId: Update a user by ID. ๐
- DELETE /users/:userId: Delete a user by ID. ๐๏ธ
Certainly! Here are the API endpoints and JSON data for the provided code with emojis:
POST /signup: Register a new user. ๐
- Endpoint:
/auth/signup
- JSON Data:
{ "username": "example", "email": "[email protected]", "password": "your_password" }
POST /login: Log in a user. ๐
- Endpoint:
/auth/login
- JSON Data:
{ "email": "[email protected]", "password": "your_password" }
GET /items: Get all items. ๐
- Endpoint:
/items
GET /items/:itemId: Get a specific item by ID. ๐
- Endpoint:
/items/:itemId
POST /items/create-item: Create a new item. ๐ฆ
- Endpoint:
/items/create-item
- JSON Data:
{ "name": "New Item", "created_by": "user_id" }
PUT /items/:itemId: Update an item by ID. ๐
- Endpoint:
/items/:itemId
- JSON Data:
{ "name": "Updated Item", "created_by": "user_id" }
DELETE /items/:itemId: Delete an item by ID. ๐๏ธ
- Endpoint:
/items/:itemId
GET /users: Get all users. ๐
- Endpoint:
/users
GET /users/:userId: Get a specific user by ID. ๐งโ๐ป
- Endpoint:
/users/:userId
POST /users/create-user: Create a new user. ๐งโ๐
- Endpoint:
/users/create-user
- JSON Data:
{ "name": "New User", "email": "[email protected]", "password": "user_password", "created_by": "admin_id" }
PUT /users/:userId: Update a user by ID. ๐
- Endpoint:
/users/:userId
- JSON Data:
{ "name": "Updated User", "email": "[email protected]", "password": "updated_password", "created_by": "admin_id" }
DELETE /users/:userId: Delete a user by ID. ๐๏ธ
- Endpoint:
/users/:userId
User Model: ๐ค
{
"name": "String",
"email": "String",
"password": "String",
"created_at": "Date",
"created_by": "String"
}
Item Model: ๐ฆ
{
"name": "String",
"created_at": "Date",
"created_by": "String"
}
Features:
- Custom Authentication with JWT ๐
- Role-Based Access Control (RBAC) ๐ก๏ธ
- Item Management API ๐ฆ
- User Management API ๐ค
- Authentication Routes ๐ก๏ธ
Technologies:
- Node.js ๐ป
- Express.js โก
- MongoDB with Mongoose ๐
- Bcrypt for password hashing ๐
- Body-parser for parsing incoming request bodies ๐
- CORS for enabling cross-origin resource sharing โ๏ธ
- Dotenv for environment variable management ๐
- Nodemon for development server auto-reloading ๐
- Zod for TypeScript-first schema declaration and validation ๐๏ธ
Features:
- User Interface for Arraytics Product Solution Management System ๐
- Authentication UI ๐ก๏ธ
- Item Management UI ๐ฆ
- User Management UI ๐ค
Technologies:
- React for building user interfaces โ๏ธ
- Vite for frontend tooling and development ๐ ๏ธ
- Chakra UI for building accessible and themeable UI components ๐ฉโ๐จ
- Emotion for styling components with JavaScript ๐
- Axios for making HTTP requests ๐
- Framer Motion for creating smooth animations ๐
- React Query for data fetching and state management ๐
- React Router for navigation ๐ฆ
- React Icons for including popular icon sets ๐จ
- Yup for form validation ๐
- SweetAlert2 for displaying beautiful alerts ๐ฌ
- Tailwind CSS for utility-first styling ๐จ
To make the installation process for both the frontend and backend repositories attractive, you can follow these steps:
-
Clone the Repository:
git clone https://github.com/Hamed-Hasan/Building-arraytics-product-solution-backend cd arraytics-product-solution-backend
-
Install Dependencies:
npm install
-
Set Environment Variables: Create a
.env
file in the root directory and add the necessary environment variables likeMONGODB_URI
,JWT_SECRET
, etc. -
Run the Application:
npm start
This will start the backend server.
-
Verify Backend Installation: Open your browser and go to http://localhost:5000 to verify that the backend server is running.
-
Clone the Repository:
git clone https://github.com/Hamed-Hasan/Building-arraytics-product-solution-frontend cd arraytics-product-solution-frontend
-
Install Dependencies:
npm install
-
Set Backend API URL: In the
.env
file or in your configuration, set theREACT_APP_API_URL
to the backend API URL (e.g.,http://localhost:5000
). -
Run the Application:
npm run dev
This will start the frontend development server.
-
Verify Frontend Installation: Open your browser and go to http://localhost:5471 to verify that the frontend application is running.
Now, you have both the backend and frontend up and running. You can explore the Arraytics Product Solution Management System by navigating through the provided routes and endpoints.
Feel free to reach out if you encounter any issues during the installation process or if you have any questions about the codebase!