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

feature/project #457

Open
wants to merge 92 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
148af0d
starting final project #447
xavigs89 Apr 19, 2024
7a0dc52
add dotenv and cors in api #447
xavigs89 Apr 20, 2024
79698a6
add logicc functions of retrieveuser, authenticateuser, registeruser …
xavigs89 Apr 21, 2024
2ebed32
add createEvent in api and app #447
xavigs89 Apr 24, 2024
bd25fca
update README.md document #447
xavigs89 Apr 25, 2024
c6e5e64
remove deprecated createEvent api logic
xavigs89 Apr 27, 2024
cc7b4b7
ignore isdigram node_modules
xavigs89 Apr 27, 2024
3d16c64
change express functions in api
xavigs89 Apr 27, 2024
c6de5c9
add createMeeting function in api
xavigs89 Apr 27, 2024
a76856f
add removeMeeting in api
xavigs89 Apr 27, 2024
306a7ad
add retrieveMeetings function in api
xavigs89 Apr 27, 2024
9c31b4e
add authenticate-user.sh; create-meeting.sh;register-user.sh;retrieve…
xavigs89 Apr 27, 2024
537e6e5
remove create-event.sh test curl in api
xavigs89 Apr 27, 2024
7158b64
remove createEvent function in app/logic
xavigs89 Apr 27, 2024
38532fa
add CreateMeeting.jsx;Meeting.jsx;MeetingList.jsx;Home.jsx in app/src…
xavigs89 Apr 27, 2024
7221c9f
add App.jsx in app
xavigs89 Apr 27, 2024
057d963
add createMeeting.js function in app/src/logic
xavigs89 Apr 27, 2024
08c77f4
update README.md file in doc
xavigs89 Apr 27, 2024
e7d5c0e
update index.js file in app/src/logic
xavigs89 Apr 27, 2024
77d1d43
update removeMeetings function in api/logic
xavigs89 Apr 27, 2024
9822e0e
update retrieveMeetings function in api/logic
xavigs89 Apr 27, 2024
95fac7c
add styles in Login.jsx page in app/src/pages
xavigs89 Apr 27, 2024
f510188
update IP address .env in api and app
xavigs89 Apr 27, 2024
e7bc070
add gitignore files
xavigs89 Apr 27, 2024
2ad6f85
update retrieve meetings fetch and add remove meeting fetch in api
xavigs89 Apr 28, 2024
e719ef7
add icons to file app/public/icons
xavigs89 Apr 28, 2024
f32ec8a
create component Header.jsx in app/src/components
xavigs89 Apr 28, 2024
c3f209f
update colors in Home.jsx, Login.jsx and Register.jsx in app/src/pages
xavigs89 Apr 28, 2024
2010351
remove 'time' in createMeeting.js file in app/src/logic
xavigs89 Apr 28, 2024
bddd124
add retrieveMeetings.js function in app/logic
xavigs89 Apr 28, 2024
9acb836
add removeMeeting.js function in app/src/logic (not finished)
xavigs89 Apr 28, 2024
244159f
add populate, retrievemeetings, CreateMeeting, App
xavigs89 May 1, 2024
098c1cc
add show more info in meeting list in app #447
xavigs89 May 1, 2024
983f40c
add styles in app #447
xavigs89 May 2, 2024
a13b13e
add retrieveCreatedMeetings.ts function; edit populate.ts in api
xavigs89 May 2, 2024
a94dcf7
add function removeMeeting in app
xavigs89 May 2, 2024
d7398af
update retrieveMeetings.ts in api; add removeMeeting in api and app; …
xavigs89 May 2, 2024
860258e
add editMeeting function in app
xavigs89 May 3, 2024
548202f
update editMeeting
xavigs89 May 3, 2024
b1cc26e
add modify-meeting.sh #447
xavigs89 May 3, 2024
4270ad5
begin function joinMeeting.ts
xavigs89 May 3, 2024
3f1937b
add Profile in app #447
xavigs89 May 3, 2024
a26cfa0
add Link to Home and Profile
xavigs89 May 3, 2024
ead785c
add editMeeting.ts and editMeeting.spec in api
xavigs89 May 3, 2024
c74ade1
add editMeeting function in api and app #447
xavigs89 May 3, 2024
5638d0e
add logo to app #447
xavigs89 May 3, 2024
1086d3e
add joinMeeting function in api, fetch and app's logic #447
xavigs89 May 4, 2024
3962b42
add styles in app#447
xavigs89 May 5, 2024
bb2f143
update joinMeeting function in app #447
xavigs89 May 5, 2024
407037e
add styles in Home and Profile #447
xavigs89 May 5, 2024
a758c6c
sanitize attendees id #447
xavigs89 May 6, 2024
7e36fb9
update joinMeeting function #447
xavigs89 May 6, 2024
0144269
update unjoinMeeting #447
xavigs89 May 6, 2024
f6929fc
add created meetings and joined meetings in user profile #447
xavigs89 May 7, 2024
ff42e15
add about #447
xavigs89 May 7, 2024
2f6f31e
update CreatedMeetingList and JoinedMeetingList in component Profile.…
xavigs89 May 7, 2024
763f590
add styles in create meeting and edit meeting #447
xavigs89 May 7, 2024
2fa1ebd
fix join and unjoin in app ~#447
xavigs89 May 8, 2024
d3d1ef6
refactor MeetingsList; add CreateMeetingsList and JoinedMeetingsList …
xavigs89 May 8, 2024
8d77253
editAbout and createReview in api #447
xavigs89 May 8, 2024
842bd25
update data model for review in api #447
xavigs89 May 9, 2024
4f1b4e2
editAbout in api and test working successfully #447
xavigs89 May 9, 2024
c82275f
add createReview in api #447
xavigs89 May 9, 2024
7407ef7
add map in location in api #447
xavigs89 May 9, 2024
254d76c
add styles in feedback and cretereview curl #447
xavigs89 May 9, 2024
a99445a
fix issues in Profile #447
xavigs89 May 10, 2024
fa9c7a9
add unhappy paths for some functions in api
xavigs89 May 11, 2024
db99d40
update about in App #447
xavigs89 May 12, 2024
840ee93
add styles and code refactor #447
xavigs89 May 12, 2024
300269a
fix createreview and retrievereviews in api #447
xavigs89 May 13, 2024
c3fb5c8
update EditAbout in app #447
xavigs89 May 13, 2024
c5308db
fix editMeeting in app #447
xavigs89 May 13, 2024
6fe9b2e
add createReview function in app #447
xavigs89 May 14, 2024
22551f4
fix create review functionality #447
xavigs89 May 14, 2024
6ac6770
no h1 in Home #447
xavigs89 May 14, 2024
6df2603
edit README #447
xavigs89 May 14, 2024
478240a
fix edit about #447
xavigs89 May 14, 2024
698b245
code refactor #447
xavigs89 May 14, 2024
d1f857c
add retrieveReview in api and logic in app #447
xavigs89 May 15, 2024
4ab62cb
add retrieveReviews in app #447
xavigs89 May 15, 2024
034855e
add ReviewList to app #447
xavigs89 May 15, 2024
e6f478c
fix edit meeting in component Profile.jsx
xavigs89 May 16, 2024
95e2262
fix retrieve reviews now with stars #447
xavigs89 May 16, 2024
d0744be
fix some errors, add styles to the app #447
xavigs89 May 16, 2024
a509f71
project finished #447
xavigs89 May 16, 2024
d3492ca
update README #447
xavigs89 May 16, 2024
f61da11
project finished #447
xavigs89 May 17, 2024
bbee3b6
first iteration in adding marker to maps in each meeting #447
xavigs89 Jun 4, 2024
ec09fb7
add geolocation in searchvar #447
xavigs89 Jun 5, 2024
8f21e81
add Leaflet in project #447
xavigs89 Jun 5, 2024
c0e85f6
add markers and map to Meeting.jsx with leaflet-react
xavigs89 Jun 6, 2024
40c82d5
fix responsive map in Meeting.jsx #447
xavigs89 Jun 6, 2024
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
27 changes: 26 additions & 1 deletion staff/xavi-gonzalez/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
.DS_Store
.DS_Store
isdigram/antiguo/api.1/node_modules
isdigram/antiguo/api.2/node_modules
isdigram/antiguo/api.3/node_modules

