├── petshop-admin-panel ├── env.json ├── src │ ├── utils │ │ ├── apiUtil.js │ │ └── validationUtil.js │ ├── actions │ │ ├── authorizationActions.js │ │ └── loginActions.js │ ├── containers │ │ ├── signIn │ │ │ ├── signInService.js │ │ │ ├── signInUtil.js │ │ │ └── signInConstants.js │ │ ├── product │ │ │ ├── catgeory │ │ │ │ └── modals │ │ │ │ │ └── CategoryModal.css │ │ │ ├── product │ │ │ │ ├── modals │ │ │ │ │ └── AddProductModal.css │ │ │ │ ├── ProductImageService.js │ │ │ │ └── ProductService.js │ │ │ └── ProductUtil.js │ │ ├── home │ │ │ └── Home.js │ │ ├── question │ │ │ ├── AnswerService.js │ │ │ ├── QuestionService.js │ │ │ └── questionList.js │ │ ├── parameter │ │ │ └── ParameterService.js │ │ └── user │ │ │ └── UserService.js │ ├── constants │ │ └── globalConstants.js │ ├── env.json │ ├── envs │ │ ├── staging.json │ │ ├── development.json │ │ └── production.json │ ├── common │ │ ├── history.js │ │ ├── spinner │ │ │ └── Spinner.js │ │ └── axios.js │ ├── reducers │ │ ├── rootReducer.js │ │ └── loginReducer.js │ ├── subroutes │ │ └── appSubRoutes.js │ ├── setupTests.js │ ├── App.test.js │ ├── index.css │ ├── reportWebVitals.js │ ├── index.js │ ├── store.js │ ├── layouts │ │ ├── EmptyLayout.js │ │ └── ListItemLink.js │ ├── App.css │ ├── hoc │ │ └── PrivateRoute.js │ ├── sagas │ │ └── index.js │ └── components │ │ └── Alert.js ├── build │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ ├── static │ │ ├── css │ │ │ ├── main.e84d05ea.chunk.css │ │ │ └── main.e84d05ea.chunk.css.map │ │ └── js │ │ │ ├── runtime-main.5fee1e2e.js │ │ │ └── 2.466e3856.chunk.js.LICENSE.txt │ └── asset-manifest.json ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── scripts │ └── set-environment.js ├── README.md ├── .gitignore └── package.json ├── petshop-be ├── application │ ├── src │ │ └── main │ │ │ ├── resources │ │ │ ├── firebase.json │ │ │ └── application.properties │ │ │ └── java │ │ │ └── com │ │ │ └── turkninja │ │ │ └── petshop │ │ │ └── PetshopApplication.java │ └── pom.xml ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── domain │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── turkninja │ │ │ └── petshop │ │ │ ├── enums │ │ │ ├── PersistableEnum.java │ │ │ ├── QuestionType.java │ │ │ ├── Gender.java │ │ │ ├── UserStatus.java │ │ │ ├── PaymentMethod.java │ │ │ └── OrderState.java │ │ │ ├── api │ │ │ ├── response │ │ │ │ ├── answer │ │ │ │ │ ├── CreateAnswerResponse.java │ │ │ │ │ └── GetAllAnswerResponse.java │ │ │ │ ├── user │ │ │ │ │ ├── UserLoginResponse.java │ │ │ │ │ ├── UserImageInsertResponse.java │ │ │ │ │ ├── UserAddressCreateResponse.java │ │ │ │ │ ├── UserAddressGetResponse.java │ │ │ │ │ ├── UserAddressUpdateResponse.java │ │ │ │ │ └── UserResponse.java │ │ │ │ ├── product │ │ │ │ │ ├── GetProductImageResponse.java │ │ │ │ │ ├── ProductSearchCriteria.java │ │ │ │ │ ├── CreateProductImageResponse.java │ │ │ │ │ ├── UpdateCategoryResponse.java │ │ │ │ │ ├── CreateCategoryResponse.java │ │ │ │ │ ├── GetCategoryResponse.java │ │ │ │ │ ├── CreateProductResponse.java │ │ │ │ │ ├── UpdateProductResponse.java │ │ │ │ │ ├── GetSoleCategoryResponse.java │ │ │ │ │ └── GetProductResponse.java │ │ │ │ ├── parameter │ │ │ │ │ └── ParameterResponse.java │ │ │ │ ├── common │ │ │ │ │ ├── PageResponse.java │ │ │ │ │ └── PaginatedResponse.java │ │ │ │ ├── order │ │ │ │ │ ├── OrderItemGetResponse.java │ │ │ │ │ └── OrderGetResponse.java │ │ │ │ ├── question │ │ │ │ │ ├── CreateQuestionResponse.java │ │ │ │ │ └── GetQuestionResponse.java │ │ │ │ ├── exception │ │ │ │ │ └── ApiExceptionResponse.java │ │ │ │ └── sales │ │ │ │ │ └── SalesGetResponse.java │ │ │ └── request │ │ │ │ ├── question │ │ │ │ └── CreateQuestionRequest.java │ │ │ │ ├── answer │ │ │ │ └── CreateAnswerRequest.java │ │ │ │ ├── parameter │ │ │ │ └── UpdateParameterRequest.java │ │ │ │ ├── order │ │ │ │ ├── OrderProductAddRequest.java │ │ │ │ ├── OrderProductRemoveRequest.java │ │ │ │ └── OrderCreateRequest.java │ │ │ │ ├── product │ │ │ │ ├── CreateCategoryRequest.java │ │ │ │ ├── UpsertCategoryRequest.java │ │ │ │ ├── UpsertProductRequest.java │ │ │ │ └── CreateProductImageRequest.java │ │ │ │ ├── user │ │ │ │ ├── UserLoginRequest.java │ │ │ │ ├── UserAddressUpdateRequest.java │ │ │ │ ├── UserAddressCreateRequest.java │ │ │ │ ├── UserSignupRequest.java │ │ │ │ ├── UserImageInsertRequest.java │ │ │ │ └── UserUpdateRequest.java │ │ │ │ └── sales │ │ │ │ └── SalesCreateRequest.java │ │ │ ├── value │ │ │ ├── Image.java │ │ │ ├── Phone.java │ │ │ └── FullName.java │ │ │ ├── mapper │ │ │ ├── SalesMapper.java │ │ │ ├── OrderItemMapper.java │ │ │ ├── OrderMapper.java │ │ │ ├── ParameterMapper.java │ │ │ ├── ProductImageMapper.java │ │ │ ├── UserAddressMapper.java │ │ │ ├── AnswerMapper.java │ │ │ └── QuestionMapper.java │ │ │ ├── entity │ │ │ ├── user │ │ │ │ ├── UserAuthorityEntity.java │ │ │ │ ├── UserRoleEntity.java │ │ │ │ └── UserAddressEntity.java │ │ │ ├── applicationexception │ │ │ │ └── AppExceptionEntity.java │ │ │ ├── parameter │ │ │ │ └── ParameterEntity.java │ │ │ ├── order │ │ │ │ └── OrderItemEntity.java │ │ │ ├── product │ │ │ │ ├── ProductImageEntity.java │ │ │ │ ├── ProductCategoryEntity.java │ │ │ │ └── ProductEntity.java │ │ │ ├── question │ │ │ │ └── QuestionEntity.java │ │ │ ├── answer │ │ │ │ └── AnswerEntity.java │ │ │ ├── sales │ │ │ │ └── SalesEntity.java │ │ │ └── base │ │ │ │ └── BaseEntity.java │ │ │ ├── converters │ │ │ ├── BaseConverter.java │ │ │ ├── StringEnumConverter.java │ │ │ ├── LowerCaseEnumConverter.java │ │ │ └── AbstractEnumConverter.java │ │ │ ├── validation │ │ │ ├── util │ │ │ │ └── ValidationUtil.java │ │ │ └── product │ │ │ │ └── ProductCategoryValidator.java │ │ │ └── sequence │ │ │ └── OrderNumberGenerator.java │ └── pom.xml ├── core │ ├── src │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── turkninja │ │ │ │ └── petshop │ │ │ │ ├── constants │ │ │ │ └── ParameterConstants.java │ │ │ │ ├── exception │ │ │ │ ├── AppMessageDescription.java │ │ │ │ ├── ExceptionUtils.java │ │ │ │ └── AppParameter.java │ │ │ │ └── util │ │ │ │ └── ToStringBuilder.java │ │ │ └── resources │ │ │ └── application.properties │ └── pom.xml ├── repository │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── turkninja │ │ │ └── petshop │ │ │ ├── SalesRepository.java │ │ │ ├── UserRoleRepository.java │ │ │ ├── ProductImageRepository.java │ │ │ ├── ParameterRepository.java │ │ │ ├── QuestionRepository.java │ │ │ ├── AppExceptionRepository.java │ │ │ ├── UserAddressRepository.java │ │ │ ├── OrderItemRepository.java │ │ │ ├── OrderRepository.java │ │ │ ├── AnswerRepository.java │ │ │ ├── base │ │ │ └── EnableExtendedRepositories.java │ │ │ ├── ProductRepository.java │ │ │ ├── UserRepository.java │ │ │ └── ProductCategoryRepository.java │ └── pom.xml ├── service │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── turkninja │ │ │ └── petshop │ │ │ ├── sales │ │ │ └── SalesService.java │ │ │ ├── appException │ │ │ └── AppExceptionService.java │ │ │ ├── file │ │ │ └── FirebaseFileService.java │ │ │ ├── answer │ │ │ └── AnswerService.java │ │ │ ├── product │ │ │ ├── ProductImageService.java │ │ │ ├── ProductService.java │ │ │ ├── impl │ │ │ │ └── ProductImageServiceImpl.java │ │ │ └── CategoryService.java │ │ │ ├── parameter │ │ │ └── ParameterService.java │ │ │ ├── question │ │ │ └── QuestionService.java │ │ │ ├── user │ │ │ ├── UserService.java │ │ │ └── UserAddressService.java │ │ │ └── order │ │ │ └── OrderService.java │ └── pom.xml ├── .gitignore ├── security │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── turkninja │ │ │ └── petshop │ │ │ └── config │ │ │ ├── SecurityConfig.java │ │ │ ├── JwtConfig.java │ │ │ └── SpringSecurityAuditorAware.java │ └── pom.xml └── web │ └── src │ └── main │ └── java │ └── com │ └── turkninja │ └── petshop │ └── v1 │ ├── TestResource.java │ ├── AuthResource.java │ ├── AnswerResource.java │ └── FileResource.java ├── petshop-mobile ├── jsconfig.json ├── app │ ├── assets │ │ ├── icon.png │ │ ├── logo.png │ │ ├── splash.png │ │ ├── background.jpg │ │ └── small-avatar.jpg │ ├── auth │ │ ├── context.js │ │ ├── useAuth.js │ │ └── storage.js │ ├── api │ │ ├── users.js │ │ ├── auth.js │ │ ├── expoPushTokens.js │ │ ├── messages.js │ │ ├── client.js │ │ └── listings.js │ ├── utility │ │ ├── logger.js │ │ └── cache.js │ ├── navigation │ │ ├── routes.js │ │ ├── rootNavigation.js │ │ ├── navigationTheme.js │ │ ├── FeedNavigator.js │ │ ├── AccountNavigator.js │ │ ├── AuthNavigator.js │ │ └── NewListingButton.js │ ├── components │ │ ├── lists │ │ │ ├── index.js │ │ │ ├── ListItemSeparator.js │ │ │ └── ListItemDeleteAction.js │ │ ├── forms │ │ │ ├── index.js │ │ │ ├── SubmitButton.js │ │ │ ├── ErrorMessage.js │ │ │ ├── Form.js │ │ │ ├── FormPicker.js │ │ │ ├── FormImagePicker.js │ │ │ └── FormField.js │ │ ├── Text.js │ │ ├── PickerItem.js │ │ ├── Screen.js │ │ ├── Icon.js │ │ ├── ActivityIndicator.js │ │ ├── CategoryPickerItem.js │ │ ├── Button.js │ │ ├── OfflineNotice.js │ │ ├── TextInput.js │ │ ├── ImageInputList.js │ │ ├── Card.js │ │ └── ContactSellerForm.js │ ├── config │ │ ├── colors.js │ │ ├── styles.js │ │ └── settings.js │ ├── hooks │ │ ├── useApi.js │ │ ├── useLocation.js │ │ └── useNotifications.js │ └── screens │ │ ├── UploadScreen.js │ │ ├── ViewImageScreen.js │ │ ├── WelcomeScreen.js │ │ └── ListingsScreen.js ├── babel.config.js ├── .gitignore ├── app.json ├── App.js └── package.json ├── .idea ├── codeStyles │ └── codeStyleConfig.xml ├── vcs.xml ├── modules.xml ├── petshop-mobile.iml └── aws.xml ├── README.md └── LICENCE /petshop-admin-panel/env.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /petshop-admin-panel/src/utils/apiUtil.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/actions/authorizationActions.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/containers/signIn/signInService.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/containers/signIn/signInUtil.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /petshop-be/application/src/main/resources/firebase.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/containers/signIn/signInConstants.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/constants/globalConstants.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /petshop-mobile/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["node_modules"] 3 | } 4 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/env.json: -------------------------------------------------------------------------------- 1 | { 2 | "BASE_URL": "http://localhost:8081" 3 | } -------------------------------------------------------------------------------- /petshop-admin-panel/src/envs/staging.json: -------------------------------------------------------------------------------- 1 | { 2 | "BASE_URL": "localhost:8081" 3 | } -------------------------------------------------------------------------------- /petshop-admin-panel/src/envs/development.json: -------------------------------------------------------------------------------- 1 | { 2 | "BASE_URL": "localhost:8081" 3 | } -------------------------------------------------------------------------------- /petshop-admin-panel/src/envs/production.json: -------------------------------------------------------------------------------- 1 | { 2 | "BASE_URL": "localhost:8081" 3 | } -------------------------------------------------------------------------------- /petshop-admin-panel/build/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /petshop-admin-panel/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /petshop-mobile/app/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-mobile/app/assets/icon.png -------------------------------------------------------------------------------- /petshop-mobile/app/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-mobile/app/assets/logo.png -------------------------------------------------------------------------------- /petshop-mobile/app/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-mobile/app/assets/splash.png -------------------------------------------------------------------------------- /petshop-admin-panel/build/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-admin-panel/build/favicon.ico -------------------------------------------------------------------------------- /petshop-admin-panel/build/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-admin-panel/build/logo192.png -------------------------------------------------------------------------------- /petshop-admin-panel/build/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-admin-panel/build/logo512.png -------------------------------------------------------------------------------- /petshop-admin-panel/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-admin-panel/public/favicon.ico -------------------------------------------------------------------------------- /petshop-admin-panel/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-admin-panel/public/logo192.png -------------------------------------------------------------------------------- /petshop-admin-panel/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-admin-panel/public/logo512.png -------------------------------------------------------------------------------- /petshop-admin-panel/src/common/history.js: -------------------------------------------------------------------------------- 1 | import { createBrowserHistory } from 'history'; 2 | 3 | export const history = createBrowserHistory(); -------------------------------------------------------------------------------- /petshop-be/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-be/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /petshop-mobile/app/assets/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-mobile/app/assets/background.jpg -------------------------------------------------------------------------------- /petshop-mobile/app/assets/small-avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aliturgutbozkurt/zuri-petshop/HEAD/petshop-mobile/app/assets/small-avatar.jpg -------------------------------------------------------------------------------- /petshop-mobile/app/auth/context.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const AuthContext = React.createContext(); 4 | 5 | export default AuthContext; 6 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/utils/validationUtil.js: -------------------------------------------------------------------------------- 1 | export const isEmptyOrNull = str => { 2 | return str === "" || str === null || str === undefined; 3 | } 4 | -------------------------------------------------------------------------------- /petshop-mobile/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /petshop-mobile/app/api/users.js: -------------------------------------------------------------------------------- 1 | import client from "./client"; 2 | 3 | const register = (userInfo) => client.post("/v1/users", userInfo); 4 | 5 | export default { register }; 6 | -------------------------------------------------------------------------------- /petshop-be/domain/src/main/java/com/turkninja/petshop/enums/PersistableEnum.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.enums; 2 | 3 | public interface PersistableEnum { 4 | T getCode(); 5 | } -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/reducers/rootReducer.js: -------------------------------------------------------------------------------- 1 | import {combineReducers} from "redux"; 2 | import loginReducer from "./loginReducer"; 3 | 4 | export default combineReducers({ 5 | loginReducer 6 | }); 7 | -------------------------------------------------------------------------------- /petshop-mobile/app/api/auth.js: -------------------------------------------------------------------------------- 1 | import client from "./client"; 2 | 3 | const login = (email, password) => client.post("/v1/auth/login", { email, password }); 4 | 5 | export default { 6 | login, 7 | }; 8 | -------------------------------------------------------------------------------- /petshop-mobile/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .expo/ 3 | .idea/ 4 | npm-debug.* 5 | *.jks 6 | *.p8 7 | *.p12 8 | *.key 9 | *.mobileprovision 10 | *.orig.* 11 | web-build/ 12 | 13 | # macOS 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /petshop-mobile/app/utility/logger.js: -------------------------------------------------------------------------------- 1 | import Bugsnag from "@bugsnag/expo"; 2 | 3 | const log = (error) => Bugsnag.notify(error); 4 | 5 | const start = () => Bugsnag.start(); 6 | 7 | export default { log, start }; 8 | -------------------------------------------------------------------------------- /petshop-mobile/app/api/expoPushTokens.js: -------------------------------------------------------------------------------- 1 | import client from "./client"; 2 | 3 | const register = (pushToken) => 4 | client.post("/expoPushTokens", { token: pushToken }); 5 | 6 | export default { 7 | register, 8 | }; 9 | -------------------------------------------------------------------------------- /petshop-mobile/app/navigation/routes.js: -------------------------------------------------------------------------------- 1 | export default Object.freeze({ 2 | LISTING_DETAILS: "ListingDetails", 3 | LISTING_EDIT: "ListingEdit", 4 | LOGIN: "Login", 5 | MESSAGES: "Messages", 6 | REGISTER: "Register", 7 | }); 8 | -------------------------------------------------------------------------------- /petshop-mobile/app/components/lists/index.js: -------------------------------------------------------------------------------- 1 | export { default as ListItem } from "./ListItem"; 2 | export { default as ListItemDeleteAction } from "./ListItemDeleteAction"; 3 | export { default as ListItemSeparator } from "./ListItemSeparator"; 4 | -------------------------------------------------------------------------------- /petshop-mobile/app/api/messages.js: -------------------------------------------------------------------------------- 1 | import client from "./client"; 2 | 3 | const send = (message, listingId) => 4 | client.post("/messages", { 5 | message, 6 | listingId, 7 | }); 8 | 9 | export default { 10 | send, 11 | }; 12 | -------------------------------------------------------------------------------- /petshop-mobile/app/config/colors.js: -------------------------------------------------------------------------------- 1 | export default { 2 | primary: "#FABC3C", 3 | secondary: "#FF773D", 4 | black: "#000", 5 | white: "#fff", 6 | medium: "#6e6969", 7 | light: "#f8f4f4", 8 | dark: "#0c0c0c", 9 | danger: "#ff5252", 10 | }; 11 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/containers/product/catgeory/modals/CategoryModal.css: -------------------------------------------------------------------------------- 1 | img { 2 | max-width: 100%; 3 | height: auto; 4 | } 5 | 6 | .productImageItem { 7 | width: 120px; 8 | min-height: 120px; 9 | height: auto; 10 | padding: 3px; 11 | } -------------------------------------------------------------------------------- /petshop-admin-panel/src/subroutes/appSubRoutes.js: -------------------------------------------------------------------------------- 1 | import UserProfile from "../containers/user/UserProfile"; 2 | import Home from "../containers/home/Home"; 3 | 4 | export const appSubRoutes = { 5 | "product-category": UserProfile, 6 | "main-page": Home 7 | }; 8 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/containers/product/product/modals/AddProductModal.css: -------------------------------------------------------------------------------- 1 | img { 2 | max-width: 100%; 3 | height: auto; 4 | } 5 | 6 | .productImageItem { 7 | width: 120px; 8 | min-height: 120px; 9 | height: auto; 10 | padding: 3px; 11 | } -------------------------------------------------------------------------------- /petshop-be/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /petshop-be/domain/src/main/java/com/turkninja/petshop/api/response/answer/CreateAnswerResponse.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.api.response.answer; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CreateAnswerResponse { 7 | public String explanation; 8 | } 9 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /petshop-be/domain/src/main/java/com/turkninja/petshop/api/request/question/CreateQuestionRequest.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.api.request.question; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CreateQuestionRequest { 7 | private String explanation; 8 | } 9 | -------------------------------------------------------------------------------- /petshop-mobile/app/navigation/rootNavigation.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const navigationRef = React.createRef(); 4 | 5 | const navigate = (name, params) => 6 | navigationRef.current?.navigate(name, params); 7 | 8 | export default { 9 | navigate, 10 | }; 11 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /petshop-be/core/src/main/java/com/turkninja/petshop/constants/ParameterConstants.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.constants; 2 | 3 | public class ParameterConstants { 4 | 5 | private ParameterConstants(){ 6 | 7 | } 8 | public static final String USER_NAME = "userName"; 9 | } 10 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /petshop-mobile/app/config/styles.js: -------------------------------------------------------------------------------- 1 | import { Platform } from "react-native"; 2 | 3 | import colors from "./colors"; 4 | 5 | export default { 6 | colors, 7 | text: { 8 | color: colors.dark, 9 | fontSize: 18, 10 | fontFamily: Platform.OS === "android" ? "Roboto" : "Avenir", 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /petshop-be/domain/src/main/java/com/turkninja/petshop/api/request/answer/CreateAnswerRequest.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.api.request.answer; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CreateAnswerRequest { 7 | public Long questionId; 8 | private String explanation; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /petshop-mobile/app/components/forms/index.js: -------------------------------------------------------------------------------- 1 | export { default as Form } from "./Form"; 2 | export { default as FormField } from "./FormField"; 3 | export { default as FormPicker } from "./FormPicker"; 4 | export { default as ErrorMessage } from "./ErrorMessage"; 5 | export { default as SubmitButton } from "./SubmitButton"; 6 | -------------------------------------------------------------------------------- /petshop-be/repository/src/main/java/com/turkninja/petshop/SalesRepository.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop; 2 | 3 | import com.turkninja.petshop.entity.sales.SalesEntity; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface SalesRepository extends JpaRepository { 7 | } -------------------------------------------------------------------------------- /petshop-be/domain/src/main/java/com/turkninja/petshop/api/response/user/UserLoginResponse.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.api.response.user; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class UserLoginResponse { 7 | private String token; 8 | private String refreshToken; 9 | private String tokenType; 10 | } 11 | -------------------------------------------------------------------------------- /petshop-be/domain/src/main/java/com/turkninja/petshop/value/Image.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.value; 2 | 3 | import lombok.Data; 4 | import lombok.ToString; 5 | 6 | import javax.persistence.Column; 7 | 8 | @Data 9 | @ToString 10 | public class Image { 11 | 12 | @Column(name = "image_url") 13 | private String imageUrl; 14 | } 15 | -------------------------------------------------------------------------------- /petshop-be/repository/src/main/java/com/turkninja/petshop/UserRoleRepository.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop; 2 | 3 | import com.turkninja.petshop.base.ExtendedQueryDslJpaRepository; 4 | import com.turkninja.petshop.entity.user.UserRoleEntity; 5 | 6 | public interface UserRoleRepository extends ExtendedQueryDslJpaRepository { 7 | } 8 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/containers/home/Home.js: -------------------------------------------------------------------------------- 1 | import Container from "@material-ui/core/Container"; 2 | import React from "react"; 3 | 4 | 5 | const Home = props => { 6 | 7 | return ( 8 | 9 |

