Skip to content

Commit a1b6fc2

Browse files
added new web to this mono repo
1 parent 27c5b76 commit a1b6fc2

File tree

974 files changed

+52075
-54522
lines changed

Some content is hidden

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

974 files changed

+52075
-54522
lines changed

enatega-multivendor-web/.env.dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NEXT_PUBLIC_SERVER_URL="https://v1-api-enatega-multivendor-develop.up.railway.app/"
2+
NEXT_PUBLIC_WS_SERVER_URL="wss://v1-api-enatega-multivendor-develop.up.railway.app/"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NEXT_PUBLIC_SERVER_URL="http://localhost:8001/"
2+
NEXT_PUBLIC_WS_SERVER_URL="ws://localhost:8001/"

enatega-multivendor-web/.env.prod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NEXT_PUBLIC_SERVER_URL="https://enatega-multivendor.up.railway.app/"
2+
NEXT_PUBLIC_WS_SERVER_URL="wss://enatega-multivendor.up.railway.app/"

enatega-multivendor-web/.env.stage

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NEXT_PUBLIC_SERVER_URL="https://v1-api-enatega-multivendor-stage.up.railway.app/"
2+
NEXT_PUBLIC_WS_SERVER_URL="wss://v1-api-enatega-multivendor-stage.up.railway.app/"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"extends": ["next", "next/core-web-vitals", "eslint:recommended"],
3+
"globals": {
4+
"window": "readonly",
5+
"cy": "readonly",
6+
"it": "readonly",
7+
"React": "readonly",
8+
"google": "readonly",
9+
"GeolocationPosition": "readonly",
10+
"GeolocationPositionError": "readonly"
11+
},
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"ecmaVersion": 2023,
15+
"sourceType": "module",
16+
"ecmaFeatures": {
17+
"jsx": true,
18+
"tsx": true
19+
}
20+
},
21+
"plugins": [
22+
"@typescript-eslint",
23+
"prettier",
24+
"unused-imports" // Added plugin for unused imports
25+
],
26+
"rules": {
27+
// Allow .tsx and .jsx extensions for JSX files
28+
"react/jsx-filename-extension": [1, { "extensions": [".tsx", ".jsx"] }],
29+
30+
"max-lines": [
31+
"warn",
32+
{ "max": 550, "skipBlankLines": true, "skipComments": true }
33+
],
34+
35+
// Remove unused variables
36+
"@typescript-eslint/no-unused-vars": [
37+
"error",
38+
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }
39+
],
40+
41+
// Remove unused imports automatically
42+
"unused-imports/no-unused-imports": "error",
43+
44+
// Remove unused variables but allow unused arguments prefixed with _
45+
"unused-imports/no-unused-vars": [
46+
"warn",
47+
{
48+
"vars": "all",
49+
"varsIgnorePattern": "^_",
50+
"args": "after-used",
51+
"argsIgnorePattern": "^_"
52+
}
53+
],
54+
55+
// Prettier-related rules
56+
// "prettier/prettier": ["error", {}, { "usePrettierrc": true }],
57+
58+
"@typescript-eslint/explicit-function-return-type": "off",
59+
"@typescript-eslint/no-explicit-any": "off",
60+
"react-hooks/exhaustive-deps": "off"
61+
},
62+
"settings": {
63+
"import/resolver": {
64+
"typescript": {}
65+
}
66+
}
67+
}

