Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/admin/admin.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/admin/admin.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/admin/admin.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { AdminService } from './admin.service';
+
+describe('AdminService', () => {
+  let service: AdminService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(AdminService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/admin/admin.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/admin/admin.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/admin/admin.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,37 @@
+import { Injectable } from '@angular/core';
+import {HttpClient, HttpHeaders} from "@angular/common/http";
+import {Observable} from "rxjs";
+import {AdminUsersResponse} from "../../model/responses/AdminUsersResponse";
+import {FinesPerLine} from "../../model/FinesPerLine";
+import {CommutesByHour} from "../../components/charts/line-chart.component";
+import {IncomeData} from "../../components/charts/stacked-bar-chart.component";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class AdminService {
+  private url = '/api/admin'
+  constructor(private http: HttpClient) { }
+
+  getAllUsers(): Observable<AdminUsersResponse[]> {
+    return this.http.get<AdminUsersResponse[]>(`${this.url}/all-users`)
+  }
+
+  updateRolesToUser(id: number, roles: string[]): Observable<AdminUsersResponse[]> {
+    return this.http.post<AdminUsersResponse[]>(`${this.url}/update-roles/${id}`, JSON.stringify(roles), {
+      headers: new HttpHeaders({'Content-Type': 'application/json'})
+    })
+  }
+
+  getFinesPerLine() {
+    return this.http.get<FinesPerLine[]>(`${this.url}/fines-by-line`);
+  }
+
+  getCommutesByHour() {
+    return this.http.get<CommutesByHour[]>(`${this.url}/commutes-by-hour`);
+  }
+
+  getTotalIncome() {
+    return this.http.get<IncomeData[]>(`${this.url}/total-income`);
+  }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/auth/auth.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/auth/auth.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/auth/auth.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { AuthService } from './auth.service';
+
+describe('AuthService', () => {
+  let service: AuthService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(AuthService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/auth/auth.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/auth/auth.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/auth/auth.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,45 @@
+import { Injectable } from '@angular/core';
+import {Observable, Subject} from "rxjs";
+import {HttpClient, HttpHeaders} from "@angular/common/http";
+import {AuthResponse} from "../../model/responses/AuthResponse";
+import {AuthRequest} from "../../model/requests/AuthRequest";
+import {RegisterRequest} from "../../model/requests/RegisterRequest";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class AuthService {
+  refreshAuth$ = new Subject<boolean>();
+  private url = '/api/auth';
+
+  constructor(private http: HttpClient) { }
+
+  login(authRequest: AuthRequest): Observable<AuthResponse> {
+    return this.http.post<AuthResponse>(
+      `${this.url}`,
+      JSON.stringify(authRequest),
+      {
+        headers: new HttpHeaders({ 'Content-Type': 'application/json' })
+      }
+    )
+  }
+
+  register(registerRequest: RegisterRequest): Observable<AuthResponse> {
+    return this.http.post<AuthResponse>(
+      `${this.url}/register`,
+      JSON.stringify(registerRequest),
+      {
+        headers: new HttpHeaders({ 'Content-Type': 'application/json' })
+      }
+    )
+  }
+
+  isAuthenticated(): Observable<boolean> {
+    return this.http.get<boolean>(`${this.url}`);
+  }
+
+  isDriverFree(): Observable<boolean> {
+    return this.http.get<boolean>(`${this.url}/is-driver-free`);
+  }
+
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/bus/bus.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/bus/bus.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/bus/bus.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { BusService } from './bus.service';
+
+describe('BusService', () => {
+  let service: BusService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(BusService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/bus/bus.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/bus/bus.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/bus/bus.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,20 @@
+import { Injectable } from '@angular/core';
+import {Observable} from "rxjs";
+import {HttpClient} from "@angular/common/http";
+import {Bus} from "../../model/Bus";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class BusService {
+  private _url = '/api/buses'
+  constructor(private _http: HttpClient) { }
+
+  getAll(): Observable<Bus[]> {
+    return this._http.get<Bus[]>(`${this._url}`)
+  }
+
+  getAllFree() {
+    return this._http.get<Bus[]>(`${this._url}/free`)
+  }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/commute/commute.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/commute/commute.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/commute/commute.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { CommuteService } from './commute.service';
+
+describe('CommuteService', () => {
+  let service: CommuteService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(CommuteService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/commute/commute.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/commute/commute.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/commute/commute.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,24 @@
+import { Injectable } from '@angular/core';
+import {HttpClient, HttpHeaders} from "@angular/common/http";
+import {StartCommuteRequest} from "../../model/requests/StartCommuteRequest";
+import {Observable, tap} from "rxjs";
+import {CommuteResponse} from "../../model/responses/CommuteResponse";
+import {RouteInstanceResponse} from "../../model/responses/RouteInstanceResponse";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class CommuteService {
+
+  private url = '/api/commutes'
+
+  constructor(private http: HttpClient) { }
+
+  startCommute(request: StartCommuteRequest): Observable<CommuteResponse> {
+    return this.http.put<CommuteResponse>(`${this.url}/start`, JSON.stringify(request), {
+      headers: new HttpHeaders({'Content-Type': 'application/json'})
+    }).pipe(
+      tap(res => console.log(res))
+    )
+  }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/controls/controls.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/controls/controls.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/controls/controls.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { ControlsService } from './controls.service';
+
+describe('ControlsService', () => {
+  let service: ControlsService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(ControlsService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/controls/controls.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/controls/controls.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/controls/controls.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,29 @@
+import { Injectable } from '@angular/core';
+import {Observable} from "rxjs";
+import {HttpClient, HttpHeaders} from "@angular/common/http";
+import {ControlsResponse} from "../../model/responses/ControlsResponse";
+import {FineResponse} from "../../model/responses/FineResponse";
+import {FineRequest} from "../../model/requests/FineRequest";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class ControlsService {
+  private url = '/api/controls'
+
+  constructor(private http: HttpClient) { }
+
+  getControls(): Observable<ControlsResponse[]> {
+    return this.http.get<ControlsResponse[]>(`${this.url}`)
+  }
+
+  start(routeInstanceId: number): Observable<ControlsResponse> {
+    return this.http.put<ControlsResponse>(`${this.url}/start`, JSON.stringify(routeInstanceId), {
+      headers: new HttpHeaders({'Content-Type': 'application/json'})
+    })
+  }
+
+  getControlInfo(controlId: number): Observable<FineResponse[]> {
+    return this.http.get<FineResponse[]>(`${this.url}/${controlId}/fines`)
+  }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/direction/direction.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/direction/direction.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/direction/direction.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { DirectionService } from './direction.service';
+
+describe('DirectionService', () => {
+  let service: DirectionService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(DirectionService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/direction/direction.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/direction/direction.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/direction/direction.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,9 @@
+import { Injectable } from '@angular/core';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class DirectionService {
+
+  constructor() { }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/driver/driver.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/driver/driver.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/driver/driver.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { DriverService } from './driver.service';
+
+describe('DriverService', () => {
+  let service: DriverService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(DriverService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/driver/driver.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/driver/driver.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/driver/driver.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,9 @@
+import { Injectable } from '@angular/core';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class DriverService {
+  private url = '/api/drivers'
+  constructor() { }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/fine/fine.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/fine/fine.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/fine/fine.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { FineService } from './fine.service';
+
+describe('FineService', () => {
+  let service: FineService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(FineService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/fine/fine.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/fine/fine.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/fine/fine.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,20 @@
+import { Injectable } from '@angular/core';
+import {Observable} from "rxjs";
+import {FineResponse} from "../../model/responses/FineResponse";
+import {FineRequest} from "../../model/requests/FineRequest";
+import {HttpClient, HttpHeaders} from "@angular/common/http";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class FineService {
+  private url = '/api/fines'
+
+  constructor(private http: HttpClient) { }
+
+  createFine(request: FineRequest): Observable<FineResponse> {
+    return this.http.put<FineResponse>(`${this.url}`, JSON.stringify(request), {
+      headers: new HttpHeaders({'Content-Type': 'application/json'})
+    })
+  }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/line/line.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/line/line.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/line/line.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { LineService } from './line.service';
+
+describe('LineService', () => {
+  let service: LineService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(LineService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/line/line.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/line/line.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/line/line.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,22 @@
+import { Injectable } from '@angular/core';
+import {Observable} from "rxjs";
+import {HttpClient} from "@angular/common/http";
+import {Line} from "../../model/Line";
+import {Direction} from "../../model/Direction";
+import {LineDirection} from "../../model/LineDirection";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class LineService {
+  private url = '/api/lines'
+  constructor(private _http: HttpClient) { }
+
+  getAll(): Observable<Line[]> {
+    return this._http.get<Line[]>(`${this.url}`)
+  }
+
+  getDirections(line: Line): Observable<LineDirection[]> {
+    return this._http.get<LineDirection[]>(`${this.url}/${line.id}/directions`)
+  }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/route-instance/route-instance.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/route-instance/route-instance.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/route-instance/route-instance.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { RouteInstanceService } from './route-instance.service';
+
+describe('RouteInstanceService', () => {
+  let service: RouteInstanceService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(RouteInstanceService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/route-instance/route-instance.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/route-instance/route-instance.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/route-instance/route-instance.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,41 @@
+import {Injectable} from '@angular/core';
+import {Observable} from "rxjs";
+import {StartRouteInstanceRequest} from "../../model/requests/StartRouteInstanceRequest";
+import {RouteInstanceResponse} from "../../model/responses/RouteInstanceResponse";
+import {HttpClient, HttpHeaders} from "@angular/common/http";
+import {StartCommuteRequest} from "../../model/requests/StartCommuteRequest";
+import {CommuteResponse} from "../../model/responses/CommuteResponse";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class RouteInstanceService {
+  private url = '/api/route-instances'
+
+  constructor(private http: HttpClient) {
+  }
+
+  start(request: StartRouteInstanceRequest): Observable<RouteInstanceResponse> {
+    return this.http.post<RouteInstanceResponse>(`${this.url}/start`, JSON.stringify(request), {
+      headers: new HttpHeaders({'Content-Type': 'application/json'})
+    })
+  }
+
+  getById(id: number): Observable<RouteInstanceResponse> {
+    return this.http.get<RouteInstanceResponse>(`${this.url}/${id}`)
+  }
+
+  stop(id: number): Observable<RouteInstanceResponse> {
+    return this.http.patch<RouteInstanceResponse>(`${this.url}/stop`, JSON.stringify(id), {
+      headers: new HttpHeaders({'Content-Type': 'application/json'})
+    })
+  }
+
+  getForStation(id: number): Observable<RouteInstanceResponse[]> {
+    return this.http.get<RouteInstanceResponse[]>(`${this.url}/station/${id}`)
+  }
+
+  getAll(): Observable<RouteInstanceResponse[]> {
+    return this.http.get<RouteInstanceResponse[]>(`${this.url}`)
+  }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/station/station.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/station/station.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/station/station.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { StationService } from './station.service';
+
+describe('StationService', () => {
+  let service: StationService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(StationService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/station/station.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/station/station.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/station/station.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { Injectable } from '@angular/core';
+import {Observable} from "rxjs";
+import {Station} from "../../model/Station";
+import {HttpClient} from "@angular/common/http";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class StationService {
+  private url = '/api/stations'
+  constructor(private http: HttpClient) { }
+
+  getAllStations(): Observable<Station[]> {
+    return this.http.get<Station[]>(this.url);
+  }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket-type/ticket-type.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket-type/ticket-type.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket-type/ticket-type.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { TicketTypeService } from './ticket-type.service';
+
+describe('TicketTypeService', () => {
+  let service: TicketTypeService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(TicketTypeService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket-type/ticket-type.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket-type/ticket-type.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket-type/ticket-type.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,18 @@
+import { Injectable } from '@angular/core';
+import {Observable} from "rxjs";
+import {Tipbilet} from "../../model/Tipbilet";
+import {HttpClient} from "@angular/common/http";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class TicketTypeService {
+
+  private _url = '/api/ticket-types';
+
+  constructor(private http: HttpClient) { }
+
+  getTypes(): Observable<Tipbilet[]> {
+    return this.http.get<Tipbilet[]>(`${this._url}`)
+  }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket/ticket.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket/ticket.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket/ticket.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { TicketService } from './ticket.service';
+
+describe('TicketService', () => {
+  let service: TicketService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(TicketService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket/ticket.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket/ticket.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/ticket/ticket.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,31 @@
+import { Injectable } from '@angular/core';
+import {HttpClient, HttpHeaders} from "@angular/common/http";
+import {Observable} from "rxjs";
+import {TicketBuyRequest} from "../../model/requests/TicketBuyRequest";
+import {TicketResponse} from "../../model/responses/TicketResponse";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class TicketService {
+
+  private _url = '/api/tickets'
+
+  constructor(private http: HttpClient) { }
+
+  getTickets(): Observable<TicketResponse[]> {
+    return this.http.get<TicketResponse[]>(`${this._url}`)
+  }
+
+  activateTicket(id: number): Observable<TicketResponse> {
+    return this.http.patch<TicketResponse>(`${this._url}/activate/${id}`, JSON.stringify({}), {
+      headers: new HttpHeaders({'Content-Type': 'application/json'})
+    })
+  }
+
+  buyTicket(request: TicketBuyRequest): Observable<TicketResponse> {
+    return this.http.post<TicketResponse>(`${this._url}/buy`, JSON.stringify(request), {
+      headers: new HttpHeaders({'Content-Type': 'application/json'})
+    })
+  }
+}
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/user/user.service.spec.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/user/user.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/user/user.service.spec.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { UserService } from './user.service';
+
+describe('UserService', () => {
+  let service: UserService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(UserService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});
Index: bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/user/user.service.ts
===================================================================
--- bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/user/user.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
+++ bus-n-go-pavel-216049/bus-n-go-frontend/src/app/services/user/user.service.ts	(revision baf4cc4b66f1d62e9dc9c2e71bcc078c9c3956a3)
@@ -0,0 +1,21 @@
+import { Injectable } from '@angular/core';
+import {HttpClient} from "@angular/common/http";
+import {Observable} from "rxjs";
+import {UserResponse} from "../../model/responses/UserResponse";
+
+@Injectable({
+  providedIn: 'root'
+})
+export class UserService {
+  private _url= '/api/users'
+
+  constructor(private _http: HttpClient) { }
+
+  getUser(): Observable<UserResponse | undefined> {
+    return this._http.get<UserResponse>(`${this._url}`)
+  }
+
+  getAllPassengers(): Observable<UserResponse[]> {
+    return this._http.get<UserResponse[]>(`${this._url}/passengers`)
+  }
+}