Ana Sayfa

10 |
11 | ); 12 | 13 | } 14 | 15 | export default Home; -------------------------------------------------------------------------------- /petshop-be/service/src/main/java/com/turkninja/petshop/sales/SalesService.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.sales; 2 | 3 | import com.turkninja.petshop.api.request.sales.SalesCreateRequest; 4 | import com.turkninja.petshop.api.response.sales.SalesGetResponse; 5 | 6 | public interface SalesService { 7 | SalesGetResponse create(SalesCreateRequest request); 8 | } 9 | -------------------------------------------------------------------------------- /petshop-be/domain/src/main/java/com/turkninja/petshop/api/response/product/GetProductImageResponse.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.api.response.product; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @author ali turgut bozkurt 7 | * Created at 7/12/2021 8 | */ 9 | 10 | @Data 11 | public class GetProductImageResponse { 12 | private String url; 13 | } 14 | -------------------------------------------------------------------------------- /petshop-be/domain/src/main/java/com/turkninja/petshop/api/response/answer/GetAllAnswerResponse.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.api.response.answer; 2 | 3 | import com.turkninja.petshop.entity.user.UserEntity; 4 | 5 | public class GetAllAnswerResponse { 6 | private String explanation; 7 | private long questionId; 8 | private UserEntity user; 9 | } 10 | -------------------------------------------------------------------------------- /petshop-be/repository/src/main/java/com/turkninja/petshop/ProductImageRepository.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop; 2 | 3 | import com.turkninja.petshop.base.ExtendedQueryDslJpaRepository; 4 | import com.turkninja.petshop.entity.product.ProductImageEntity; 5 | 6 | public interface ProductImageRepository extends ExtendedQueryDslJpaRepository { 7 | } 8 | -------------------------------------------------------------------------------- /petshop-mobile/app/navigation/navigationTheme.js: -------------------------------------------------------------------------------- 1 | import { DefaultTheme } from "@react-navigation/native"; 2 | import colors from "../config/colors"; 3 | 4 | export default { 5 | ...DefaultTheme, 6 | textTransform:'capitalize', 7 | colors: { 8 | ...DefaultTheme.colors, 9 | primary: colors.primary, 10 | background: colors.white, 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /petshop-mobile/app/components/forms/SubmitButton.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useFormikContext } from "formik"; 3 | 4 | import Button from "../Button"; 5 | 6 | function SubmitButton({ title }) { 7 | const { handleSubmit } = useFormikContext(); 8 | 9 | return 43 | 46 | 47 | ) 48 | } -------------------------------------------------------------------------------- /petshop-admin-panel/build/static/css/main.e84d05ea.chunk.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack://src/index.css","webpack://src/App.css","webpack://src/containers/product/product/AddProductModal.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,yEAEF,CCZA,KACE,iBACF,CAEA,UACE,aAAc,CACd,mBACF,CAEA,8CACE,UACE,2CACF,CACF,CAEA,YACE,gBAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,4BAA6B,CAC7B,UACF,CAEA,UACE,aACF,CAEA,OACE,SACF,CAEA,yBACE,GACE,sBACF,CACA,GACE,uBACF,CACF,CCxCA,IACI,cAAe,CACf,WACJ,CAEA,kBACI,WAAY,CACZ,gBAAiB,CACjB,WAAY,CACZ,WACJ","file":"main.e84d05ea.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n",".App {\n text-align: center;\n}\n\n.App-logo {\n height: 40vmin;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .App-logo {\n animation: App-logo-spin infinite 20s linear;\n }\n}\n\n.App-header {\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n}\n\n.App-link {\n color: #61dafb;\n}\n\n.error {\n color : red;\n}\n\n@keyframes App-logo-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n","img {\n max-width: 100%;\n height: auto;\n}\n\n.productImageItem {\n width: 120px;\n min-height: 120px;\n height: auto;\n padding: 3px;\n}"]} -------------------------------------------------------------------------------- /petshop-admin-panel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "benibul-web-client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^4.11.3", 7 | "@material-ui/data-grid": "^4.0.0-alpha.35", 8 | "@material-ui/icons": "^4.11.2", 9 | "@material-ui/lab": "^4.0.0-alpha.60", 10 | "@testing-library/jest-dom": "^5.11.9", 11 | "@testing-library/react": "^11.2.5", 12 | "@testing-library/user-event": "^12.6.3", 13 | "axios": "^0.21.1", 14 | "cors": "^2.8.5", 15 | "history": "^5.0.0", 16 | "jwt-decode": "^3.1.2", 17 | "react": "^17.0.1", 18 | "react-dom": "^17.0.1", 19 | "react-promise-tracker": "^2.1.0", 20 | "react-redux": "^7.2.2", 21 | "react-router": "^5.2.0", 22 | "react-router-dom": "^5.2.0", 23 | "react-scripts": "4.0.2", 24 | "redux": "^4.0.5", 25 | "redux-saga": "^1.1.3", 26 | "redux-thunk": "^2.3.0", 27 | "web-vitals": "^1.1.0" 28 | }, 29 | "scripts": { 30 | "start": "react-scripts start", 31 | "build": "react-scripts build", 32 | "test": "react-scripts test", 33 | "eject": "react-scripts eject", 34 | "env:staging": "node scripts/set-environment.js staging", 35 | "env:dev": "node scripts/set-environment.js development", 36 | "env:prod": "node scripts/set-environment.js production" 37 | }, 38 | "eslintConfig": { 39 | "extends": [ 40 | "react-app", 41 | "react-app/jest" 42 | ] 43 | }, 44 | "browserslist": { 45 | "production": [ 46 | ">0.2%", 47 | "not dead", 48 | "not op_mini all" 49 | ], 50 | "development": [ 51 | "last 1 chrome version", 52 | "last 1 firefox version", 53 | "last 1 safari version" 54 | ] 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /petshop-admin-panel/build/static/js/2.466e3856.chunk.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /* 2 | object-assign 3 | (c) Sindre Sorhus 4 | @license MIT 5 | */ 6 | 7 | /** 8 | * A better abstraction over CSS. 9 | * 10 | * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present 11 | * @website https://github.com/cssinjs/jss 12 | * @license MIT 13 | */ 14 | 15 | /** @license React v0.20.1 16 | * scheduler.production.min.js 17 | * 18 | * Copyright (c) Facebook, Inc. and its affiliates. 19 | * 20 | * This source code is licensed under the MIT license found in the 21 | * LICENSE file in the root directory of this source tree. 22 | */ 23 | 24 | /** @license React v16.13.1 25 | * react-is.production.min.js 26 | * 27 | * Copyright (c) Facebook, Inc. and its affiliates. 28 | * 29 | * This source code is licensed under the MIT license found in the 30 | * LICENSE file in the root directory of this source tree. 31 | */ 32 | 33 | /** @license React v17.0.1 34 | * react-dom.production.min.js 35 | * 36 | * Copyright (c) Facebook, Inc. and its affiliates. 37 | * 38 | * This source code is licensed under the MIT license found in the 39 | * LICENSE file in the root directory of this source tree. 40 | */ 41 | 42 | /** @license React v17.0.1 43 | * react-jsx-runtime.production.min.js 44 | * 45 | * Copyright (c) Facebook, Inc. and its affiliates. 46 | * 47 | * This source code is licensed under the MIT license found in the 48 | * LICENSE file in the root directory of this source tree. 49 | */ 50 | 51 | /** @license React v17.0.1 52 | * react.production.min.js 53 | * 54 | * Copyright (c) Facebook, Inc. and its affiliates. 55 | * 56 | * This source code is licensed under the MIT license found in the 57 | * LICENSE file in the root directory of this source tree. 58 | */ 59 | -------------------------------------------------------------------------------- /petshop-admin-panel/src/containers/parameter/ParameterService.js: -------------------------------------------------------------------------------- 1 | import request from "../../common/request"; 2 | 3 | export const getParameterById = (parameterId)=>{ 4 | const requestData= { 5 | method: "GET", 6 | path: "/api/v1/parameter/get-parameter-by-id", 7 | params: ["parameterId"], 8 | values: [parameterId] 9 | } 10 | return request(requestData) 11 | } 12 | 13 | export const createParameter = (key,value) =>{ 14 | const requestData= { 15 | method: "GET", 16 | path: "/api/v1/parameter/create-parameter", 17 | params: ["key","value"], 18 | values: [key,value] 19 | } 20 | return request(requestData) 21 | } 22 | 23 | export const updateParameter = (id,key,value,type) =>{ 24 | var data = { 25 | id:id, 26 | key:key, 27 | value:value, 28 | type: type 29 | } 30 | const requestData= { 31 | method: "PUT", 32 | path: "/api/v1/parameter/update-parameter", 33 | data: data, 34 | } 35 | return request(requestData) 36 | } 37 | 38 | export const getAllParameters = (page,size) =>{ 39 | 40 | const requestData= { 41 | method: "GET", 42 | path: "/api/v1/parameter/get-all-parameters", 43 | params: ["page","size"], 44 | values: [page,size] 45 | } 46 | return request(requestData) 47 | } 48 | 49 | export const updateImage= data => { 50 | const formData = new FormData(); 51 | formData.append('file', data); 52 | 53 | const updateImageRequest = { 54 | method: "POST", 55 | path: "/api/v1/file", 56 | data: formData, 57 | params: ["firebasePath"], 58 | values: ["category-images"] 59 | } 60 | return request(updateImageRequest); 61 | } -------------------------------------------------------------------------------- /petshop-admin-panel/src/containers/user/UserService.js: -------------------------------------------------------------------------------- 1 | import request from "../../common/request"; 2 | 3 | /** 4 | * Retrieves paged list of users. 5 | * @param page Page number. 6 | * @param size Page size. 7 | * @returns {Promise<* | void>} Http status code returned from the server. 8 | */ 9 | export const pageUsers = (page, size) => { 10 | let options = { 11 | method: "GET", 12 | path: "/api/v1/users", 13 | params: ["page", "size"], 14 | values: [page, size], 15 | } 16 | 17 | return request(options); 18 | } 19 | 20 | /** 21 | * Retrieves user data from API. 22 | * @param userId Id of the user. 23 | * @returns {Promise<* | void>} User data as JSON. 24 | */ 25 | export const getUserById = (userId) => { 26 | let options = { 27 | method: "GET", 28 | path: "/api/v1/users/" + userId, 29 | } 30 | 31 | return request(options); 32 | } 33 | 34 | /** 35 | * Requests a user status change from API. 36 | * @param id Id of the user. 37 | * @returns {Promise<* | void>} Http status code returned from API. 38 | */ 39 | export const deleteUserById = (id) => { 40 | let options = { 41 | method: "DELETE", 42 | path: "/api/v1/users/" + id, 43 | } 44 | 45 | return request(options) 46 | } 47 | 48 | /** 49 | * Sends a user image addition request to API. 50 | * @param data Image data. 51 | * @returns {Promise<* | void>} Http status code returned from API. 52 | */ 53 | export const addUserImage= data => { 54 | const formData = new FormData(); 55 | formData.append('file', data); 56 | 57 | const addUserImageRequest = { 58 | method: "POST", 59 | path: "/api/v1/file", 60 | data: formData, 61 | params: ["firebasePath"], 62 | values: ["product-images"] 63 | } 64 | return request(addUserImageRequest); 65 | } -------------------------------------------------------------------------------- /petshop-be/domain/src/main/java/com/turkninja/petshop/validation/product/ProductCategoryValidator.java: -------------------------------------------------------------------------------- 1 | package com.turkninja.petshop.validation.product; 2 | 3 | import com.turkninja.petshop.api.request.product.UpsertCategoryRequest; 4 | import com.turkninja.petshop.api.request.product.UpsertProductRequest; 5 | import com.turkninja.petshop.validation.util.ValidationUtil; 6 | import org.springframework.stereotype.Component; 7 | import org.springframework.validation.Errors; 8 | import org.springframework.validation.Validator; 9 | 10 | /** 11 | * @author ali turgut bozkurt 12 | * Created at 9/5/2021 13 | */ 14 | 15 | @Component 16 | public class ProductCategoryValidator implements Validator { 17 | @Override 18 | public boolean supports(Class clazz) { 19 | return UpsertProductRequest.class.equals(clazz); 20 | } 21 | 22 | @Override 23 | public void validate(Object target, Errors errors) { 24 | UpsertCategoryRequest request = (UpsertCategoryRequest) target; 25 | validateName(request.getName(), errors); 26 | validatePhotoUrl(request.getPhotoUrl(), errors); 27 | valdidateDepth(request.getDepth(), errors); 28 | } 29 | 30 | private void validatePhotoUrl(String photoUrl, Errors errors) { 31 | if (ValidationUtil.isEmptyOrNull(photoUrl)) { 32 | errors.rejectValue("photoUrl", null, "Foto alanı boş olamaz"); 33 | } 34 | } 35 | 36 | private void validateName(String name, Errors errors) { 37 | if (ValidationUtil.isEmptyOrNull(name)) { 38 | errors.rejectValue("name", null, "İsim alanı boş olamaz"); 39 | } 40 | } 41 | 42 | private void valdidateDepth(int depth, Errors errors) { 43 | if (depth < 0) { 44 | errors.rejectValue("depth", null, "Derinlik sıfırdan küçük olamaz"); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /petshop-mobile/app/screens/WelcomeScreen.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import {ImageBackground, StyleSheet, View, Image, Text} from "react-native"; 3 | 4 | import Button from "../components/Button"; 5 | import routes from "../navigation/routes"; 6 | 7 | function WelcomeScreen({navigation}) { 8 | return ( 9 | 12 | 13 | 14 | Evcil hayvanlarınız için aradığınız herşey burada. 15 | 16 | 17 |