enatega-multivendor-web/.gitignore

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,41 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
14
/node_modules
2-
node_modules/
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
.vscode
9+
# testing
10+
/coverage
11+
12+
.env
13+
14+
# next.js
15+
/.next/
16+
/out/
17+
18+
# production
19+
/build
20+
21+
# misc
22+
.DS_Store
23+
*.pem
24+
25+
# debug
26+
npm-debug.log*
27+
yarn-debug.log*
28+
yarn-error.log*
29+
30+
# local env files
31+
.env*.local
32+
33+
# vercel
34+
.vercel
35+
36+
# typescript
37+
*.tsbuildinfo
38+
next-env.d.ts
39+
40+
*storybook.log
41+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Changelog
2+
3+
## 10.1.0
4+
5+
- Update to PrimeReact 10.2.1
6+
7+
## 10.0.0
8+
9+
- Upgrade to Next 13.4.8
10+
- Migrate to Next App Roter
11+
- Migrate to PrimeReactContext
12+
- Update to PrimeReact 9.6.2
13+
- Update other dependencies
14+
15+
## 9.1.2
16+
17+
- Refactored project files
18+
19+
## 9.1.1
20+
21+
- Fixed hydration warnings
22+
23+
## 9.1.0
24+
25+
- Add typescript support
26+
27+
## 9.0.0
28+
29+
- Upgrade PrimeReact to v9
30+
- Upgrade to PrimeReact 9.2.2
31+
- Upgrade to PrimeFlex 3.3.0
32+
- Upgrade to Next 13.2.3
33+
- Update other dependencies
34+
35+
## 8.1.0
36+
37+
- Migrate CRA to NextJS

enatega-multivendor-web/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Creative Tim
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.

enatega-multivendor-web/README.md

Lines changed: 164 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,164 @@
1-
# This is used for only deployment purposed to see the main code use this link https://github.com/Ninjas-Code-official/Marketplace-Food-Delivery-Solution
1+
# Restaurant Delivery Management System
2+
3+
This project is a Restaurant Delivery Management System built with modern web technologies.
4+
5+
## Technologies Used
6+
7+
- **Next.js 14**
8+
- **TypeScript**
9+
- **UI Libraries**: Next UI, Chakra UI, or Prime React
10+
- **React Icons** (if required)
11+
- **Tailwind CSS**
12+
- **Cypress** for:
13+
- Component Testing
14+
- Integration Testing
15+
- E2E Testing
16+
17+
## Build Size and Performance
18+
19+
- **Page Size**: Must be between 150KB.
20+
- **Critical JS and CSS**: Must be below 100KB.
21+
- **Bundle Analysis**: Use `webpack-bundle-analyzer` as a dev dependency to analyze the bundle.
22+
- **Dynamic Imports**: Use dynamic imports in Next.js.
23+
- **Image Optimization**: Use the `<Image/>` tag of Next.js.
24+
25+
### Performance Metrics
26+
27+
The app must follow the standard render times as follows:
28+
29+
- **First Contentful Paint (FCP)**: Under 1.8 seconds
30+
- **Largest Contentful Paint (LCP)**: Under 2.5 seconds
31+
- **First Input Delay (FID)**: Under 100 milliseconds
32+
- **Time to Interactive (TTI)**: Under 5 seconds
33+
- **Total Blocking Time (TBT)**: Under 300 milliseconds
34+
- **Cumulative Layout Shift (CLS)**: Under 0.1
35+
- **Speed Index (SI)**: Under 4.3 seconds
36+
- **Time to First Byte (TTFB)**: Under 600 milliseconds
37+
- **First Meaningful Paint (FMP)**: Under 2.5 seconds
38+
39+
Use the browser's Lighthouse tool for performance reports.
40+
41+
## Folder Structure
42+
43+
### `app` Folder
44+
45+
- Contains only routes and layouts.
46+
47+
### `cypress` Folder
48+
49+
- Contains only test cases
50+
51+
### `lib` Folder
52+
53+
- **hooks Folder**: Custom hooks (e.g., `useAuth`, `useConfiguration`).
54+
- **hoc Folder**: Higher-order components (e.g., `Route Protection HOC`, `Data Refresh HOC`).
55+
- **services Folder**: Services for different flows, third-party API calls (e.g. `Apollo`, `Geolocation API`).
56+
- create separate sub-folders.
57+
- **ui Folder**: Reusable components, layouts, and screens.
58+
- **utils Folder**:
59+
- **methods Folder**: Utility methods (e.g. string manipulation).
60+
- **interfaces Folder**: TypeScript interfaces (prefixed with "I").
61+
- **constants Folder**: Common constants (strings, headers).
62+
- **types Folder**: Custom TypeScript types, if necessary.
63+
64+
## Component Guidelines
65+
66+
- Divide complex components into sub-components (e.g., header, body, footer).
67+
- Recommended code lines per component: `100-200 lines`.
68+
69+
## Changelog
70+
71+
- Log code changes in the `CHANGELOG.md` file.
72+
- Only log merges/pushes to develop/staging/production branches.
73+
74+
---
75+
76+
```plaintext
77+
78+
├── .husky
79+
│ └── git hooks
80+
├── .vscode
81+
│ └── IDE configuration
82+
├── dist
83+
│ └── built and minifed app.
84+
├── .npmrc
85+
│ └── npm configuration
86+
├── .nvmrc
87+
│ └── nvm configuration
88+
├── cypress.config.ts
89+
│ └── cypress configuration
90+
├── app
91+
│ └── routes
92+
│ └── layouts
93+
├── lib
94+
│ ├── hooks
95+
│ │ ├── useAuth.ts
96+
│ │ ├── useConfiguration.ts
97+
│ │ └── index.ts
98+
│ ├── hoc
99+
│ │ ├── withRouteProtection.ts
100+
│ │ └── withDataRefresh.ts
101+
│ │
102+
│ ├── services
103+
│ │ ├── support
104+
│ │ │ ├── support.service.ts
105+
│ │ │ └── index.ts
106+
│ │ └── index.ts
107+
│ ├── ui
108+
│ │ ├── components
109+
│ │ ├── layouts
110+
│ │ └── screens
111+
| ├── utils
112+
| │ ├── methods
113+
| | | | ├── string
114+
| │ │ | | ├── sort.ts
115+
| │ │ | | ├── toSentenceCase.ts
116+
| │ │ | | ├── index.ts
117+
| | | | ├── regex
118+
| │ │ | | ├── email.ts
119+
| │ │ | | ├── password.ts
120+
| │ │ | | ├── url.ts
121+
| │ │ | | ├── index.ts
122+
| | | | └── index. ts
123+
| │ ├── interfaces
124+
| │ │ ├── common
125+
| │ │ │ ├── IParent.ts
126+
| │ │ │ └── index.ts
127+
| │ │ ├── support.interface (sub-folders if required and index.ts for each)
128+
| │ │ └── index.ts
129+
| │ ├── constants
130+
| │ │ ├── strings
131+
| │ │ │ ├── global.strings.ts
132+
| │ │ │ └── support.strings (sub-folders if required and index.ts for each)
133+
| | | | └── index.ts (export all above)
134+
| │ │ ├── headers
135+
| │ │ │ ├── global.headers.ts
136+
| │ │ │ └── support.headers (sub-folders if required and index.ts for each)
137+
| | | | └── index.ts (export all above)
138+
| │ │ └── index.ts
139+
| │ ├── types (same as interfaces)
140+
| │ │ └── index.ts
141+
├── CHANGELOG.md
142+
├── tsconfig.json
143+
├── next.config.js
144+
├── package.json
145+
└── README.md
146+
```
147+
148+
### Git
149+
150+
- **Commit Predefined Types**:
151+
- build
152+
- fix
153+
- refactor
154+
- revert
155+
- style
156+
- test
157+
- translation
158+
- security
159+
- changeset
160+
- config
161+
162+
### Note
163+
164+
- Under constant modifications.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"use client";
2+
3+
import { CuisineSelection } from '@/lib/ui/screens/protected/home';
4+
import React from 'react'
5+
6+
function page() {
7+
return <CuisineSelection />
8+
}
9+
10+
export default page

0 commit comments

Comments
 (0)