Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production #73

Open
wants to merge 97 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
30014e3
champs-ec-fe initial project setup
emmanueltct May 23, 2024
6a0b3d0
Merge pull request #1 from atlp-rwanda/champs-ec-fe-setup
Eli250 May 23, 2024
1a4f454
Configure project tailwindcss
sabatohura May 23, 2024
9e8b628
chore(ESLint & precommit setup):setting up ESLint & precommit
k3lly003 May 23, 2024
7141295
Merge pull request #3 from atlp-rwanda/ch-eslintHound-#187300187
Eli250 May 24, 2024
b5c97e2
Merge pull request #2 from atlp-rwanda/ch-tailwindcss-configuration
Eli250 May 26, 2024
154b66a
ch(redux): Configuring react redux
amiparadis250 May 26, 2024
caa5dee
Merge pull request #6 from atlp-rwanda/ch-setup-redux-#187300180
Eli250 May 28, 2024
ea686d5
Merge pull request #6 from atlp-rwanda/ch-setup-redux-#187300180
Eli250 May 28, 2024
bfd8ebf
Merge pull request #4 from atlp-rwanda/ch-storybook-configuration-#18…
Eli250 May 28, 2024
92d22b6
feat(login)-userlogin
kayigmb May 27, 2024
676b2bd
Merge pull request #7 from atlp-rwanda/ft-login-#187300192
Eli250 May 28, 2024
3e72d4b
Feat(sign up): User must be able to Register to the website
tchamianest May 27, 2024
128766e
Merge pull request #5 from atlp-rwanda/ft-signup-#187300190
Eli250 May 29, 2024
190ad39
feat(login)-userlogin
kayigmb May 27, 2024
c36efdf
ft(test-setup)
kanu-cast May 28, 2024
86fec35
feat(auto-tests-setup)
kanu-cast May 28, 2024
5c11707
Merge pull request #10 from atlp-rwanda/ft-tests-setup
Eli250 May 30, 2024
addab99
ft(setting up ci tools)
kanu-cast May 28, 2024
6bfe421
Merge pull request #11 from atlp-rwanda/ft-tests-setup
Eli250 May 31, 2024
bd30256
ch(deployment):add deployment git action
RwigimbaP-dev Jun 2, 2024
6159696
bg(login)-addingtests
kayigmb Jun 2, 2024
21b5a4f
Merge pull request #15 from atlp-rwanda/ch-Setup-deployment-187300181
Eli250 Jun 3, 2024
06dc412
Merge pull request #14 from atlp-rwanda/bg-login
Eli250 Jun 3, 2024
61489c3
bgfix(signup):Test for signup page
tchamianest Jun 2, 2024
c3ce05a
Merge pull request #16 from atlp-rwanda/bg-signupTest
Eli250 Jun 4, 2024
66fa32e
feat(Two Factor Authentication):Seller authentication and OTP verific…
emmanueltct Jun 3, 2024
b633aa5
Merge pull request #22 from atlp-rwanda/ft-twofactorauthentication-#1…
Eli250 Jun 6, 2024
97486c0
feat(UpdatePassword):User is able to update password
tchamianest Jun 5, 2024
25aa08a
Merge pull request #20 from atlp-rwanda/ft-updatepassword-#187300195
Eli250 Jun 7, 2024
a4d3b24
feat(google-login):Integrate google login authentication
tchamianest Jun 5, 2024
5847b51
Merge pull request #19 from atlp-rwanda/ft-google-authentication
Eli250 Jun 7, 2024
c810569
bug(two-factor-authentication): bug fix for two factor authentication…
emmanueltct Jun 11, 2024
c11629c
Merge pull request #24 from atlp-rwanda/bg-two-factor-authentication
Eli250 Jun 11, 2024
46a16c9
feat(admin)-assigningroles
kayigmb Jun 3, 2024
390005d
Merge pull request #18 from atlp-rwanda/ft-adminroles-#187300201
Jun 13, 2024
7e6bc17
feat(password Reset):Users should be presented with reset password link
janet-barbie Jun 7, 2024
9ec1999
Merge pull request #23 from atlp-rwanda/ft-reset-password-#187300193
Eli250 Jun 13, 2024
0516065
feat: Enable sellers to create products from dashboard
amiparadis250 Jun 4, 2024
a2f2216
Merge pull request #21 from atlp-rwanda/ft-sellerShouldCreateProduc
Jun 18, 2024
b03a63d
feat(admin)-disable-users
kayigmb Jun 3, 2024
4fcea50
Merge pull request #26 from atlp-rwanda/ft-disable-users-#187300202
Eli250 Jun 18, 2024
dee1cab
Merge pull request #26 from atlp-rwanda/ft-disable-users-#187300202
Eli250 Jun 18, 2024
e1eb67e
Merge pull request #13 from atlp-rwanda/ft-userViewProducts-#187300196
Eli250 Jun 20, 2024
bae54f8
Feat(Landing-Page):implements the landing page for the E-champs
tchamianest Jun 11, 2024
58ce9a4
Merge pull request #25 from atlp-rwanda/ft-landingpage-#187765783
Eli250 Jun 20, 2024
4786166
ft/axios-interceptor
kayigmb Jun 20, 2024
908cc48
Merge pull request #36 from atlp-rwanda/ft/axiosinterceptor
Eli250 Jun 21, 2024
47d12f9
feat(reviews):add-product-reviews
kayigmb Jun 3, 2024
569278c
Merge pull request #28 from atlp-rwanda/ft-review-products-#187300216
Eli250 Jun 23, 2024
e78f0ad
feat(cart management): add functionality for user cart mamangement
emmanueltct Jun 14, 2024
3b19d13
Merge pull request #27 from atlp-rwanda/ft-cart-management-#187300210
Eli250 Jun 25, 2024
12cbdd1
Bgfix(Navabar): The login user and user type the issue about Menu
tchamianest Jun 24, 2024
5e6047c
Merge pull request #40 from atlp-rwanda/bg-fix
Eli250 Jun 25, 2024
4cfa040
ft/logout
kayigmb Jun 29, 2024
c969f6d
Merge pull request #48 from atlp-rwanda/ft/logout
Eli250 Jul 2, 2024
57edf34
feat(seller products):update and delete
janet-barbie Jun 20, 2024
058eb0c
Merge pull request #37 from atlp-rwanda/ft-UpdateAndDeleteProduct-#18…
Eli250 Jul 2, 2024
2df8d70
feat(track-orders):add implementation of buyer track order status
emmanueltct Jul 1, 2024
10112f6
Merge pull request #49 from atlp-rwanda/ft-track-order-status
Eli250 Jul 2, 2024
a5a22a6
-Added user profile edit feature, allowing users to set up their prof…
Eli250 Jul 2, 2024
26436db
Merge pull request #45 from atlp-rwanda/ft_view_update_profile_#18730…
Eli250 Jul 3, 2024
099d9b1
Configure app notifications
sabatohura Jun 26, 2024
ec99bd2
Merge pull request #42 from atlp-rwanda/ft-app-notification
Eli250 Jul 5, 2024
37d651e
fix(profiles) #187300200 Users should be able to view and edit their …
amiparadis250 Jul 5, 2024
00af2dd
Merge pull request #52 from atlp-rwanda/bg-view-update-profile_#18730…
Eli250 Jul 8, 2024
681f220
feat:(payment):A buyer should be able to make a payment using Stripe API
janet-barbie Jul 4, 2024
7d8cb7c
Merge pull request #51 from atlp-rwanda/ft-payments-#187300215
Eli250 Jul 9, 2024
d3163af
Feat(Dashboard): The seller and admin dashboard
tchamianest Jun 27, 2024
09b247f
Merge pull request #46 from atlp-rwanda/ft-dashboard-#187854921
Eli250 Jul 9, 2024
0296fac
feat(feature)-improvsingleproductview-#187893630
kayigmb Jul 9, 2024
799850e
Merge pull request #53 from atlp-rwanda/ft/improveproductview
Eli250 Jul 10, 2024
362d51c
bgFix(dashboard): Change the dashboard Routes
tchamianest Jul 10, 2024
a15b771
feat(chatbot):add a chatbot for travellers interaction
k3lly003 Jul 1, 2024
79c0dc2
Merge pull request #57 from atlp-rwanda/bg-fix-dashboard
Eli250 Jul 10, 2024
f9a7b75
feat(chatbot):add a chatbot for travellers interaction
k3lly003 Jul 1, 2024
6a01ff2
Merge branch 'ft-chatboard-#187300205' of https://github.com/atlp-rwa…
k3lly003 Jul 10, 2024
3f4256f
Merge pull request #50 from atlp-rwanda/ft-chatboard-#187300205
Eli250 Jul 10, 2024
4438cf6
ft(docker):fe server should run in the docker
PrinceRWIGIMBA Jul 10, 2024
6f44a43
Merge pull request #59 from atlp-rwanda/ft-docker-#187854958
Eli250 Jul 11, 2024
3385687
fix(chat ui):fixed ui for the chat
k3lly003 Jul 11, 2024
f6cfec4
Merge pull request #61 from atlp-rwanda/bg-fix-ui
Eli250 Jul 11, 2024
c5f069b
bugFix(Navbar): correct the navabar and dashboard
tchamianest Jul 12, 2024
ca2b80b
Merge pull request #64 from atlp-rwanda/bg-fix-navbar
Eli250 Jul 12, 2024
10e60c8
bg-fix(search):A buyer should be able to search for products
PrinceRWIGIMBA Jun 26, 2024
cd5c6b8
Merge pull request #62 from atlp-rwanda/ft-search-#187300218
Eli250 Jul 12, 2024
be56e91
bug-fix(button-loading):add a loading state to clicked button
emmanueltct Jul 12, 2024
9b0434f
Merge pull request #65 from atlp-rwanda/bug-fix-loaders
Eli250 Jul 12, 2024
2030945
ft(wishlist):add-products-to-wishlist
kanu-cast Jun 29, 2024
a1ccefe
Merge pull request #47 from atlp-rwanda/ft-wishlist-#187300213
Eli250 Jul 13, 2024
bb1f10c
ft(wishlist):add-products-to-wishlist
kanu-cast Jun 29, 2024
8d1e55e
Merge pull request #66 from atlp-rwanda/ft-wishlist-#187300213
Eli250 Jul 16, 2024
45ed06e
ft(seller stats) seller should see statics on daily basis (#60)
amiparadis250 Jul 16, 2024
4c439e6
fix(reset password & payments):fixing reset & payment ui (#63)
janet-barbie Jul 16, 2024
0df2919
bg(bug)-fixproductview (#67)
kayigmb Jul 17, 2024
ab7cedb
-Ensures profile image is not uploaded again during every update (#69)
amiparadis250 Jul 17, 2024
57d1445
bugFix(allPage): Fix all remain bug into champs Bay (#72)
tchamianest Jul 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
version: 2
orbs:
coveralls: coveralls/[email protected]
jobs:
build:
docker:
- image: cimg/node:18.17.0
working_directory: ~/repo
steps:
- setup_remote_docker:
version: 20.10.7
- checkout
# Update npm
- run:
name: update-npm
command: "sudo npm install -g npm@latest"
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package-lock.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Install dependencies
command: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package-lock.json" }}
- run:
name: Create reports directory
command: mkdir -p ./reports/
- run:
name: Install Jest
command: npm install --save-dev jest
- run:
name: Install JUnit coverage reporter
command: npm install --dev jest-junit
- run:
name: Run tests with JUnit as reporter
command: |
npx jest --ci --runInBand --reporters=default --reporters=jest-junit --verbose
test_exit_code=$?
echo "Jest exit code: $test_exit_code"
if [ $test_exit_code -ne 0 ]; then
exit 0 # Ignore non-zero exit code for debugging
fi
environment:
JEST_JUNIT_OUTPUT_DIR: ./reports/
JEST_JUNIT_ADD_FILE_ATTRIBUTE: "true"
- store_test_results:
path: ./reports/
# Run coverage
- run:
name: Run coverage
command: npm run test || true
when: always
- run:
name: Upload coverage to Coveralls
command: npx coveralls < coverage/lcov.info
# Run coverage report for Code Climate
- run:
name: Setup Code Climate test-reporter
command: |
# download test reporter as a static binary
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
when: always
- run:
name: Make cc-test-reporter executable
command: chmod +x ./cc-test-reporter
- run:
name: Send coverage report to Code Climate
command: |
./cc-test-reporter after-build -t lcov
when: always
# Upload results
- store_artifacts: # upload test coverage as artifact
path: ./coverage/lcov.info
prefix: tests
- run:
name: Debugging step
command: |
echo "Exit status of previous command: $?"
cat ./reports/junit.xml || true
cat ./coverage/lcov.info || true
ls -la ./coverage
ls -la ./reports
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
URL= {Render_URL}/api
86 changes: 86 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"extends": [
"next/core-web-vitals",
"airbnb",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"plugin:@next/next/recommended",
"plugin:storybook/recommended",
"plugin:testing-library/react",
"plugin:jest-dom/recommended",
"prettier"
],
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest": true
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"react",
"jest",
"testing-library",
"jest-dom"
],
"rules": {
"one-var": 0,
"no_console": 0,
"camelcase": [
"error",
{
"properties": "always",
"allow": [
"_",
"HTTP_STATUS_CODE"
]
}
],
"@typescript-eslint/no-explicit-any": 0,
"one-var-declaration-per-line": 0,
"consistent-return": 0,
"no-param-reassign": 0,
"comma-dangle": 0,
"curly": [
"error",
"multi-line"
],
"no-shadow": [
"error",
{
"allow": [
"req",
"res",
"err"
]
}
],
"valid-jsdoc": [
"error",
{
"requireReturn": true,
"requireReturnType": true,
"requireParamDescription": false,
"requireReturnDescription": true
}
],
"import/prefer-default-export": 0,
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"react/react-in-jsx-scope": "off"
}
}




13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#### What does this PR do?

#### Description of Task to be completed?

#### How should this be manually tested?

#### Any background context you want to provide?

#### What are the relevant pivotal tracker/Trello stories?

#### Screenshots (if appropriate)

#### Questions:
24 changes: 24 additions & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Vercel Preview Deployment

on:
push:
branches-ignore:
- main

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Vercel CLI
run: npm install --global vercel

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Vercel Production Deployment

on:
push:
branches:
- main

jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Vercel CLI
run: npm install --global vercel

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

*storybook.log
.env
1 change: 1 addition & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
npx lint-staged
npm test
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always",
"parser": "typescript"
}

18 changes: 18 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { StorybookConfig } from '@storybook/nextjs';

const config: StorybookConfig = {
stories: ['../lib/**/*.mdx', '../lib/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/nextjs',
options: {},
},
staticDirs: ['../public'],
};
export default config;
14 changes: 14 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { Preview } from '@storybook/react';
import '../src/app/globals.css'
const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:20

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

EXPOSE ${PORT}

CMD ["npm","run","dev"]
Loading
Loading