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

Merge to production #53

Merged
merged 195 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
1fd1d91
Added StudyAI_ERD.drawio
IrhaAli Oct 9, 2023
e29b896
Remove untitles ERD
IrhaAli Oct 9, 2023
6894e93
Merge branch 'main' into Irha
IrhaAli Oct 10, 2023
4c699c1
Update StudyAI_ERD.drawio
IrhaAli Oct 11, 2023
3d59201
Update StudyAI_ERD.drawio
aasmal97 Oct 11, 2023
bfcfc1c
Update StudyAI_ERD.drawio
IrhaAli Oct 12, 2023
60ce205
Merge branch 'development' of https://github.com/chingu-voyages/v46-t…
VincentLTech Oct 12, 2023
c689a45
Merge branch 'development' of https://github.com/chingu-voyages/v46-t…
VincentLTech Oct 12, 2023
9d7e67e
Just for Connor
VincentLTech Oct 12, 2023
fed9fd1
just for Connor again
VincentLTech Oct 12, 2023
a761a6d
Setup basic html and css for Hero section
ccrump1280 Oct 12, 2023
7fcdb91
Setup basic html and css for Video section
ccrump1280 Oct 12, 2023
41917fc
aboutpageV
VincentLTech Oct 13, 2023
2f8711b
Merge main
IrhaAli Oct 13, 2023
ab41d5a
Merge branch 'Irha' of github.com:chingu-voyages/v46-tier3-team-39 in…
IrhaAli Oct 13, 2023
68f2f6b
Merge remote-tracking branch 'remotes/origin/Arky' into Irha
IrhaAli Oct 13, 2023
933dfed
Add placeholder image to Hero section
ccrump1280 Oct 13, 2023
1cd5c38
Add skeleton to Team component
ccrump1280 Oct 13, 2023
35209c1
Include import statements
ccrump1280 Oct 13, 2023
1785a73
Merge branch 'development' of https://github.com/chingu-voyages/v46-t…
ccrump1280 Oct 13, 2023
22687f9
Add placeholder image to Video component
ccrump1280 Oct 13, 2023
f2fe21d
Add style to Process component
ccrump1280 Oct 13, 2023
93da515
Merge branch 'Arky' into Irha
IrhaAli Oct 13, 2023
3e4b2b0
Merge branch 'Connor' into Irha
IrhaAli Oct 13, 2023
9f0a0a9
Merge remote development branch with local branch
TiffanyChan614 Oct 14, 2023
f3e85f3
Add user authentication backend
TiffanyChan614 Oct 14, 2023
22a3293
Add custom pages options
TiffanyChan614 Oct 14, 2023
0302048
Hardcode user info for testing
TiffanyChan614 Oct 14, 2023
a53ba9a
Update generateEnv script to latest
TiffanyChan614 Oct 14, 2023
f6e70a3
add sign in and sign up pages
aasmal97 Oct 14, 2023
608d504
added filter logic, that removes unnessary props from dom, in formInputs
aasmal97 Oct 14, 2023
d583b9d
Merge branch 'development' of https://github.com/chingu-voyages/v46-t…
TiffanyChan614 Oct 15, 2023
74106dc
Update StudyAI_ERD.drawio
IrhaAli Oct 15, 2023
1e03608
Update StudyAI_ERD.drawio
IrhaAli Oct 15, 2023
bb70f99
Merge pull request #40 from chingu-voyages/tiffany
aasmal97 Oct 15, 2023
c892b24
made navbar responsive by creating a separate mobile version
aasmal97 Oct 15, 2023
d034bd1
add app bar and wrapper around navbar
aasmal97 Oct 15, 2023
8b55daf
renamed form inputs and auth form
aasmal97 Oct 15, 2023
2124e23
Merge remote-tracking branch 'origin/Arky' into development
aasmal97 Oct 15, 2023
e8add2b
Connected Mssql and Next.js
aufung1999 Oct 16, 2023
e2b61ef
Merge branch 'development' of https://github.com/chingu-voyages/v46-t…
aufung1999 Oct 16, 2023
29fc2f0
Link front end to back end user auth
TiffanyChan614 Oct 16, 2023
0a09f20
Merge pull request #41 from chingu-voyages/Fung
aasmal97 Oct 16, 2023
0878d32
Merge remote-tracking branch 'origin/development' into tiffany
aasmal97 Oct 16, 2023
2d5d80b
Merge pull request #42 from chingu-voyages/tiffany
aasmal97 Oct 16, 2023
040d5fc
added dynamic form input values to be passed into form entry
aasmal97 Oct 16, 2023
f80f491
made Google Sign In global, to prevent re-rendering of sign in function
aasmal97 Oct 16, 2023
4c5c06b
Merge branch 'development' of https://github.com/chingu-voyages/v46-t…
ccrump1280 Oct 16, 2023
c7e921e
import navbar and footer for about page
ccrump1280 Oct 16, 2023
05cc7b7
Setting for code together
ccrump1280 Oct 16, 2023
cc89495
Merge remote-tracking branch 'origin/development' into Irha
IrhaAli Oct 17, 2023
90ef3a1
Merge branch 'Irha' of github.com:chingu-voyages/v46-tier3-team-39 in…
IrhaAli Oct 17, 2023
f158a21
Update about us page styles
ccrump1280 Oct 17, 2023
4694f2e
Setup styles for ExamPrep section of about us page
ccrump1280 Oct 17, 2023
7788499
added footer for desktop. needs to be made responsive
aasmal97 Oct 17, 2023
0176f62
added responsive footer
aasmal97 Oct 17, 2023
193d222
removed double main element wrapper.
aasmal97 Oct 17, 2023
a450074
Add cube icon for about us page
ccrump1280 Oct 17, 2023
6b82051
Update styles in ExamPrep component of about us page
ccrump1280 Oct 17, 2023
2ba9e35
Update styles in Proccess component of about us page
ccrump1280 Oct 17, 2023
fa9cbcf
Merge branch 'development' of https://github.com/chingu-voyages/v46-t…
ccrump1280 Oct 17, 2023
363ed00
Setup TeamMember component for about us page
ccrump1280 Oct 17, 2023
0659611
Setup structure and mobile style of Team component in about us page
ccrump1280 Oct 17, 2023
55a1129
added logout button to navbar, mobile and desktop
aasmal97 Oct 17, 2023
08a0e76
Make POST method for uploading users
TiffanyChan614 Oct 17, 2023
652bbaa
Update POST api for users
TiffanyChan614 Oct 18, 2023
e333d48
Merge branch 'tiffany' of github.com:chingu-voyages/v46-tier3-team-39…
IrhaAli Oct 18, 2023
fe23d04
added generate dropdown links in mobile sidebar, and adpated user pro…
aasmal97 Oct 18, 2023
ce33e89
Finish styling about us page
ccrump1280 Oct 18, 2023
3a85992
Add db connection, I guess
IrhaAli Oct 19, 2023
b458b0e
Update StudyAI_ERD.drawio
IrhaAli Oct 19, 2023
da6649b
Merge branch 'Arky' of github.com:chingu-voyages/v46-tier3-team-39 in…
IrhaAli Oct 19, 2023
229e820
Merge branch 'Irha' of github.com:chingu-voyages/v46-tier3-team-39 in…
IrhaAli Oct 19, 2023
78b4a3d
Merge branch 'Connor' of github.com:chingu-voyages/v46-tier3-team-39 …
IrhaAli Oct 19, 2023
bd3756e
added prisma client, schemas, and sign up routes. Added sign up route…
aasmal97 Oct 19, 2023
0eae2cf
added session callback and appropiate types
aasmal97 Oct 19, 2023
5ff13e4
removed window width state value from hook
aasmal97 Oct 19, 2023
d6e44ce
changed imports to next router to next naviagation router
aasmal97 Oct 19, 2023
b09025e
Add signout button to navbar and add session hook to navbar components
aasmal97 Oct 19, 2023
609fc9f
add dynamic data to user profile component
aasmal97 Oct 19, 2023
5d16a0d
Merge branch 'Arky' of github.com:chingu-voyages/v46-tier3-team-39 in…
IrhaAli Oct 19, 2023
974e73b
added provider key in body creds object from auth form. Also added st…
aasmal97 Oct 20, 2023
46e33f5
Beginning setup for question route
IrhaAli Oct 20, 2023
b808933
added prisma connection function, and added disconnect logic everytim…
aasmal97 Oct 20, 2023
4773c4b
Merge pull request #46 from chingu-voyages/Connor
TiffanyChan614 Oct 20, 2023
153c974
Merge branch 'Arky' of github.com:chingu-voyages/v46-tier3-team-39 in…
IrhaAli Oct 20, 2023
d9f1c90
Merge branch 'Arky' of https://github.com/chingu-voyages/v46-tier3-te…
ccrump1280 Oct 20, 2023
ec685df
Merge branch 'Arky' of https://github.com/chingu-voyages/v46-tier3-te…
VincentLTech Oct 20, 2023
009abe1
prisma
VincentLTech Oct 20, 2023
24a185e
Merge branch 'Arky' of https://github.com/chingu-voyages/v46-tier3-te…
ccrump1280 Oct 20, 2023
2df5fad
Merge branch 'Connor' of https://github.com/chingu-voyages/v46-tier3-…
ccrump1280 Oct 20, 2023
b4f7656
added new prisma schemas and added create user route. Validated googl…
aasmal97 Oct 21, 2023
b44991c
add redirect logic to login and signup pages
aasmal97 Oct 21, 2023
807a1eb
removed use client from login page, which caused errors
aasmal97 Oct 21, 2023
43ddb47
adjusted sign in logic to always create a user cred file on google si…
aasmal97 Oct 21, 2023
20d4c84
added auto login when sign up is initiated
aasmal97 Oct 21, 2023
fd09299
added error message parsing and error page logic
aasmal97 Oct 21, 2023
3dcaf60
notes
VincentLTech Oct 21, 2023
0e9bb4e
remove unneeded console.logs
aasmal97 Oct 21, 2023
2e2d5a8
target
VincentLTech Oct 21, 2023
863e01f
Merge branch 'Arky' of https://github.com/chingu-voyages/v46-tier3-te…
VincentLTech Oct 21, 2023
b13289e
added question page top navigation bar (including timer and stopwatch…
aasmal97 Oct 22, 2023
5ff08b5
modified icon inside timers, so width and height are stable during tr…
aasmal97 Oct 22, 2023
21ae051
made navigation bar for question page responsive
aasmal97 Oct 22, 2023
8d63c00
fixed user profile sizing bug where it couldnt be consistent on mobil…
aasmal97 Oct 22, 2023
663ca2a
added additional styles to navbar menu icon
aasmal97 Oct 22, 2023
273803e
adjusted icon styling to not shift when being triggered
aasmal97 Oct 22, 2023
33a3ae9
added styling to buttons
aasmal97 Oct 22, 2023
331c8cb
Question Routes
IrhaAli Oct 22, 2023
7abb59d
Merge branch 'Arky' of github.com:chingu-voyages/v46-tier3-team-39 in…
IrhaAli Oct 22, 2023
80fe169
Merged Connor's branch
IrhaAli Oct 22, 2023
3cb8e53
Merge branch 'Vincent' of github.com:chingu-voyages/v46-tier3-team-39…
IrhaAli Oct 22, 2023
9bfbd40
Complete logic of all routes for question
IrhaAli Oct 22, 2023
8478806
Generate question logic added
IrhaAli Oct 22, 2023
75689ee
GraphQL Start
IrhaAli Oct 23, 2023
26a8ead
Merge pull request #47 from chingu-voyages/Arky
TiffanyChan614 Oct 23, 2023
8759ff9
Remove unessecary fules
IrhaAli Oct 23, 2023
edf4476
Setting up Graphql
IrhaAli Oct 23, 2023
e213631
Merge branch 'development' of https://github.com/chingu-voyages/v46-t…
ccrump1280 Oct 23, 2023
6979c6c
Merge branch 'Connor' of https://github.com/chingu-voyages/v46-tier3-…
VincentLTech Oct 24, 2023
81e4741
Trying to add context
IrhaAli Oct 24, 2023
96cc7fa
Clean up files
IrhaAli Oct 24, 2023
18c6798
generate page setup
VincentLTech Oct 24, 2023
99af7fd
Generate schema & resolvers w/ TypeGraphQL Prisma
IrhaAli Oct 24, 2023
accb774
Graphql setup in progress
IrhaAli Oct 24, 2023
3882505
Resolvers needed for Sprint 4
IrhaAli Oct 25, 2023
4203cd0
add another height to tailwind theme
ccrump1280 Oct 25, 2023
add8dac
setup Question Editor component
ccrump1280 Oct 25, 2023
b165fe9
setup answerEditor component of the Question Editor
ccrump1280 Oct 25, 2023
96696a1
setup answer types for question editor
ccrump1280 Oct 25, 2023
f3d0f8d
setup content of question editor
ccrump1280 Oct 25, 2023
91bd569
add inital template files for graph ql calls and question store
aasmal97 Oct 25, 2023
70634b5
Merge branch 'Irha' of https://github.com/chingu-voyages/v46-tier3-te…
aasmal97 Oct 25, 2023
ff6a388
created templates for apollo client and modified context data/function
aasmal97 Oct 25, 2023
a7414e8
set up and tested graph ql and autogenerated typegraphl functions
aasmal97 Oct 26, 2023
aec42fc
Split work w/ Fung
IrhaAli Oct 26, 2023
71fff8a
created question store and helpers for actions
aasmal97 Oct 26, 2023
a88acb7
Clean up question route
IrhaAli Oct 26, 2023
3e83751
Complete generate question route
IrhaAli Oct 26, 2023
2512778
Start on my resolvers
IrhaAli Oct 26, 2023
7866b70
Update custom resolvers under graphql folder
IrhaAli Oct 26, 2023
cc37c30
Custom resolver in progress
IrhaAli Oct 26, 2023
baf6f86
Merge branch 'Arky' of github.com:chingu-voyages/v46-tier3-team-39 in…
IrhaAli Oct 26, 2023
4f95a64
Get started on seeds
IrhaAli Oct 26, 2023
115ece3
target generate
VincentLTech Oct 26, 2023
7f75104
Merge branch 'development' of https://github.com/chingu-voyages/v46-t…
VincentLTech Oct 26, 2023
dbf470d
updated generate secrets file to work with two different commands
aasmal97 Oct 26, 2023
5267944
Merge branch 'Arky' of https://github.com/chingu-voyages/v46-tier3-te…
VincentLTech Oct 26, 2023
b4b9d4d
modified graphql api, as well as finished apollo clients needed for s…
aasmal97 Oct 27, 2023
c3d3c8b
Seeding in progress
IrhaAli Oct 27, 2023
6daa0c2
First Seed Completed
IrhaAli Oct 27, 2023
8fcaa0b
Clean up seeds file
IrhaAli Oct 27, 2023
1476e8a
Merge branch 'Arky' of github.com:chingu-voyages/v46-tier3-team-39 in…
IrhaAli Oct 27, 2023
9494415
Merge branch 'Connor' of github.com:chingu-voyages/v46-tier3-team-39 …
IrhaAli Oct 27, 2023
7adb31f
Merge branch 'Vincent' of github.com:chingu-voyages/v46-tier3-team-39…
IrhaAli Oct 27, 2023
2f6af3d
generate
VincentLTech Oct 27, 2023
543cf12
Merge branch 'Connor' of https://github.com/chingu-voyages/v46-tier3-…
VincentLTech Oct 27, 2023
4da02a2
Update Schema
IrhaAli Oct 27, 2023
13065c4
Updated list of resolvers
IrhaAli Oct 27, 2023
0cacd6a
style question Modal
ccrump1280 Oct 27, 2023
a3d52d3
target
VincentLTech Oct 27, 2023
eb4fc52
Merge branch 'Connor' of https://github.com/chingu-voyages/v46-tier3-…
VincentLTech Oct 27, 2023
0b245d7
Added comments for custom resolvers
IrhaAli Oct 28, 2023
78cc1fc
added question view component
aasmal97 Oct 28, 2023
b27934b
add logic for grabbing question data from store to question container…
aasmal97 Oct 28, 2023
7b71caa
refactored question view page
aasmal97 Oct 28, 2023
294e871
added submissions view component
aasmal97 Oct 29, 2023
0c590ff
added indexes to prisma schema
aasmal97 Oct 29, 2023
5f7dc32
added options to question data
aasmal97 Oct 29, 2023
6b2fd95
Add question resolvers
TiffanyChan614 Oct 29, 2023
fb291e2
Merge branch 'Irha' of https://github.com/chingu-voyages/v46-tier3-te…
aasmal97 Oct 29, 2023
1c33e97
fixed theme being overriden which caused sizing issues through all pages
aasmal97 Oct 29, 2023
ade1882
Merge branch 'Arky' of https://github.com/chingu-voyages/v46-tier3-te…
ccrump1280 Oct 29, 2023
ad2c315
Merge branch 'Connor' of https://github.com/chingu-voyages/v46-tier3-…
VincentLTech Oct 29, 2023
9902f34
modified schema and seed data file to auto generate
aasmal97 Oct 29, 2023
806aede
fixed and updated seed data and prisma schema, and pushed to database
aasmal97 Oct 29, 2023
1809248
fixed schema generation bug, that caused read errors on collections e…
aasmal97 Oct 30, 2023
d48b882
fixed graphql query for solution view
aasmal97 Oct 30, 2023
8a48e33
Merge branch 'Connor' of github.com:chingu-voyages/v46-tier3-team-39 …
IrhaAli Oct 30, 2023
706ff11
Merge branch 'tiffany' of github.com:chingu-voyages/v46-tier3-team-39…
IrhaAli Oct 30, 2023
399a9da
Merge branch 'Vincent' of github.com:chingu-voyages/v46-tier3-team-39…
IrhaAli Oct 30, 2023
ad40593
Update OpenAI Prompt and change question route to POST.
IrhaAli Oct 30, 2023
b0932da
Complete question route to generate new questions.
IrhaAli Oct 30, 2023
d163a2d
Complete generate question route and clean seedData file.
IrhaAli Oct 30, 2023
fd1f6fc
modified question component sizing
aasmal97 Oct 31, 2023
071d2dd
added short answer type with scroll that adjusts to cursor, multiple …
aasmal97 Nov 1, 2023
69babae
modified styles in question page
aasmal97 Nov 1, 2023
794eb9d
Merge pull request #49 from chingu-voyages/Arky
IrhaAli Nov 1, 2023
ba891c9
Merge branch 'development' of github.com:chingu-voyages/v46-tier3-tea…
IrhaAli Nov 1, 2023
23604e5
Merge pull request #50 from chingu-voyages/Irha
VincentLTech Nov 1, 2023
4b1d205
modified score data in prisma schema, and seperated submissions into …
aasmal97 Nov 1, 2023
f8c04f8
updated submission query
aasmal97 Nov 1, 2023
304abbf
improved timer functionality by giving option to hide
aasmal97 Nov 1, 2023
fd4f18e
removed submission store actions
aasmal97 Nov 2, 2023
d02ff59
Merge pull request #52 from chingu-voyages/Arky
IrhaAli Nov 2, 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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"codetogether.virtualCursorJoin": "ownVirtualCursor"
}
594 changes: 594 additions & 0 deletions docs/StudyAI_ERD.drawio

