- Application that would contain the essence of every project I made and more
- The project is not perfect but i gave it my best considering i made it alone and will improve it and add more features in later versions
The user can
- register and login
- create products
- edit and delete his/her products
- search for products by name or categories
- comment on products and delete his/her comments
- exchange messages with other users
- cd to the backend directory
- npm install
- create the .env
- JWT_SECRET=anysecretyouwant
- PORT= 5000
- DB_URI=*the link to your mongodb *
- npm run dev
- cd to the frontend directory
- npm install
- npm start
-
{
- "firstName": "didi",
- "lastName": "didi",
- "email": "didi@gmail.com",
- "password": "12345678",
- "picturePath": "testimonial-1.jpg",
- "location": "egypt",
- "gender": "female" }
{
- "firstName": "didi",
- "lastName": "didi",
- "email": "didi@gmail.com",
- "password": "$2b$10$q51mT6qCACr7VioFLOH9TenU/.VdHe2w5bu7xAPimVYFUK0YbeZWC",
- "picturePath": "testimonial-1.jpg",
- "location": "egypt",
- "gender": "female",
- "products": [],
- "messages": [],
- "_id": "63d7891e8c9e31704437d6db",
- "createdAt": "2023-01-30T09:08:46.523Z",
- "updatedAt": "2023-01-30T09:08:46.523Z",
- "__v": 0 }
-
{
- "email": "dodo@gmail.com",
- "password": "12345678" }
{
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYzZDc4OTRkOGM5ZTMxNzA0NDM3ZDZkZCIsImlhdCI6MTY3NTA2OTkyOCwiZXhwIjoxNjc1MzI5MTI4fQ.szB25B6-Q9QhkmZpV917rkP0pST270nWpo8Ri6JNMcc",
- "user": {
- "_id": "63d7894d8c9e31704437d6dd",
- "firstName": "dodo",
- "lastName": "dodo",
- "email": "dodo@gmail.com",
- "password": "$2b$10$kpjeOtYXg/n3U9n.muU2o.IRzIPa7Bct6kn2lrYGKooddKvpS2RiS",
- "picturePath": "testimonial-1.jpg",
- "location": "egypt",
- "gender": "female",
- "products": [],
- "messages": [],
- "createdAt": "2023-01-30T09:09:33.377Z",
- "updatedAt": "2023-01-30T09:09:33.377Z",
- "**v": 0 } }
-
{
- "_id": "63d7891e8c9e31704437d6db",
- "firstName": "didi",
- "lastName": "didi",
- "email": "didi@gmail.com",
- "password": "$2b$10$q51mT6qCACr7VioFLOH9TenU/.VdHe2w5bu7xAPimVYFUK0YbeZWC",
- "picturePath": "testimonial-1.jpg",
- "location": "egypt",
- "gender": "female",
- "products": [],
- "messages": [],
- "createdAt": "2023-01-30T09:08:46.523Z",
- "updatedAt": "2023-01-30T09:08:46.523Z",
- "__v": 0 }
-
[
- {
- "_id": "6409c8466e0083484b0f6d4b",
- "userId": "6409c8116e0083484b0f6d42",
- "name": "dress",
- "description": "A black dress",
- "category": "women's",
- "price": 40,
- "numberInStock": 5,
- "picturePath": "clothes-4.jpg",
- "comments": [],
- "creationDate": "2023-03-09T11:51:34.867Z",
- "createdAt": "2023-03-09T11:51:34.870Z",
- "updatedAt": "2023-03-09T11:51:34.870Z",
- "__v": 0 },
- {
- "_id": "6409cab46e0083484b0f6d70",
- "userId": "6409c9f86e0083484b0f6d65",
- "name": "watch",
- "description": "A cool blue watch",
- "category": "electronics",
- "price": 150,
- "numberInStock": 2,
- "picturePath": "watch-1.jpg",
- "comments": [],
- "creationDate": "2023-03-09T12:01:56.068Z",
- "createdAt": "2023-03-09T12:01:56.069Z",
- "updatedAt": "2023-03-11T07:30:52.424Z",
- "__v": 0 } ]
- {
-
{
- "name": "dress",
- "description": "A Black dress ",
- "category": "women's",
- "price": 40,
- "numberInStock": 1,
- "picturePath": "clothes-4.jpg" }
{
- "userId": "63d7891e8c9e31704437d6db",
- "name": "dress",
- "description": "A Black dress ",
- "category": "women's",
- "price": 40,
- "numberInStock": 1,
- "picturePath": "clothes-4.jpg",
- "comments": [],
- "_id": "63d78c0f8c9e31704437d6e2",
- "creationDate": "2023-01-30T09:21:19.175Z",
- "createdAt": "2023-01-30T09:21:19.177Z",
- "updatedAt": "2023-01-30T09:21:19.177Z",
- "__v": 0 }
-
{
- "_id": "63d78c0f8c9e31704437d6e2",
- "userId": "63d7891e8c9e31704437d6db",
- "name": "dress",
- "description": "A Black dress ",
- "category": "women's",
- "price": 40,
- "numberInStock": 1,
- "picturePath": "clothes-4.jpg",
- "comments": [],
- "creationDate": "2023-01-30T09:21:19.175Z",
- "createdAt": "2023-01-30T09:21:19.177Z",
- "updatedAt": "2023-01-30T09:21:19.177Z",
- "__v": 0 }
-
{
- "body": "dress" }
{
- "_id": "63d78c0f8c9e31704437d6e2",
- "userId": "63d7891e8c9e31704437d6db",
- "name": "dress",
- "description": "A Black dress ",
- "category": "women's",
- "price": 40,
- "numberInStock": 5,
- "picturePath": "clothes-4.jpg",
- "comments": [],
- "creationDate": "2023-01-30T09:21:19.175Z",
- "createdAt": "2023-01-30T09:21:19.177Z",
- "updatedAt": "2023-01-30T09:32:52.471Z",
- "__v": 0 }
-
{
- "body": "women's" }
{
- "_id": "63d78c0f8c9e31704437d6e2",
- "userId": "63d7891e8c9e31704437d6db",
- "name": "dress",
- "description": "A Black dress ",
- "category": "women's",
- "price": 40,
- "numberInStock": 5,
- "picturePath": "clothes-4.jpg",
- "comments": [],
- "creationDate": "2023-01-30T09:21:19.175Z",
- "createdAt": "2023-01-30T09:21:19.177Z",
- "updatedAt": "2023-01-30T09:32:52.471Z",
- "__v": 0 }
-
{
- "numberInStock": 5 }
{
- "_id": "63d78c0f8c9e31704437d6e2",
- "userId": "63d7891e8c9e31704437d6db",
- "name": "dress",
- "description": "A Black dress ",
- "category": "women's",
- "price": 40,
- "numberInStock": 5,
- "picturePath": "clothes-4.jpg",
- "comments": [],
- "creationDate": "2023-01-30T09:21:19.175Z",
- "createdAt": "2023-01-30T09:21:19.177Z",
- "updatedAt": "2023-01-30T09:32:52.471Z",
- "__v": 0 }
{
- "_id": "63d78c0f8c9e31704437d6e2",
- "userId": "63d7891e8c9e31704437d6db",
- "name": "dress",
- "description": "A Black dress ",
- "category": "women's",
- "price": 40,
- "numberInStock": 5,
- "picturePath": "clothes-4.jpg",
- "comments": [],
- "creationDate": "2023-01-30T09:21:19.175Z",
- "createdAt": "2023-01-30T09:21:19.177Z",
- "updatedAt": "2023-01-30T09:32:52.471Z",
- "__v": 0 }
{
- "name": user.firstName,
- "picturePath": user.picturePath,
- "body": "thay's a very cool dress" }
{
- "user": "63d7894d8c9e31704437d6dd",
- "name": user.firstName,
- "picturePath": user.picturePath,
- "body": "thay's a very cool dress, i am dodo",
- "_id": "63d78fcc8c9e31704437d6ee",
- "date": "1675071436896",
- "__v": 0 }
{
- "user": "63d7894d8c9e31704437d6dd",
- "name": user.firstName,
- "picturePath": user.picturePath,
- "body": "thay's a very cool dress, i am dodo",
- "_id": "63d78fcc8c9e31704437d6ee",
- "date": "1675071436896",
- "__v": 0 }
-
{
- "toName": "dodo",
- "toPicturePath": "pic-4.png",
- "fromName": "mido",
- "fromPicturePath": "pic-3.png",
- "body": " dodo it's me didi?" }
{
- "toId": "6409c56fb6a1a74bd2eda443",
- "toName": "dodo",
- "toPicturePath": "pic-4.png",
- "fromId": "6409c9f86e0083484b0f6d65",
- "fromName": "mido",
- "fromPicturePath": "pic-3.png",
- "body": " dodo it's me didi?"
- "_id": "63d791608c9e31704437d6f2",
- "date": "1675071840695",
- "__v": 0 }
-
{
- "toId": "6409c56fb6a1a74bd2eda443",
- "toName": "dodo",
- "toPicturePath": "pic-4.png",
- "fromId": "6409c9f86e0083484b0f6d65",
- "fromName": "mido",
- "fromPicturePath": "pic-3.png",
- "body": "hello",
- "date": 1678526024182,
- "_id": "640c478c72563581e80b6399",
- "__v": 0 }
-
{
- "_id": "640c478c72563581e80b639c",
- "toId": "6409c56fb6a1a74bd2eda443",
- "toName": "dodo",
- "toPicturePath": "pic-4.png",
- "fromId": "6409c9f86e0083484b0f6d65",
- "fromName": "mido",
- "fromPicturePath": "pic-3.png",
- "messages": [
- {
- "toId": "6409c56fb6a1a74bd2eda443",
- "toName": "dodo",
- "toPicturePath": "pic-4.png",
- "fromId": "6409c9f86e0083484b0f6d65",
- "fromName": "mido",
- "fromPicturePath": "pic-3.png",
- "body": "hello",
- "date": 1678526024182,
- "_id": "640c478c72563581e80b6399",
- "__v": 0 },
- {
- "toId": "6409c9f86e0083484b0f6d65",
- "toName": "mido",
- "toPicturePath": "pic-3.png",
- "fromId": "6409c56fb6a1a74bd2eda443",
- "fromName": "dodo",
- "fromPicturePath": "pic-4.png",
- "body": "hello",
- "date": 1678526024182,
- "_id": "640c5d4d72563581e80b6491",
- "__v": 0 } ],
- {
- "date": "1678526348504",
- "__v": 0 }
-
[
- {
- "_id": "6409da2342119e05759ef317",
- "toId": "6409c8116e0083484b0f6d42",
- "toName": "didi",
- "toPicturePath": "pic-2.png",
- "fromId": "6409c56fb6a1a74bd2eda443",
- "fromName": "dodo",
- "fromPicturePath": "pic-4.png",
- "messages": [
- {
- "toId": "6409c8116e0083484b0f6d42",
- "toName": "didi",
- "toPicturePath": "pic-2.png",
- "fromId": "6409c56fb6a1a74bd2eda443",
- "fromName": "dodo",
- "fromPicturePath": "pic-4.png",
- "body": "hi",
- "_id": "6409da2342119e05759ef314",
- "date": "2023-03-09T13:07:47.612Z",
- "__v": 0 },
- {
- "toId": "6409c56fb6a1a74bd2eda443",
- "toName": "dodo",
- "toPicturePath": "pic-4.png",
- "fromId": "6409c8116e0083484b0f6d42",
- "fromName": "didi",
- "fromPicturePath": "pic-2.png",
- "body": " we should meet",
- "date": 1678367373472,
- "_id": "6409df9b4a848444d662f704",
- "__v": 0 }, ],
- {
- "date": "1678367267938",
- "__v": 0 },
- {
- "_id": "640c478c72563581e80b639c",
- "toId": "6409c56fb6a1a74bd2eda443",
- "toName": "dodo",
- "toPicturePath": "pic-4.png",
- "fromId": "6409c9f86e0083484b0f6d65",
- "fromName": "mido",
- "fromPicturePath": "pic-3.png",
- "messages": [
- {
- "toId": "6409c56fb6a1a74bd2eda443",
- "toName": "dodo",
- "toPicturePath": "pic-4.png",
- "fromId": "6409c9f86e0083484b0f6d65",
- "fromName": "mido",
- "fromPicturePath": "pic-3.png",
- "body": "hello",
- "date": 1678526024182,
- "_id": "640c478c72563581e80b6399",
- "__v": 0 },
- {
- "toId": "6409c9f86e0083484b0f6d65",
- "toName": "mido",
- "toPicturePath": "pic-3.png",
- "fromId": "6409c56fb6a1a74bd2eda443",
- "fromName": "dodo",
- "fromPicturePath": "pic-4.png",
- "body": "hello",
- "date": 1678526024182,
- "_id": "640c5d4d72563581e80b6491",
- "__v": 0 } ],
- {
- "date": "1678526348504",
- "__v": 0 } ]
- {