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

Feature/marketplace #9

Merged
merged 36 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ba9973b
feat(3cp): settlement ui
faisalEsMagico Nov 20, 2023
5daaf60
feat(settlement): create settlement + use wallet page
faisalEsMagico Nov 20, 2023
aa12482
feat(merge): merge dev
faisalEsMagico Nov 21, 2023
2461b4e
fix(loading): change spinner color
faisalEsMagico Nov 21, 2023
cff82fa
feat(marketplace): three section and popup setup
ankitmlesmagico Nov 23, 2023
2ae4871
feat(account section): final touchup
ankitmlesmagico Nov 24, 2023
b3de4ee
feat(account section): final touchup
ankitmlesmagico Nov 24, 2023
913e824
feat(marketplace admin): integration
ankitmlesmagico Nov 25, 2023
a04b3d2
feat(marketplace admin): integration
ankitmlesmagico Nov 25, 2023
5f42745
feat(marketplace admin): merge Settlement
ankitmlesmagico Nov 25, 2023
e75765f
feat(question bank): changed type
ankitmlesmagico Nov 25, 2023
566cf47
feat(docker): changing docker in two stages
Nov 28, 2023
d6fb3b3
Merge pull request #8 from COMPASS-DPG/dev-test
aman1esmagico Nov 28, 2023
0540d6b
feat(userWallet): transectionIntegration
ankitmlesmagico Nov 28, 2023
454a66f
feat(account and course): setting loading and error
ankitmlesmagico Nov 29, 2023
4ad7f13
feat(marktetplace): rest button setup
ankitmlesmagico Dec 1, 2023
ff7f0e7
feat(ui): done with changes
faisalEsMagico Dec 4, 2023
bffa882
feat(marktetplace): merge conflict
ankitmlesmagico Dec 4, 2023
127cfcd
feat(auth): added login and signup
faisalEsMagico Dec 7, 2023
9d4ece1
feat(integration): integration done
faisalEsMagico Dec 8, 2023
ddfb3d0
feat(ui): done with ui changes
faisalEsMagico Dec 10, 2023
8a24f8e
feat(changes): done changes
faisalEsMagico Dec 11, 2023
e7f88a4
feat(changes): done changes
faisalEsMagico Dec 12, 2023
ec34996
feat(fix): remove dashboard
faisalEsMagico Dec 12, 2023
4dfceba
feat(route): change route
faisalEsMagico Dec 12, 2023
2dfa1b4
feat(wallet): done changes in user wallet
faisalEsMagico Dec 12, 2023
4cd51ea
feat(changes): done with changes
faisalEsMagico Dec 12, 2023
594bb2a
feat(readme): added readme
faisalEsMagico Dec 13, 2023
9002cde
feat(readme): added readme
faisalEsMagico Dec 13, 2023
35405b3
Merge pull request #10 from COMPASS-DPG/feature/readme
faisalEsMagico Dec 13, 2023
c6db1b8
feat(conif): config file for urls
faisalEsMagico Dec 13, 2023
3072c25
feat(readme): done changes in reamde
faisalEsMagico Dec 13, 2023
0037183
Merge pull request #11 from COMPASS-DPG/feature/readme1
faisalEsMagico Dec 13, 2023
d8bcc29
feat(merge): merge branch
faisalEsMagico Dec 13, 2023
7a7e23d
feat(conflict resolve): backing to dev branch for resolving conflict
Dec 13, 2023
739b677
Merge branch 'dev' into feature/marketplace
aman1esmagico Dec 13, 2023
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
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
// Tailwind CSS Autocomplete, add more if used in projects
"tailwindCSS.classAttributes": [
Expand Down
149 changes: 53 additions & 96 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,132 +1,89 @@
# Next.js + Tailwind CSS + TypeScript Starter and Boilerplate
# admin-ui

<div align="center">
<h2>🔋 ts-nextjs-tailwind-starter</h2>
<p>Next.js + Tailwind CSS + TypeScript starter packed with useful development features.</p>
<p>Made by <a href="https://theodorusclarence.com">Theodorus Clarence</a></p>
Welcome to the Admin-UI project! This is an admin interface with the following features:

[![GitHub Repo stars](https://img.shields.io/github/stars/theodorusclarence/ts-nextjs-tailwind-starter)](https://github.com/theodorusclarence/ts-nextjs-tailwind-starter/stargazers)
[![Depfu](https://badges.depfu.com/badges/fc6e730632ab9dacaf7df478a08684a7/overview.svg)](https://depfu.com/github/theodorusclarence/ts-nextjs-tailwind-starter?project_id=30160)
[![Last Update](https://img.shields.io/badge/deps%20update-every%20sunday-blue.svg)](https://shields.io/)
1. **Admin Sign Up and Login:**

</div>
- Allows administrators to create accounts and log in securely.

## Features
2. **Course Provider Management:**

This repository is 🔋 battery packed with:
- Admins can approve or reject third-party course providers and their courses.
- Courses are reviewed based on the provider's profile and course content.

- ⚡️ Next.js 13 with App Router
- ⚛️ React 18
- ✨ TypeScript
- 💨 Tailwind CSS 3 — Configured with CSS Variables to extend the **primary** color
- 💎 Pre-built Components — Components that will **automatically adapt** with your brand color, [check here for the demo](https://tsnext-tw.thcl.dev/components)
- 🃏 Jest — Configured for unit testing
- 📈 Absolute Import and Path Alias — Import components using `@/` prefix
- 📏 ESLint — Find and fix problems in your code, also will **auto sort** your imports
- 💖 Prettier — Format your code consistently
- 🐶 Husky & Lint Staged — Run scripts on your staged files before they are committed
- 🤖 Conventional Commit Lint — Make sure you & your teammates follow conventional commit
- ⏰ Release Please — Generate your changelog by activating the `release-please` workflow
- 👷 Github Actions — Lint your code on PR
- 🚘 Automatic Branch and Issue Autolink — Branch will be automatically created on issue **assign**, and auto linked on PR
- 🔥 Snippets — A collection of useful snippets
- 👀 Open Graph Helper Function — Awesome open graph generated using [og](https://github.com/theodorusclarence/og), fork it and deploy!
- 🗺 Site Map — Automatically generate sitemap.xml
- 📦 Expansion Pack — Easily install common libraries, additional components, and configs.
3. **Credit Settlement:**

See the 👉 [feature details and changelog](https://github.com/theodorusclarence/ts-nextjs-tailwind-starter/blob/main/CHANGELOG.md) 👈 for more.
- Admins can settle credits for third-party course providers.

You can also check all of the **details and demos** on my blog post:
4. **WPCAS :**

- [One-stop Starter to Maximize Efficiency on Next.js & Tailwind CSS Projects](https://theodorusclarence.com/blog/one-stop-starter)
- View user details and profiles.
- Set up new surveys for users.
- download userList.
- Add competency and level-based questions.
- upload and download question bank file.

## Getting Started

### 1. Clone this template using one of the three ways:

1. Use this repository as template

**Disclosure:** by using this repository as a template, there will be an attribution on your repository.

I'll appreciate if you do, so this template can be known by others too 😄

![Use as template](https://user-images.githubusercontent.com/55318172/129183039-1a61e68d-dd90-4548-9489-7b3ccbb35810.png)
5. **User Wallet Management:**

2. Using `create-next-app`
- Admins can view user wallets.
- Add or remove credits for course consumers (users).

```bash
npx create-next-app -e https://github.com/theodorusclarence/ts-nextjs-tailwind-starter project-name
```
6. **Backend Service Connections:**
- Connects to the following backend services:
- `marketplace-service`: Fetches user (course consumer) data and updates accordingly.
- `course-manager-service`: Fetches third-party course provider courses and profiles, updating them accordingly.

If you still want to use **pages directory** (_is not actively maintained_) you can use this command

```bash
npx create-next-app -e https://github.com/theodorusclarence/ts-nextjs-tailwind-starter/tree/pages-directory project-name
```
## Getting Started

3. Using `degit`
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.

```bash
npx degit theodorusclarence/ts-nextjs-tailwind-starter YOUR_APP_NAME
```
### Prerequisites

4. Deploy to Vercel
Make sure you have the following installed on your machine:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Ftheodorusclarence%2Fts-nextjs-tailwind-starter)
Node.js: Download and install Node.js

### 2. Install dependencies
### Installation

It is encouraged to use **yarn** so the husky hooks can work properly.
Clone the repository:

```bash
yarn install
```

### 3. Run the development server

You can start the server using this command:

```bash
yarn dev
git clone https://github.com/COMPASS-DPG/admin-ui.git
cd admin-ui
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `src/pages/index.tsx`.

### 4. Change defaults
Install dependencies:

There are some things you need to change including title, urls, favicons, etc.

Find all comments with !STARTERCONF, then follow the guide.

Don't forget to change the package name in package.json

### 5. Commit Message Convention
```
npm install
```

This starter is using [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), it is mandatory to use it to commit changes.
Configuration

## Projects using ts-nextjs-tailwind-starter
Configure the connection to the backend service by updating the config.js file with the appropriate API endpoint.

<!--
TEMPLATE
- [sitename](https://sitelink.com) ([Source](https://github.com/githublink))
- [sitename](https://sitelink.com)
-->
### Development

- [theodorusclarence.com](https://theodorusclarence.com) ([Source](https://github.com/theodorusclarence/theodorusclarence.com))
- [Notiolink](https://notiolink.thcl.dev/) ([Source](https://github.com/theodorusclarence/notiolink))
To start the development server, run the following command:

Are you using this starter? Please add your page (and repo) to the end of the list via a [Pull Request](https://github.com/theodorusclarence/ts-nextjs-tailwind-starter/edit/main/README.md). 😃
```
npm run dev
```

## Expansion Pack 📦
Visit http://localhost:3000 in your browser to view the application.

This starter is now equipped with an [expansion pack](https://github.com/theodorusclarence/expansion-pack).
### Deployment

You can easily add expansion such as React Hook Form + Components, Storybook, and more just using a single command line.
Follow these steps to deploy the project:

https://user-images.githubusercontent.com/55318172/146631994-e1cac137-1664-4cfe-950b-a96decc1eaa6.mp4
Build the project:

Check out the [expansion pack repository](https://github.com/theodorusclarence/expansion-pack) for the commands
```
npm run build
```

### App Router Update
Start the production server:

Due to App Router update, the expansion pack is currently **outdated**. It will be updated in the future. You can still use them by copy and pasting the files.
```
npm start
```
12 changes: 10 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
const wpcasBackendUrl = 'http://3cp.compass.samagra.io';
const courseManagerBackendUrl =
process.env.NEXT_PUBLIC_COURSE_MANAGER_SERVICE_BACKEND_URL ||
'http://localhost:3000';

const wpcasBackendUrl =
process.env.NEXT_PUBLIC_WPCAS_SERVICE_BACKEND_IP || 'http://localhost:3000';

const marketBackendUrl =
process.env.MARKETPLACE_SERVICE_BACKEND_IP || 'http://localhost:3000';
process.env.NEXT_PUBLIC_MARKETPLACE_SERVICE_BACKEND_IP ||
'http://localhost:3000';

module.exports = {
wpcasBackendUrl,
marketBackendUrl,
courseManagerBackendUrl,
};
Loading
Loading