Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/register/register.component.html
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/register/register.component.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/register/register.component.html	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,37 @@
+
+<div class="w-full h-full flex justify-center items-center">
+  <form [formGroup]="form" class="flex flex-col w-1/2" (ngSubmit)="onSubmit()">
+
+  <mat-form-field appearance="outline">
+    <label>Full Name</label>
+    <input matInput formControlName="name" placeholder="John Doe">
+  </mat-form-field>
+
+  <mat-form-field appearance="outline">
+    <label>Email</label>
+    <input matInput formControlName="email" placeholder="john.doe@example.com">
+  </mat-form-field>
+
+  <mat-form-field appearance="outline">
+    <label>Password</label>
+    <input matInput type="password" formControlName="password">
+  </mat-form-field>
+
+  <mat-form-field appearance="outline">
+    <label>Confirm Password</label>
+    <input matInput type="password" formControlName="confirmPassword">
+  </mat-form-field>
+
+  <mat-form-field appearance="outline">
+    <label>Address</label>
+    <input matInput formControlName="address" placeholder="str. Dame Gruev 12">
+  </mat-form-field>
+
+  <mat-form-field appearance="outline">
+    <label>Phone</label>
+    <input matInput formControlName="phoneNumber" placeholder="+3897xxxxxxx">
+  </mat-form-field>
+
+    <button mat-flat-button>Register</button>
+</form>
+</div>
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/register/register.component.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/register/register.component.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/components/register/register.component.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,82 @@
+import { Component } from '@angular/core';
+import {MatFormField} from "@angular/material/form-field";
+import {MatInput} from "@angular/material/input";
+import {MatButtonModule} from "@angular/material/button";
+import {
+  AbstractControl,
+  Form,
+  FormControl,
+  FormGroup,
+  ReactiveFormsModule,
+  ValidationErrors,
+  ValidatorFn,
+  Validators
+} from "@angular/forms";
+import {AuthService} from "../../services/auth/auth.service";
+import {RegisterRequest} from "../../model/requests/RegisterRequest";
+import {Router} from "@angular/router";
+
+@Component({
+  selector: 'app-register',
+  standalone: true,
+  imports: [
+    MatFormField,
+    MatInput,
+    ReactiveFormsModule,
+    MatButtonModule,
+  ],
+  templateUrl: './register.component.html',
+  styleUrl: './register.component.css'
+})
+export class RegisterComponent {
+
+  form: FormGroup = new FormGroup({
+    email: new FormControl('', [Validators.required, Validators.email]),
+    password: new FormControl('', [Validators.required]),
+    phoneNumber: new FormControl('', [Validators.required]),
+    name  : new FormControl('', [Validators.required]),
+    address: new FormControl('', [Validators.required]),
+    confirmPassword: new FormControl('', [Validators.required])
+  },
+    {
+      validators: this.matchValidator('password', 'confirmPassword')
+    })
+
+  constructor(private authService: AuthService, private router: Router) {
+  }
+
+  matchValidator(controlName: string, matchingControlName: string): ValidatorFn {
+    return (abstractControl: AbstractControl) => {
+      const control = abstractControl.get(controlName);
+      const matchingControl = abstractControl.get(matchingControlName);
+
+      if (matchingControl!.errors && !matchingControl!.errors?.['confirmedValidator']) {
+        return null;
+      }
+
+      if (control!.value !== matchingControl!.value) {
+        const error = { confirmedValidator: 'Passwords do not match.' };
+        matchingControl!.setErrors(error);
+        return error;
+      } else {
+        matchingControl!.setErrors(null);
+        return null;
+      }
+    }
+
+
+  }
+
+  onSubmit() {
+    this.authService.register(this.form.value as RegisterRequest).subscribe({
+      next: response => {
+        console.log(response)
+        sessionStorage.setItem('jwt', response.token);
+        this.authService.refreshAuth$.next(true);
+        this.router.navigate(['/'])
+      }
+      }
+    )
+  }
+}
+
