Skip to content

Commit 64ba8a5

Browse files
Initial commit
0 parents  commit 64ba8a5

File tree

70 files changed

+2666
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2666
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.mvn/wrapper/maven-wrapper.jar

61.1 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Saurabh Maurya
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+236
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
2+
# VVnT API Documentation
3+
4+
Welcome to the VVnT API documentation, showcasing the innovative backend code developed by Saurabh Maurya for VVnT Organization. Powered by SpringBoot, this code reflects precision and excellence, offering a seamless and robust experience. Dive into the realm of VVnT and witness Saurabh Maurya's vision, where every line of code signifies dedication, brilliance, and a commitment to unparalleled performance.
5+
6+
## Contact Information
7+
- **Developer:** Saurabh Maurya
8+
- **Website:** [VVnT](https://vvnt.netlify.app/)
9+
- **Email:** [[email protected]](mailto:[email protected])
10+
- **License:** [OPEN License](https://quikbazaar.netlify.app/)
11+
12+
## API Documentation External Docs
13+
For additional information, please refer to our [external documentation](https://github.com/saurabhm1).
14+
15+
## API Base URL
16+
[http://vvnt.up.railway.app](http://vvnt.up.railway.app) - Generated server URL.
17+
18+
## Table of Contents
19+
1. [UserController](#usercontroller)
20+
- [Get Single User by UserId](#get-single-user-by-userid)
21+
- [Update User](#update-user)
22+
- [Delete User](#delete-user)
23+
- [Get All Users](#get-all-users)
24+
- [Create New User](#create-new-user)
25+
- [Serve User Image](#serve-user-image)
26+
- [Upload User Image](#upload-user-image)
27+
- [Search Users](#search-users)
28+
- [Get User by Email](#get-user-by-email)
29+
- [Get Current User](#get-current-user)
30+
2. [AuthController](#authcontroller)
31+
- [Login](#login)
32+
- [Login with Google](#login-with-google)
33+
- ... (The rest of the AuthController operations follow a similar pattern)
34+
35+
---
36+
37+
## UserController
38+
39+
### Get Single User by UserId
40+
- **Endpoint:** `/users/{userId}`
41+
- **Method:** `GET`
42+
- **Parameters:**
43+
- `{userId}`: User ID (String)
44+
- **Response:**
45+
```json
46+
{
47+
// UserDto details
48+
}
49+
```
50+
51+
### Update User
52+
- **Endpoint:** `/users/{userId}`
53+
- **Method:** `PUT`
54+
- **Parameters:**
55+
- `{userId}`: User ID (String)
56+
- **Request Body:**
57+
```json
58+
{
59+
// UserDto details
60+
}
61+
```
62+
- **Response:**
63+
```json
64+
{
65+
// Updated UserDto details
66+
}
67+
```
68+
69+
### Delete User
70+
- **Endpoint:** `/users/{userId}`
71+
- **Method:** `DELETE`
72+
- **Parameters:**
73+
- `{userId}`: User ID (String)
74+
- **Response:**
75+
```json
76+
{
77+
"message": "User deleted successfully",
78+
"success": true,
79+
"status": "200 OK"
80+
}
81+
```
82+
83+
### Get All Users
84+
- **Endpoint:** `/users`
85+
- **Method:** `GET`
86+
- **Parameters:**
87+
- `pageNumber` (Optional): Page number (Integer, default: 0)
88+
- `pageSize` (Optional): Page size (Integer, default: 10)
89+
- `sortBy` (Optional): Sort field (String, default: "name")
90+
- `sortDir` (Optional): Sort direction (String, default: "asc")
91+
- **Response:**
92+
```json
93+
{
94+
// PageableResponseUserDto details
95+
}
96+
```
97+
98+
### Create New User
99+
- **Endpoint:** `/users`
100+
- **Method:** `POST`
101+
- **Request Body:**
102+
```json
103+
{
104+
// UserDto details
105+
}
106+
```
107+
- **Response:**
108+
```json
109+
{
110+
// New UserDto details
111+
}
112+
```
113+
114+
### Serve User Image
115+
- **Endpoint:** `/users/image/{userId}`
116+
- **Method:** `GET`
117+
- **Parameters:**
118+
- `{userId}`: User ID (String)
119+
- **Response:**
120+
```json
121+
{
122+
// User image details
123+
}
124+
```
125+
126+
### Upload User Image
127+
- **Endpoint:** `/users/image/{userId}`
128+
- **Method:** `POST`
129+
- **Parameters:**
130+
- `{userId}`: User ID (String)
131+
- **Request Body:**
132+
```json
133+
{
134+
"userImage": "base64EncodedImage"
135+
}
136+
```
137+
- **Response:**
138+
```json
139+
{
140+
// ImageResponse details
141+
}
142+
```
143+
144+
### Search Users
145+
- **Endpoint:** `/users/search/{keywords}`
146+
- **Method:** `GET`
147+
- **Parameters:**
148+
- `{keywords}`: Search keywords (String)
149+
- `pageNumber` (Optional): Page number (Integer, default: 0)
150+
- `pageSize` (Optional): Page size (Integer, default: 10)
151+
- `sortBy` (Optional): Sort field (String, default: "name")
152+
- `sortDir` (Optional): Sort direction (String, default: "asc")
153+
- **Response:**
154+
```json
155+
{
156+
// PageableResponseUserDto details
157+
}
158+
```
159+
160+
### Get User by Email
161+
- **Endpoint:** `/users/email/{email}`
162+
- **Method:** `GET`
163+
- **Parameters:**
164+
- `{email}`: User email (String)
165+
- **Response:**
166+
```json
167+
{
168+
// UserDto details
169+
}
170+
```
171+
172+
### Get Current User
173+
- **Endpoint:** `/auth/current`
174+
- **Method:** `GET`
175+
- **Response:**
176+
```json
177+
{
178+
// UserDto details
179+
}
180+
```
181+
182+
---
183+
184+
## AuthController
185+
186+
### Login
187+
- **Endpoint:** `/auth/login`
188+
- **Method:** `POST`
189+
- **Request Body:**
190+
```json
191+
{
192+
"email": "[email protected]",
193+
"password": "password123"
194+
}
195+
```
196+
- **Response:**
197+
```json
198+
{
199+
"jwtToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
200+
"user": {
201+
// UserDto details
202+
}
203+
}
204+
```
205+
- **Security:** Bearer Token (`JWT`)
206+
207+
### Login with Google
208+
- **Endpoint:** `/auth/google`
209+
- **Method:** `POST`
210+
- **Request Body:**
211+
```json
212+
{
213+
// Google Sign-In response
214+
}
215+
```
216+
- **Response:**
217+
```json
218+
{
219+
"jwtToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
220+
"user": {
221+
// UserDto details
222+
}
223+
}
224+
```
225+
- **Security:** Bearer Token (`JWT`)
226+
227+
... (The rest of the AuthController operations follow a similar pattern)
228+
229+
---
230+
231+
This documentation provides a comprehensive guide to the VVnT API. Explore and integrate to experience the seamless blend of innovation and expertise.
232+
```
233+
234+
This version includes the specified addition. Feel free to use and modify it as needed
235+
236+
.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)