Skip to content

devdiyar/HabitXP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

296 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dieses Readme ist Teil der App "HabitXP", einer Habit-Tracking-Anwendung mit Gaming Mechanismen. Thumbnail

Team

Members: Dustin, Yassine, Diyar, Kathrin

Quickstart

Backend

Go to the project directory

  cd backend

Start the server

  ./mvnw spring-boot:run

⚠️ MongoDB muss im Hintergrund laufen

Frontend

Go to the project directory

  cd mobile

Start Expo

  npx expo start
  
  ODER
  
  npm run web

Prerequisites

Operating System: Windows

  • Java 17+
  • Maven
  • MongoDB lokal installiert (läuft auf mongodb://localhost:27017)

Installation and Setup

  1. Clone the repository:
$ git clone https://github.com/diyardev001/HabitXP.git
  1. Navigate to the project directory:
$ cd HabitXP
  1. Adjust configuration files:

Modify configuration files (e.g., .env, application.properties) as required.


API Dokumentation

Für die API-Dokumentation und einfaches Testen verwenden wir Swagger-UI.

Hinweis:

  • Die API erfordert ansonsten Authentifizierung via JWT.

Mit Swagger kannst du:

  • Alle verfügbaren Endpoints einsehen
  • API Requests direkt im Browser testen
  • Beispiel-Request- und Response-Bodies sehen

Authentifizierung

Für geschützte Endpunkte ist ein JWT Token erforderlich. Hole dir ein Token über den /auth/login Endpoint.

Projektstruktur

Backend

Die Backend-Struktur basiert auf einem typischen Spring Boot Setup mit klarer Trennung von Verantwortlichkeiten:

backend/
├── .mvn/                     # Maven Wrapper Dateien
├── src/
│   ├── main/
│   │   ├── java/
│   │   │   └── com.habitxp.backend/
│   │   │       ├── controller/       # REST Controller (Auth, User)
│   │   │       ├── dto/              # Daten-Transfer-Objekte (LoginRequest, RegisterRequest, AuthResponse)
│   │   │       ├── model/            # Datenmodelle (z.B. User)
│   │   │       ├── repository/       # JPA/Mongo Repositories
│   │   │       ├── security/         # JWT Konfiguration & Filter
│   │   │       ├── service/          # Business-Logik (z.B. AuthService)
│   │   │       └── BackendApplication.java  # Main-Klasse
│   │   └── resources/
│   │       ├── static/               # Statische Ressourcen (z.B. Bilder, JS)
│   │       ├── templates/            # (optional) HTML-Templates
│   │       └── application.properties # Konfigurationsdatei
│
├── test/                  # Testklassen
├── mvnw / mvnw.cmd        # Maven Wrapper
├── .gitignore
├── README.md
└── HELP.md

Mobile (Frontend)

Das mobile Frontend basiert auf Expo und folgt einer modularen Projektstruktur:

mobile/
├── .expo/                   # Expo spezifische Cache-Daten
├── app/                     # App Entry-Point und Routing
│   ├── (tabs)/              # Tab-Navigation
│   │   ├── _layout.tsx      # Hauptlayout für Tabs
│   │   └── index.tsx        # Startseite (z.B. Dashboard)
│
├── assets/                  # Bilder, Fonts, etc.
├── components/              # Wiederverwendbare UI-Komponenten
├── node_modules/            # Abhängigkeiten
├── app.json                 # Expo Konfiguration
├── expo-env.d.ts            # TypeScript Setup für Expo-Module
├── package.json             # Projektabhängigkeiten & Skripte
├── tsconfig.json            # TypeScript Konfiguration
├── .gitignore
└── README.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages