Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
haku-d committed Nov 16, 2023
1 parent 9573bab commit cd812a1
Show file tree
Hide file tree
Showing 162 changed files with 13,614 additions and 135 deletions.
36 changes: 36 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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
Empty file added .env
Empty file.
Empty file added .env.development
Empty file.
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_API_BASE_URL="https://old-star-2515.fly.dev"
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 2
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
// "javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
// "typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
"editor.formatOnSave": true,
"editor.tabSize": 2
}
45 changes: 45 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# syntax = docker/dockerfile:1

# Adjust NODE_VERSION as desired
ARG NODE_VERSION=20.8.0
FROM node:${NODE_VERSION}-slim as base

LABEL fly_launch_runtime="Next.js"

# Next.js app lives here
WORKDIR /app

# Set production environment
ENV NODE_ENV="production"


# Throw-away build stage to reduce size of final image
FROM base as build

# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install -y build-essential pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json yarn.lock ./
RUN yarn install --frozen-lockfile --production=false

# Copy application code
COPY --link . .

# Build application
RUN yarn run build

# Remove development dependencies
RUN yarn install --production=true


# Final stage for app image
FROM base

# Copy built application
COPY --from=build /app /app

# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "yarn", "run", "start" ]
51 changes: 22 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# Adkit Admin Template | Next.JS, React, Ant Design, Firebase

## Getting Started
## Introduction

First, run the development server:
Adkit is an admin panel which was built on top of Next.js Framework and inspired by zoho. All the UI/UX are supported by Ant Design and fully customized to satisfy UI diversity from business or brand requirements.

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
It covers most of common features such as dashboard with statistics, item management, report, chat, email, calendar, email, etc. By prodiving ready to use UI/UX templates, it will help you to speed up your application development.

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
## UI/UX Features
- Admin Dashboard
- Authentication (Integrated firebase authentication)
- Item Management
- Customer Management
- Sales Order Management
- Invoice Management
- Email (tinymce.js is being used to rich text editor)
- Chat
- Location (leaftlet.js is being used to render the map)
- Calendar
- Settings

You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
## API
- The code was setting up to integrate with API via Axios library

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
## Demo

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Admin Demo: https://old-star-2515.fly.dev
Email: [email protected]
Password: 123456
5 changes: 5 additions & 0 deletions credit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
https://www.pexels.com/photo/a-white-flowers-with-green-leaves-9782305/
https://www.pexels.com/photo/a-mountain-range-with-a-small-pond-in-the-foreground-18512532/
https://www.pexels.com/photo/smiling-man-with-bag-16001703/
https://www.pexels.com/photo/the-bride-by-thiago-rosarii-18988315/
https://www.pexels.com/photo/white-clouds-on-blue-sky-19670/
17 changes: 17 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# fly.toml app configuration file generated for old-star-2515 on 2023-11-15T11:50:29-07:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "old-star-2515"
primary_region = "sea"

[build]

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ["app"]
6 changes: 4 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
reactStrictMode: false,
};

module.exports = nextConfig
module.exports = nextConfig;
26 changes: 23 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,35 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"predev": "ts-node --project ./tsconfig.node.json ./scripts/genAntdCss.tsx",
"prebuild": "cross-env NODE_ENV=production ts-node --project ./tsconfig.node.json ./scripts/genAntdCss.tsx"
},
"dependencies": {
"@ant-design/cssinjs": "^1.17.2",
"@ant-design/icons": "^5.2.6",
"@tanstack/react-query": "^5.4.3",
"@tinymce/tinymce-react": "^4.3.0",
"antd": "^5.10.2",
"axios": "^1.6.0",
"firebase": "^10.5.2",
"leaflet": "^1.9.4",
"lodash": "^4.17.21",
"next": "14.0.0",
"react": "^18",
"react-dom": "^18",
"next": "14.0.0"
"react-leaflet": "^4.2.1",
"recharts": "^2.9.0"
},
"devDependencies": {
"@ant-design/static-style-extract": "^1.0.2",
"@flydotio/dockerfile": "^0.4.10",
"@types/node": "^20.8.9",
"cross-env": "^7.0.3",
"eslint": "^8",
"eslint-config-next": "14.0.0"
"eslint-config-next": "14.0.0",
"ts-node": "^10.9.1",
"tslib": "^2.6.2",
"typescript": "^5.2.2"
}
}
Binary file added public/Calamansi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Pitaya.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/antd.min.css

Large diffs are not rendered by default.

Binary file added public/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/composite-item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/group-item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/location.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/logo-full.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/marker-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/photos/pexels-david-9782305.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/photos/pexels-line-knipst-18512532.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/photos/pexels-thiago-rosarii-18988315.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/photos/pexels-tifeclicks-16001703.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/price-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/tshirt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions scripts/genAntdCss.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import fs from 'fs';
import { extractStyle } from '@ant-design/static-style-extract';
import React from 'react';
import { ConfigProvider } from 'antd';

const outputPath = './public/antd.min.css';

const css = extractStyle((node) => (
<ConfigProvider
theme={{
token: {
fontSize: 16,
colorPrimary: "#52c41a",
},
}}
>
{node}
</ConfigProvider>
));

fs.writeFileSync(outputPath, css);
9 changes: 9 additions & 0 deletions src/app/(crm)/calendar/_components/calendar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Calendar, Card } from 'antd';

export default function CalendarPage() {
return (
<Card>
<Calendar />
</Card>
);
}
31 changes: 31 additions & 0 deletions src/app/(crm)/calendar/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react';
import Link from 'next/link';
import { Space } from 'antd';
import { HomeOutlined } from '@ant-design/icons';

import PageContent from '@/components/page-content';
import CalendarPage from './_components/calendar';

export default function Page() {
return (
<PageContent
breadcrumbs={[
{
title: (
<Link href={'/'}>
<Space>
<HomeOutlined />
HOME
</Space>
</Link>
),
},
{
title: 'CALENDAR',
},
]}
>
<CalendarPage />
</PageContent>
);
}
74 changes: 74 additions & 0 deletions src/app/(crm)/chart/_components/lead.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
'use client';
import { randColor } from '@/lib/utils/color';
import { Card } from 'antd';
import {
BarChart,
Bar,
Cell,
XAxis,
YAxis,
CartesianGrid,
Tooltip,
Legend,
ResponsiveContainer,
} from 'recharts';

const data = [
{
name: 'Data/Telecom OEM',
ad1: 1,
},
{
name: 'ERP',
ad1: 1,
},
{
name: 'Government',
ad1: 1,
},
{
name: 'Large Enterprise',
ad1: 1,
},
{
name: 'Optical Networking',
ad1: 1,
},
{
name: 'Service Provider',
ad1: 1,
},
{
name: 'Storage Equipment',
ad1: 1,
ad2: 1,
},
];

export default function LeadChart() {
return (
<Card bodyStyle={{ height: 400 }} title="Stack Bar Chart">
<ResponsiveContainer width="100%" height="100%">
<BarChart
width={500}
height={300}
data={data}
margin={{
top: 20,
right: 30,
left: 20,
bottom: 5,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="name" />
<YAxis />
<Tooltip />
<Legend />
<Bar dataKey="ad1" stackId="a" fill={`#${randColor()}`} />
<Bar dataKey="ad2" stackId="a" fill={`#${randColor()}`} />
</BarChart>
</ResponsiveContainer>
</Card>
);
}
Loading

0 comments on commit cd812a1

Please sign in to comment.