I am not only Java/Kotlin Programmer. Also I am a Content Creator on Twitch
There is a 3 main projects:
I am not only Java/Kotlin Programmer. Also I am a Content Creator on Twitch
There is a 3 main projects:
#findAll()
-> Collection<Product>
#findById(Long productId)
-> Optional<Product>
#findByCategory(String category)
-> List<Product>
#save(Product product)
-> Product
#deleteById(Long productId)
-> throws some Exception
#getUserByUsername(String)
-> User
/ Optional<User>
#getUserById(long)
-> User
/ Optional<User>
#createUser(User)
-> User
#updateUser(User)
-> User
#removeUserById(long)
-> void
throws some Exception
low priority
#listUsers(Pageable)
-> Collections<User>
/api/account
RegisterUser
) - 201 - "redirect:/register/complete"
token: String
) - 204 - void
[ 403 - InvalidTokenException
, 404 - SessionExpiredException
]/api/account/login
token: String
) - 200 - SessionToken
[ 403 - InvalidTokenException
]username: String
, password: String
) - 201 - SessionToken
[ 401 - InvalidAuthorizationException
]/api/account/verify
(token: String
) [POST] - 201 - SessionToken
[ 404 - ExpiredException
, 403 - InvalidTokenException
]/api/account/logout
(token: String
) - [PATCH] - 204 - void
[ 403 - InvalidTokenException
, 404 - SessionExpiredException
]/api/cart
Collection<CartItemDetail>
Collection<CartItem>
) - 201 - Collection<CartItemDetail>
- quantity == 0
removes item/api/checkout
(CheckoutData
) [POST] - 201 "redirect:/pay/{id}"
/api/pay/{id}
[GET] - 200 PayDetails
/api/search?q={query}
[GET] - 200 - Pageable<Product>
/api/users
[ 403 - !hasAccess('ADMIN', 'SUPER_ADMIN')
]
Pageable<User>
UserCreate
) - 201 - User
/api/users/{id}
User
UserUpdate
) - 200 User
void
/api/categories
Collection<Category>
CategoryCreate
) - 201 - Category
[ 403 - !hasAccess('ADMIN', 'SUPER_ADMIN')
]/api/categories/{id}
Category
CategoryUpdate
) - 200 Category
[ 403 - !hasAccess('ADMIN', 'SUPER_ADMIN')
]void
[ 403 - !hasAccess('ADMIN', 'SUPER_ADMIN')
]/api/categories/{id}/products
[GET] - 200 - Pageable<Product>
/api/products
Pageable<Product>
ProductCreate
) - 201 - Product
/api/products/{id}
Product
ProductUpdate
) - 200 Product
[ 403 - !hasAccess('ADMIN', 'SUPER_ADMIN') or !isSeller
]void
[ 403 - !hasAccess('ADMIN', 'SUPER_ADMIN') or !isSeller
]/api/products/{id}/comments
Pageable<Comment>
CommentCreate
) - 201 - Comment
/api/products/{id}/comments/{id}
- [ 400 InvalidCommentException
]
Comment
CommentUpdate
) - 201 - Comment
[ 403 - !hasAccess('ADMIN', 'SUPER_ADMIN') or !isCreator
]void
[ 403 - !hasAccess('ADMIN', 'SUPER_ADMIN') or !isCreator
]User
id: long
username: String
password: String
created_at: Instant
updated_at: Instant
permission: UserPermission
email: String
active: boolean
RegisterToken
token: UUID
user: User
expired_at: Instant
SessionToken
token: UUID
user: User
expired_at: Instant
user_agent: String
ip_address: String
Cart
id: String
- pulling from JSESSIONID
cookieuser: User
[nullable if anonymous
]items: Collection<CartItem>
CartItem
product: Product
quantity: int
PayDetails
id: UUID
status: PayStatus
processor: String
orders: Collection<Order>
reason: String
[nullable - if PayStatus != ERROR
]Product
id: long
name: String
description: String
images: Collection<URI>
seller: User
category: Category
unit_price: double
units: int
created_at: Instant
updated_at: Instant
Category
id: long
name: String
description: String
parent: Category
[nullable]Comment
- one of score
/ body
must be filled
id: long
product: Product
author: User
body: String
[nullable]score: Integer
[nullable]Order
id: UUID
details: OrderDetails
address: Address
user: User
[nullable]created_at: Instant
OrderDetails
id: UUID
product: Product
price: double
quantity: int
{
"id": 0,
"username": "String",
"email": "String",
"created_at": "date-time",
"updated_at": "date-time",
"active": false,
"permission": "ENUM"
}
{
"token": "UUID",
"expired_at": "date-time",
"user": {
"id": 0,
"username": "String",
"created_at": "date-time",
"updated_at": "date-time",
"permission": "ENUM",
"email": "String"
}
}
T
>{
"data": [T],
"items": 0
}
[
{
"quantity": 10,
"product": {
"id": 54510,
"name": "String",
"description": "String",
"images": ["URI"],
"unit_price": 0.01,
"created_at": "date-time",
"updated_at": "date-time",
"seller": {
"id": 0,
"username": "String",
"created_at": "date-time",
"updated_at": "date-time",
"active": false,
"permission": "ENUM"
}
}
}
]
{
"id": 54510,
"name": "String",
"description": "String",
"images": [
"URI"
],
"category": {
"id": 110,
"name": "String",
"description": "String"
},
"units": 600,
"unit_price": 0.01,
"rating": 4.6821678,
"created_at": "date-time",
"updated_at": "date-time",
"seller": {
"id": 0,
"username": "String",
"created_at": "date-time",
"updated_at": "date-time",
"active": false,
"permission": "ENUM"
}
}
{
"id": 45204567,
"author": {
"id": 0,
"username": "String",
"created_at": "date-time",
"updated_at": "date-time",
"active": false,
"permission": "ENUM"
},
"body": "String",
"rate": 5
}
{
"id": 110,
"name": "String",
"description": "String",
"parent": {
"id": 12,
"name": "String",
"description": "String"
}
}
{
"id": "UUID",
"status": "FAILED",
"processor": "PayPal",
"orders": [
{
"quantity": 10,
"product": {
"id": 54510,
"name": "String",
"description": "String",
"images": ["URI"],
"unit_price": 0.01,
"created_at": "date-time",
"updated_at": "date-time",
"seller": {
"id": 0,
"username": "String",
"created_at": "date-time",
"updated_at": "date-time",
"active": false,
"permission": "ENUM"
}
}
}
],
"reason": "Invalid Transaction ID"
}
{
"username": "String",
"password": "String",
"email": "String"
}
{
"product": 54965106,
"quantity": 6
}
{
"username": "String",
"password": "String",
"email": "String",
"permission": "ADMIN",
"active": false
}
{
"name": "String",
"description": "String",
"parent": 65206956,
}
{
"name": "String",
"description": "String",
"images": ["URI"],
"category": 54198516,
"unit_price": 6.19,
"units": 400
}
{
"body": "String",
"rate": 5
}
{
"address": "String",
"rate": 5
}
@GET("/users/{id}") #getUser(long id)
-> Response<User>
@POST("/users") #register(CreateUserDTO dto)
-> Response<User>
- 201
@GET("/users") #fetch(Pageable pageable)
-> Response<Collection<User>>
- 403
if not ADMIN / SUPER_ADMIN@PATCH("/users/{id}") update(long id, UserUpdateDTO dto)
-> Response<User>
- with password change@DELETE("/users/{id}") delete(long id)
-> Response<?> - 204
@POST("/login") #login(String user, String password)
-> Response<SessionToken>
@GET("/login") #check(String token)
-> Response<SessionToken>
#getProducts(Pageable pageable)
-> Collection<Product>
#getProductById(long id)
-> Optional<Product>
#getProductsByCategory(String category)
-> productRepository.findByCategory(category)
#create(@Validate ProductAddDTO dto)
-> Product
#update(long id, ProductUpdateDTO dto)
-> Product
#deleteProduct(long productId)
-> void
@GET("/products/{id}") #getProduct(long id)
-> Response<Product>
@GET("/products") #getProducts(Pageable pageable)
-> Collection<Product>
@GET("/products/category/{category}")
-> productService.getProductsByCategory(category)
ResponseEntity.ok(products)@POST("/products") #create(ProductAddDTO dto)
-> Response<Product>
- 201
@PUT("/products/{id}") #update(ProductUpdateDTO dto)
-> Response<Product>
@DELETE("/products/{id}") #remove(long id)
-> Response<void>
Framework: Vue Angular
Non-responsive (Desktop First)
/
/login
/register
/search?q={query}
/category/{id}
/product/{id}
/cart
/checkout
/pay/{id}
/account
/account/settings
/account/settings/address
/account/settings
[modal] -> redirect with popup success/account/orders
/account/payments
/account/products
/account/products/new
/account/products/{id}
/account/products/{id}
/account/products/{id}/comments
/admin
/admin/dashboard
/admin/users
/admin/categories
/admin/settings
/admin/products
/admin/products/{id}/comments
BCrypt
default#register(@Validate CreateUserDTO dto)
-> User
throws ValidationException
#update(@Validate UpdateUserDTO dto)
-> User
throws ValidationException
#delete(long id)
throws some Exception
#get(long id)
-> Optional<User>
#login(String user, String password)
-> SessionToken
throws some Exception
#checkSession(String token)
-> SessionToken
throws some Exception
#changePassword(long id, String old, String new)
(Low Prio)UserRepository
(via @Autowiered
/ constructor) - #1A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.