isdigram/antiguo/app.1/node_modules
isdigram/antiguo/app.2/node_modules
isdigram/antiguo/app.3/node_modules
isdigram/antiguo/app.4/node_modules

isdigram/antiguo/api.1/node_modules
isdigram/antiguo/api.2/node_modules
isdigram/antiguo/api.3/node_modules

isdigram/antiguo/app.1/dist

isdigram/api/node_modules
isdigram/app/node_modules
isdigram/com/node_modules


project/api/.env
.vscode/settings.json



5 changes: 5 additions & 0 deletions staff/xavi-gonzalez/project/api/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MONGODB_URL = mongodb://localhost:27017/project
MONGODB_TEST_URL = mongodb://localhost:27017/test
PORT = 8080
JWT_SECRET = es un secreto, de tu mirada y la mia
JWT_EXP = 10h
24 changes: 24 additions & 0 deletions staff/xavi-gonzalez/project/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
10 changes: 10 additions & 0 deletions staff/xavi-gonzalez/project/api/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"require": "ts-node/register",
"loader": "ts-node/esm",
"extensions": [
"ts"
],
"spec": [
"logic/*.spec.*"
]
}
175 changes: 175 additions & 0 deletions staff/xavi-gonzalez/project/api/data/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
import mongoose, { ObjectId } from "mongoose";

