# docs 6 mar
### user stories
#### teacher
- a teacher can register in the app and wait for his account to be approved as a teacher by the admin
- after approval he can login to the app
- he will he able create a quiz
- after he published a quiz it would be available to the students
- he can click a specific quiz details to see which students have taken the quiz and what their socres are
#### student
- a student can register in the app and wait for his account to be approved as a student by the admin
- he can see a list of quizes that he can take
- it he decides to take a quiz he will he taken to page where on top will the be quiz title
- one question form the quiz will come at a time
- he can goto next or previous quiz with respective buttons
- after he finishes the quiz there will be a submit button to submit the quiz
- after submitting the quiz student will be able to see his score
#### admin
- admin will have over all controll over all the users
- he can list all the users
- he will be able to enable or disable a user
- a disabled user wont be able to login to the app
### common
- all users will have a profile page
- users can update their profile
## tasks
### frontend
1. user login register
2. profile page
3. create quiz
4. take quiz
5. list quiz as teacher
6. list quiz as student
7. admin list users
### backend (apis)
8. user login register
9. profile update api
10. create quiz api
11. take quiz api
12. list quizes created by teacher api
13. list quizes available to students api
14. admin list users api
## frameworks
- express for backend api development
- React.js for frontend UI
- mongodb for database
- figma for mockup design
- git for version controlling
- google meet for scrum , code review meetings
__markdown or google sheet __ for documentations of code and process
## documentation tools
- markdown
- dbdiagram.io
- https://excalidraw.com/
## documentation location
- project root readme file ( or google docs )
## scrum meeting 1
__deadline__ : 07 March 2023
__agenda__ : fix database schema , design system , devide and assign tasks among team mates , fix code review standards
__performance review__ :
__code review__ :
## scrum meeting 2
__deadline__ : 14 March 2023
__agenda__ : review project progress of features login , profile , create quiz
__performance review__ :
__code review__ :
## scrum meeting 3
__deadline__ : 21 March 2023
__agenda__ : review project progress of features , take quiz , list quiz based on role
__performance review__ :
__code review__ :
## scrum meeting 4
__deadline__ : 29 March 2023
__agenda__ : review project progress of features , admin quiz
__performance review__ :
__code review__ :
## database schema
```
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/ateam', {});
const UserSchema = new mongoose.Schema({
username: { type: String, unique: true },
password: {
type: String,
set(val) {
return require('bcrypt').hashSync(val, 10);
}
},
role: {
type: String,
enum: {
values: ['Admin', 'Teacher', 'Student'],
message: '{VALUE} is not a valid role.'
},
default: 'Student'
}
}, {
timestamps: true
});
const User = mongoose.model('User', UserSchema);
const QuestionSchema = new mongoose.Schema({
question: String,
answer: String
})
const QuizSchema = new mongoose.Schema({
name: { type: String },
createdBy: new Schema({
id: {
type: mongoose.Schema.ObjectId,
ref: 'User'
},
name: String
}),
quizItems: [QuestionSchema]
}, {
timestamps: true
})
const Quiz = mongoose.model('Quiz', QuizSchema);
const ResultSchema = new mongoose.Schema({
quiz: new Schema({
name: String,
id: {
type: mongoose.Schema.ObjectId,
ref: 'Quiz'
}
}),
takenBy: {
name: String,
id: {
type: mongoose.Schema.ObjectId,
ref: 'User'
}
},
score: Number
}, {
timestamps: true
});
const Result = mongoose.model('Result', ResultSchema);
module.exports = { User, Quiz, Result }
```