How manju-nad-k/accedent-alert-project works
This repository is an accident-alert web application: users sign up or log in, save an emergency contact, and can trigger an SOS call from the home screen, optionally including their location. The Angular client talks to a Spring backend for authentication, profile, phone-number, and SOS operations; the backend also has JWT security, persistence entities and repositories, and Twilio configuration. The README is empty, and backend source was not sampled, so backend interactions beyond the frontend's HTTP endpoints are documented only where endpoint URLs support them; internal backend call paths are omitted.
Main entry points: app.routes.ts Page routing · login.component.ts Login and signup · UserService.java User service · home.component.ts Emergency home
Components 30
Angular client
- App bootstrap
frontend/src/main.ts - Page routing
frontend/src/app/app.routes.ts - App shell
frontend/src/app/app.component.ts - Login and signup
frontend/src/app/login/login.component.ts - Login API client
frontend/src/app/Services/login.service.ts - Emergency home
frontend/src/app/home/home.component.ts - Phone number client
frontend/src/app/service/calldb-service.service.ts - SOS client
frontend/src/app/Services/sos.service.ts - User profile
frontend/src/app/profile/profile.component.ts - Profile API client
frontend/src/app/Services/use-profile-info.service.ts - Road safety guidance
frontend/src/app/safetyy/safety.component.ts - About page
frontend/src/app/about/about.component.ts - Call page
frontend/src/app/call/call.component.ts
Spring backend
- Login endpoints
src/main/java/com/example/demo/controller/LoginController.java - Phone endpoints
src/main/java/com/example/demo/controller/PhoneNumberController.java - SOS endpoint
src/main/java/com/example/demo/controller/SosController.java - Profile endpoint
src/main/java/com/example/demo/controller/UserProfileController.java - User service
src/main/java/com/example/demo/service/UserService.java - Phone service
src/main/java/com/example/demo/service/PhoneNumberService.java - SOS service
src/main/java/com/example/demo/service/SosService.java - Twilio integration
src/main/java/com/example/demo/config/TwilioConfig.java
Identity and security
- Authentication state
frontend/src/app/auth.guard.ts - JWT filter
src/main/java/com/example/demo/security/JwtFilter.java - JWT utilities
src/main/java/com/example/demo/security/JwtUtil.java - Security configuration
src/main/java/com/example/demo/security/SecurityConfig.java
Persistence
- User records
src/main/java/com/example/demo/repository/UserRepository.java - Emergency numbers
src/main/java/com/example/demo/repository/PhoneNumberRepository.java - SOS requests
src/main/java/com/example/demo/repository/SosRepository.java
Other components
- App user
- Twilio calling service
Connections 31
- App user → Login and signup: signs in
- App bootstrap → App shell: starts
frontend/src/main.ts - App bootstrap → Page routing: configures
frontend/src/main.ts - Page routing → Login and signup: routes to
frontend/src/app/app.routes.ts - Page routing → Emergency home: routes to
frontend/src/app/app.routes.ts - Page routing → About page: routes to
frontend/src/app/app.routes.ts - Page routing → Call page: routes to
frontend/src/app/app.routes.ts - Page routing → Road safety guidance: routes to
frontend/src/app/app.routes.ts - Page routing → User profile: routes to
frontend/src/app/app.routes.ts - App shell → Authentication state: uses
frontend/src/app/app.component.ts - Login and signup → Login API client: submits credentials
frontend/src/app/login/login.component.ts - Login and signup → Authentication state: stores session
frontend/src/app/login/login.component.ts - Login API client → Login endpoints: HTTP auth
frontend/src/app/Services/login.service.ts - Login endpoints → User service: delegates
- User service → User records: persists users
- Emergency home → Phone number client: loads contact
frontend/src/app/home/home.component.ts - Emergency home → SOS client: triggers alert
frontend/src/app/home/home.component.ts - Phone number client → Phone endpoints: HTTP phone data
frontend/src/app/service/calldb-service.service.ts - Phone endpoints → Phone service: delegates
- Phone service → Emergency numbers: reads and writes
- SOS client → SOS endpoint: HTTP SOS
frontend/src/app/Services/sos.service.ts - SOS endpoint → SOS service: delegates
- SOS service → SOS requests: records request
- SOS service → Twilio calling service: places call
- Twilio calling service → Twilio integration: uses configuration
- User profile → Profile API client: loads profile
frontend/src/app/profile/profile.component.ts - Profile API client → Profile endpoint: HTTP profile
frontend/src/app/Services/use-profile-info.service.ts - Profile endpoint → User service: delegates
- User service → User records: reads and writes
- Security configuration → JWT filter: configures filter
- JWT filter → JWT utilities: checks tokens