const { Schema, model } = mongoose

const { Types: { ObjectId } } = Schema

type UserType = {
name: string
email: string
password: string
avatar?: string
about?: string
}

const user = new Schema({
name: {
type: String,
required: true
},
email: {
type: String,
required: true,
unique: true
},
password: {
type: String,
required: true
},
avatar: {
type: String,
},
about: {
type: String,
}
})

type PointType = {
type: string,
coordinates: [number, number]
}

const point = new Schema<PointType>({
type: {
type: String,
enum: [`Point`],
required: true
},
coordinates: {
type: [Number],
required: true
}
})



type MeetingType = {
author: ObjectId
title: string
address: string
location: PointType
date: Date
description: string
image: string
attendees: [ObjectId]


}

const meeting = new Schema({
author: {
type: ObjectId,
ref: 'User',
required: true
},
title: {
type: String,
required: true
},
address: {
type: String,
required: true
},
location: {
type: point,
required: true
},
date: {
type: Date,
required: true
},
description: {
type: String,
required: true
},
image: {
type: String,
required: true
},
attendees: [{
type: ObjectId,
ref: 'User'
}],
})


type ReviewType = {
author: ObjectId
rate: 1 | 2 | 3 | 4 | 5
comment?: string
date: Date
meeting: ObjectId
}

const review = new Schema({
author: {
type: ObjectId,
ref: 'User',
required: true,
},
rate: {
type: Number,
required: true,
min: 1,
max: 5,
},
comment: {
type: String,
},
date: {
type: Date,
required: true,
},
meeting: {
type: ObjectId,
ref: 'Meeting',
required: true,
}


})




const User = model<UserType>('User', user)
const Meeting = model<MeetingType>('Meeting', meeting)
const Review = model<MeetingType>('Review', review)
const Point = model<PointType>('Point', point)

export {
UserType,
User,
MeetingType,
Meeting,
ReviewType,
Review,
PointType,
Point,
}



// type AttendeeType = {
// id: string
// name: string
// email: string
// }








38 changes: 38 additions & 0 deletions staff/xavi-gonzalez/project/api/data/populate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import mongoose from "mongoose";

import { User, Meeting } from '.'

mongoose.connect('mongodb://localhost:27017/project')

.then(() => User.deleteMany())
.then(() => Meeting.deleteMany())

.then(() => User.create({ name: 'Heber Sanchez', email: '[email protected]', password: '123qwe123', avatar: null, about: null }))

.then(user1 => {
return Promise.all([

User.create({ name: 'Xavi Gonzalez', email: '[email protected]', password: '123qwe123', avatar: null, about: null }),
User.create({ name: 'Jordi Bachatero', email: '[email protected]', password: '123qwe123', avatar: null, about: null }),
User.create({ name: 'Pere Hernandez', email: '[email protected]', password: '123qwe123', avatar: null, about: null }),
User.create({ name: 'Judit Camps', email: '[email protected]', password: '123qwe123', avatar: null, about: null }),
User.create({ name: 'Adri Gordillo', email: '[email protected]', password: '123qwe123', avatar: null, about: null }),
User.create({ name: 'Manuel Barzi', email: '[email protected]', password: '123qwe123', avatar: null, about: null }),
User.create({ name: 'Frank', email: '[email protected]', password: '123qwe123', avatar: null, about: null }),
User.create({ name: 'Lorena Sanchez', email: '[email protected]', password: '123qwe123', avatar: null, about: null }),
User.create({ name: 'Miky Guevara', email: '[email protected]', password: '123qwe123', avatar: null, about: null })
])
.then(([user2, user3, user4, user5, user6, user7, user8, user9, user10]) => {
return Meeting.create({ author: user1._id, title: 'Asadito', address: 'Corbera de Llobregat',
location: [41.3752827972332, 2.1480333604674424],
date: new Date().toISOString(),
description: 'Asadito, viste, todo, post bootcamp',
image: 'https://www.infobae.com/new-resizer/WU5rIcVWzsRSYVPdDD7s-GvPggM=/filters:format(webp):quality(85)/s3.amazonaws.com/arc-wordpress-client-uploads/infobae-wp/wp-content/uploads/2018/08/09173312/asado.jpg',
attendees: [user1.id, user2.id, user3.id, user4.id, user5.id, user6.id, user7.id, user8.id, user9.id, user10.id] })
})
})
.then(() => mongoose.disconnect())
.then(() => console.log('populated'))
.catch(console.error);


Loading