Large diffs are not rendered by default.

103 changes: 0 additions & 103 deletions docs/Untitled Diagram.drawio

This file was deleted.

4 changes: 3 additions & 1 deletion studyAi/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ next-env.d.ts
my.secrets*
.env
env*
package-lock.json*
package-lock.json*

generated
110 changes: 110 additions & 0 deletions studyAi/graphql/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import { resolvers } from "../prisma/generated/type-graphql";
import { Resolver, Arg, Args, Ctx, Query, Mutation, Info} from "type-graphql";
import type { GraphQLResolveInfo } from "graphql";
import { FindUniqueQuestionArgs } from "/Users/tiff/Desktop/react/v46-tier3-team-39/studyAi/prisma/generated/type-graphql/resolvers/crud/Question/args/FindUniqueQuestionArgs";
import { Question } from "/Users/tiff/Desktop/react/v46-tier3-team-39/studyAi/prisma/generated/type-graphql/models/Question";
import { transformInfoIntoPrismaArgs, getPrismaFromContext, transformCountFieldIntoSelectRelationsCount } from "/Users/tiff/Desktop/react/v46-tier3-team-39/studyAi/prisma/generated/type-graphql/helpers";
import { NonEmptyArray } from "type-graphql";

// Custom Resolvers : https://prisma.typegraphql.com/docs/advanced/custom-operations/
// How to test the resolvers: https://docs.google.com/presentation/d/16v_wdvdu2-88dA7O1jAxj_BqbT7SMPn6Ig_7VL81o64/edit#slide=id.p3
/* Custom Resolver Example
@Resolver()
export class CustomUserResolver {
@Query(returns => User, { nullable: true })
async bestUser(@Ctx() { prisma }: Context): Promise<User | null> {
return await prisma.user.findUnique({
where: { email: "bob@prisma.io" },
});
}
}
*/
/*
Custom Resolvers Needed:
- Reads, Adds, deletes, and updates a question into db (Make sure for Read, Update and Delete the sessionId is of the user who owns this question)
- Reads, Adds, deletes, and updates a quiz (Make sure for Read, Update and Delete the sessionId is of the user who owns this quiz)
- Reads, Adds, deletes, and updates a user (Make sure for Read, Update and Delete the sessionId is of the user who owns this question)
*/

