Skip to content

REST API for contact management and user authentication (Token JWT), built with Java, Spring Boot, PostgreSQL, Docker & Docker Compose, and Hibernate.

License

Notifications You must be signed in to change notification settings

TechAbraao/contacts-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API for Contacts

Tecnologias

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge
Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

🔐 Auth

Method URL Description
POST /api/auth/signup Register a new user
POST /api/auth/signin Login and obtain JWT token
POST /api/auth/signout Logout (invalidate token)

👤 User

Method URL Description
GET /api/users/me Get authenticated user data

📇 Contacts (Authenticated Users Only)

Method URL Description
GET /api/users/me/contacts List my contacts
GET /api/users/me/contacts/{contactId} Get a specific contact
POST /api/users/me/contacts Create a new contact
PUT /api/users/me/contacts/{contactId} Update a contact
DELETE /api/users/me/contacts/{contactId} Delete a contact

Table Model

erDiagram
    USERS {
        UUID id PK
        String username
        String email
        String password
        Enum roles
        LocalDateTime createdAt
        LocalDateTime updatedAt
    }

    CONTACTS {
        UUID id PK
        String fullName
        Long phone
        String email
        UUID user_id FK
    }

    USERS ||--o{ CONTACTS : "has many"
Loading

About

REST API for contact management and user authentication (Token JWT), built with Java, Spring Boot, PostgreSQL, Docker & Docker Compose, and Hibernate.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published