---
# System prepended metadata

title: Funk-drive

---

# Funk-drive

## Documentation consultée

### Spring boot et Docker

https://levio.ca/expertises/dockeriser-une-application-spring-boot-avec-tomcat/

https://medium.com/@AtefMADDOURI/dockeriser-vos-applications-spring-boot-8e33d76cddba

### Spring boot et VSC

https://careers.edicomgroup.com/techblog/develop-your-spring-boot/

### Spring config

https://start.spring.io/

### Spring boot et BDD

https://bnguimgo.developpez.com/tutoriels/spring/services-rest-avec-springboot-et-spring-resttemplate/?page=premiere-partie-le-serveur#LI-B-2-b

https://www.baeldung.com/spring-boot-failed-to-configure-data-source

https://www.tutoderien.com/spring-data-connexion-a-la-base-de-donnees/

exemple github : https://github.com/bezkoder/spring-boot-jpa-postgresql/tree/master

https://hackernoon.com/using-postgres-effectively-in-spring-boot-applications

### API Calls with React

https://builtin.com/software-engineering-perspectives/react-api

### Springboot + PostgresSQL

https://zetcode.com/springboot/postgresql/

https://tipsontech.medium.com/springboot-with-postgres-d6ca9050b494

https://www.bezkoder.com/spring-boot-postgresql-example/

### Connexion API spring boot et BDD postgresSQL

https://javarush.com/fr/groups/posts/fr.2579.ajout-dune-base-de-donnes-postgresql--un-service-restful-sur-spring-boot-partie-1

### Springboot + JWT

https://www.bezkoder.com/spring-boot-jwt-authentication/

https://github.com/bezkoder/spring-boot-security-postgresql

### Springboot security

https://openclassrooms.com/fr/courses/7137776-securisez-votre-application-web-avec-spring-security

### Springboot security / secret

Comment conserver le secret ?
https://stackoverflow.com/questions/77463327/how-to-get-secret-key-for-reading-jwt-in-spring-boot

### React + Spring boot

https://www.axopen.com/blog/2021/10/tuto-application-ReactJS-API-SpringBoot-partie1/

### React authentification

https://foalts.org/fr/docs/tutorials/real-world-example-with-react/10-auth-with-react/

## Stack

- React JS
- Java avec le framework Spring boot
- SQL Postgre

## Entités

User

User_Id: UUID
User_FirstName: string
User_LastName: string
User_Email: string
User_Password: string
User_CreatedAt: date / Timestamp

File

File_Id: UUID
File_Name: string
File_CreatedAt: date / Timestamp
User_Id: UUID
Folder_Id: UUID

Folder

Folder_Id: UUID
Folder_Name: string
Folder_CreatedAt: date / Timestamp
User_Id: UUID

Share

Share_Id: UUID
Share_CreatedAt: date / Timestamp
User_Id: UUID
File_Id: UUID

Permission

Permission_Id: UUID
User_Id: UUID
File_Id: UUID

## Entities representation

```mermaid
erDiagram
User ||--o{ File : "adds"
User ||--o{ Folder : "adds"
User ||--o{ Share : "can"
Permission ||--o{ File : "to read"
Share ||--o{ File : "share"
User ||--o{ Permission : "has"
Folder ||--o{ File : "contains"
Folder ||--o{ Folder : "contains"

User {
    UUID user_id
    string user_firstname
    string user_lastName
    string user_email
    string user_password
    date user_createdat
}

File {
    UUID file_id
    string file_name
    date file_createdat
    UUID user_id
    UUID folder_id
}

Folder {
    UUID folder_id
    string folder_name
    date folder_createdat
    UUID user_id
    UUID parent_folder_id
}

Share {
    UUID share_id
    date share_createdat
    UUID user_id
    UUID file_id
}

Permission {
    UUID permission_id
    UUID user_id
    UUID file_id
}

```

## architecture côté Spring boot

|-- main
    |-- java
        |-- com
            |-- example
                |-- controller
                    |-- AuthController.java
                    |-- FolderController.java
                    |-- FileController.java
                |-- model
                    |-- User.java
                    |-- Folder.java
                    |-- File.java
                |-- payload
                    |-- request
                        |-- LoginRequest.java
                        |-- SignupRequest.java
                    |-- response
                        |-- JwtResponse.java
                        |-- MessageResponse.java
                |-- repository
                    |-- UserRepository.java
                    |-- FolderRepository.java
                    |-- FileRepository.java
                |-- service
                    |-- UserService.java
                    |-- FolderService.java
                    |-- FileService.java
                |-- security
                    |-- jwt
                        |-- AuthEntryPointJwt.java
                        |-- AuthTokenFilter.java
                        |-- JwtUtils.java
                    |-- implservice
                        |-- UserServiceImpl.java
                        |-- FolderServiceImpl.java
                        |-- FileServiceImpl.java
                    |-- WebSecurityConfig.java
    |-- resources
        |-- application.properties