// Each resolver has 2 steps
// 1. Verify the user can edit the data (for verification. session userId = question/quiz/user userId)
// 2. Use the auto-generated resolver

@Resolver(_of => Question)
export class FindUniqueQuestionResolver {
// @Query(_returns => Question, {
// nullable: true
// })
// async question(@Ctx() ctx: any, @Info() info: GraphQLResolveInfo,
// @Args() args: FindUniqueQuestionArgs): Promise<Question | null> {
// const { _count } = transformInfoIntoPrismaArgs(info);
// const question = getPrismaFromContext(ctx).question.findUnique({
// ...args,
// ...(_count && transformCountFieldIntoSelectRelationsCount(_count)),
// });
// if (!ctx.session || ctx.session.userId !== question.creatorId) {
// throw new Error("You are not authorized to perform this action");
// }
// return question;
// }

@Query(_returns => Question, {
nullable: true
})
async readQuestion(@Arg('id') id: string, @Ctx() {req, res, prisma, session}: any)
: Promise<Question | null> {
const question = await prisma.question.findUnique({
where: { id: id }});
if (!session || session.userId !== question.creatorId) {
throw new Error("You are not authorized to perform this action");
}
prisma.$disconnect();
return question;
}

@Mutation(_returns => Question, {
nullable: true
})
async addQuestion(@Arg('questionType') questionType: string,
@Arg('tags') tags: string[], @Arg('questionTitle') questionTitle: string,
@Arg('questionDesc') questionDesc: string,
@Arg('correctAnswer') correctAnswer: string[],
@Arg('incorrectAnswer') incorrectAnswer: string[],
@Ctx() {req, res, prisma, session}: any)
: Promise<Question | null> {
const questionData = await prisma.questionData.create({
data: {
questionTitle: questionTitle,
questionDesc: questionDesc,
}
})
const answer = await prisma.answer.create({
data: {
correctAnswer: correctAnswer,
incorrectAnswer: incorrectAnswer,
}
})
const creator = await prisma.user.findUnique({
where: { id: session.userId }
})
const likeCounter = await prisma.likeCounter.create({
likes: 0,
dislikes: 0
})
const question = await prisma.question.create({
data: {
creatorId: creator.id,
questionType: questionType,
tags: tags,
question: questionData,
answer: answer,
likeCounter: likeCounter
}
});
prisma.$disconnect();
return question;
}
}


export const allResolvers: NonEmptyArray<Function>= [FindUniqueQuestionResolver]
Loading