aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: af729a6451dd76cbed369b137045501c409f9353 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Teacher’s Journal – Laravel Project

## Project description
Teacher’s Journal is a Laravel application for managing teachers, classes, students, lessons and activities.  
The application supports authentication, protected routes via middleware, and CRUD functionality with resource controllers.  
It provides both a web interface and an API-style backend.

---

## Installation

```bash
git clone <repository-url>
cd teachers-journal
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
npm install
npm run build
php artisan serve
```

The application is available at: `http://127.0.0.1:8000`

---

## Routes

### Public routes

```
GET    /                          → Home
GET    /login                     → Login page
POST   /login                     → Login
GET    /register                  → Registration page
POST   /register                  → Registration

GET    /forgot-password           → Forgot password
POST   /forgot-password           → Send reset link
GET    /reset-password/{token}    → Reset form
POST   /reset-password            → Reset password

GET    /faq                       → FAQ
GET    /contact                   → Contact page
POST   /contact                   → Submit contact form
```

### Protected routes

```
POST   /logout                    → Logout
GET    /dashboard                 → Dashboard
GET    /app                       → Application page

Resource routes:
GET|POST|PUT|DELETE
/teachers
/groups
/sub-groups
/students
/lessons
/activities

GET    /groups/{group}/students
GET    /groups/{group}/lessons
GET    /sub-groups/{subGroup}/students

POST   /students/{student}/add-points

POST   /lessons/{lesson}/attach-students
POST   /lessons/{lesson}/record-attendance
GET    /lessons/{lesson}/students

POST   /activities/{activity}/attach-students
POST   /activities/{activity}/record-score
GET    /activities/{activity}/students
```

### API routes

```
POST   /login
POST   /register
POST   /logout
GET    /me

Teachers:
GET    /teachers
POST   /teachers
GET    /teachers/{teacher}
PUT    /teachers/{teacher}
DELETE /teachers/{teacher}

Groups:
GET    /groups
POST   /groups
GET    /groups/{group}
PUT    /groups/{group}
DELETE /groups/{group}
GET    /groups/{group}/students
GET    /groups/{group}/lessons

Sub-groups:
GET    /sub-groups
POST   /sub-groups
GET    /sub-groups/{subGroup}
PUT    /sub-groups/{subGroup}
DELETE /sub-groups/{subGroup}
GET    /sub-groups/{subGroup}/students

Students:
GET    /students
POST   /students
GET    /students/{student}
PUT    /students/{student}
DELETE /students/{student}
POST   /students/{student}/add-points

Lessons:
GET    /lessons
POST   /lessons
GET    /lessons/{lesson}
PUT    /lessons/{lesson}
DELETE /lessons/{lesson}
POST   /lessons/{lesson}/attach-students
POST   /lessons/{lesson}/record-attendance
GET    /lessons/{lesson}/students

Activities:
GET    /activities
POST   /activities
GET    /activities/{activity}
PUT    /activities/{activity}
DELETE /activities/{activity}
POST   /activities/{activity}/attach-students
POST   /activities/{activity}/record-score
GET    /activities/{activity}/students
```

---

## Sources

* Official Laravel documentation:
  [https://laravel.com/docs/12.x](https://laravel.com/docs/12.x)
* PHP documentation:
  [https://www.php.net/docs.php](https://www.php.net/docs.php)
* REST API principles:
  [https://restfulapi.net/](https://restfulapi.net/)

---