Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rayan code #42

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
40fe51c
Delete tests directory
retr0717 Nov 7, 2023
6893188
initial setup done
retr0717 Nov 7, 2023
235eb3f
Update README.md
retr0717 Nov 7, 2023
5efbda1
Update README.md
retr0717 Nov 7, 2023
8e9b3c9
Update README.md
retr0717 Nov 7, 2023
61d348a
initial server settings
retr0717 Nov 7, 2023
2536ef4
routes,helpers,model
retr0717 Nov 7, 2023
02ec193
Merge branch 'master' of https://github.com/AKA717/retr0-stackup
retr0717 Nov 7, 2023
01d4846
server.js update
retr0717 Nov 7, 2023
ec79ea1
added server.js updated
retr0717 Nov 7, 2023
1695483
add contact route done
retr0717 Nov 8, 2023
03480d7
add-contact route done
retr0717 Nov 8, 2023
cb195b2
model.js
retr0717 Nov 8, 2023
826fbd4
get-contacts route done
retr0717 Nov 8, 2023
0259c36
delete route done
retr0717 Nov 8, 2023
520bfe3
contact update route done
retr0717 Nov 8, 2023
f8504ab
route
retr0717 Nov 8, 2023
728060a
branch 'back-end'
retr0717 Nov 8, 2023
992b127
merge mistake in user-route
retr0717 Nov 8, 2023
8b0c172
model.js merge mistake
retr0717 Nov 8, 2023
c2d8fd2
user router js merge mistake
retr0717 Nov 8, 2023
90b3964
server.js merge mistake
retr0717 Nov 8, 2023
f9beb24
back-end branch merge mistakes resolved
retr0717 Nov 8, 2023
5357886
initial redux store setup done
retr0717 Nov 8, 2023
ba8bd9c
Merge branch 'front-end'
retr0717 Nov 8, 2023
ef5d4c5
user router merge mistake
retr0717 Nov 8, 2023
95762f8
login component created
melo-maniac-29 Nov 8, 2023
f14c4e1
login component created
melo-maniac-29 Nov 8, 2023
224d670
Update README.md
melo-maniac-29 Nov 8, 2023
169f0f4
register component
melo-maniac-29 Nov 8, 2023
9935104
login register functionality works
retr0717 Nov 8, 2023
6c6e9fe
Merge branch 'master' of https://github.com/AKA717/retr0-stackup
retr0717 Nov 8, 2023
6739950
saga middlwares and actions
retr0717 Nov 8, 2023
486942a
login ,register, home view,add contact features added
retr0717 Nov 9, 2023
be07b53
added route to user view after add contact
retr0717 Nov 9, 2023
8b02153
delete feature added
retr0717 Nov 9, 2023
3193eb0
edit feature added
retr0717 Nov 10, 2023
129bde0
changed to mdn style
retr0717 Nov 10, 2023
3c025b2
Navbar Logo changed and Contact Manage font change
MhdRayanBinSN Nov 10, 2023
4c651e4
User icon changed and Some edits in card.css and card.jsx
MhdRayanBinSN Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
front-end/logs
front-end/*.log
front-end/npm-debug.log*
front-end/yarn-debug.log*
front-end/yarn-error.log*
front-end/pnpm-debug.log*
front-end/lerna-debug.log*

front-end/node_modules
front-end/dist
front-end/dist-ssr
front-end/*.local

# Editor directories and files
front-end/.vscode/*
front-end/!.vscode/extensions.json
front-end/.idea
front-end/.DS_Store
front-end/*.suo
front-end/*.ntvs*
front-end/*.njsproj
front-end/*.sln
front-end/*.sw?

# server files
back-end/node_modules
bacl-end/package-lock.json
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
![StackUp Banner]([https://tinkerhub.frappe.cloud/files/stackup%20banner.jpeg])
# Project Name
# Contact Manager
Long Description about project. This project do that. This project is awesome...
## Team members
1. Name [Embed personal github URL]
2. Name [Embed perosnal github URL]
1. Akhil [github link]
2. Allen
3. Rayan
4. Alwin
## Team Id
Team id here
retr0
## Link to product walkthrough
[link to video]
## How it Works ?
Expand Down
5 changes: 5 additions & 0 deletions back-end/helpers/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const constants = {
USER_API : 'http://localhost:4000/api/user'
}

export default constants;
19 changes: 19 additions & 0 deletions back-end/helpers/user-helper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { Products } = require('../model/model');

module.exports = {
randomItems: () => {
return new Promise(async (resolve,reject) => {
const products = await Products.find();

arr = [];

for (let i = 0; i < 4; i++) {
product = products[Math.floor(Math.random() * products.length)];
if (!arr.some(item => item === product))
arr.push(product);
}

resolve(arr);
})
}
}
56 changes: 56 additions & 0 deletions back-end/model/model.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const UserSchema = new Schema({
username: {
type: String,
required: [true, 'username field is required']
},
email: {
type: String,
required: [true, 'Email field is required']
},
password:{
type: String,
required: [true, 'password field is required']
},
date : {
type: Date,
default : Date.now
}
});

const contactSchema = new Schema({
_id: {
type: Schema.Types.ObjectId, auto: true
},
name : {
type: String,
required: [true, 'name field is required']
},
phone : {
type: String,
required: [true, 'phone_no field is required']
},
email : {
type: String,
required: [true, 'email field is required']
},
address : {
type: String,
required: [true, 'address field is required']
}

})

const userContacts = new Schema({
contacts: [contactSchema] // Array to store contacts
});

const User = mongoose.model('users',UserSchema);
const Contact = mongoose.model('contacts',userContacts);

module.exports = {
User,
Contact
};
Loading