├── .eslintrc.json ├── src ├── redux │ ├── rootReducer.ts │ ├── hooks.ts │ └── store.ts ├── app │ ├── favicon.ico │ ├── loading.tsx │ ├── not-found.tsx │ ├── error.tsx │ ├── (withlayout) │ │ ├── student │ │ │ └── page.tsx │ │ ├── super-admin │ │ │ └── page.tsx │ │ └── layout.tsx │ ├── globals.css │ ├── layout.tsx │ ├── login │ │ └── page.tsx │ ├── page.tsx │ └── page.module.css ├── assets │ └── login-image.png ├── constants │ ├── role.ts │ └── sidebarItems.tsx ├── lib │ ├── Providers.tsx │ └── AntdRegistry.tsx └── components │ ├── ui │ ├── Contents.tsx │ ├── UMBreadCrumb.tsx │ └── Sidebar.tsx │ └── Forms │ ├── Form.tsx │ └── FormInput.tsx ├── next.config.js ├── .gitignore ├── public ├── vercel.svg └── next.svg ├── tsconfig.json ├── package.json ├── LICENCE └── README.md /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | // eslintrc -------------------------------------------------------------------------------- /src/redux/rootReducer.ts: -------------------------------------------------------------------------------- 1 | export const reducer = { 2 | 3 | } 4 | 5 | // Root Reducer -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/University-Management-Frontend/HEAD/src/app/favicon.ico -------------------------------------------------------------------------------- /src/assets/login-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/University-Management-Frontend/HEAD/src/assets/login-image.png -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {} 3 | 4 | module.exports = nextConfig 5 | // next config 6 | -------------------------------------------------------------------------------- /src/constants/role.ts: -------------------------------------------------------------------------------- 1 | export enum USER_ROLE{ 2 | STUDENT = "student", 3 | FACULTY = "faculty", 4 | ADMIN = "admin", 5 | SUPER_ADMIN = "super_admin" 6 | } 7 | 8 | // Role -------------------------------------------------------------------------------- /src/app/loading.tsx: -------------------------------------------------------------------------------- 1 | const Loading = () => { 2 | return ( 3 |
4 |

Loading....

5 |
6 | ); 7 | }; 8 | // Loading tsx 9 | export default Loading; 10 | -------------------------------------------------------------------------------- /src/app/not-found.tsx: -------------------------------------------------------------------------------- 1 | const NotFoundPage = () => { 2 | return ( 3 |
4 |

404!!! Page not found!

5 |
6 | ); 7 | }; 8 | // Not found 9 | export default NotFoundPage; 10 | -------------------------------------------------------------------------------- /src/app/error.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | // error 3 | const ErrorPage = () => { 4 | return ( 5 |
6 |

Something went wrong!

7 |
8 | ); 9 | }; 10 | 11 | export default ErrorPage; 12 | -------------------------------------------------------------------------------- /src/app/(withlayout)/student/page.tsx: -------------------------------------------------------------------------------- 1 | const StudentPage = () => { 2 | return ( 3 |
4 |

This page is for student

5 |
6 | ); 7 | }; 8 | // Student Page 9 | export default StudentPage; 10 | -------------------------------------------------------------------------------- /src/app/(withlayout)/super-admin/page.tsx: -------------------------------------------------------------------------------- 1 | const SuperAdminPage = () => { 2 | return ( 3 |
4 |

This page is for super admin

5 |
6 | ); 7 | }; 8 | // Super Admin Page 9 | export default SuperAdminPage; 10 | -------------------------------------------------------------------------------- /src/app/globals.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400;700&display=swap'); 2 | * { 3 | box-sizing: border-box; 4 | padding: 0; 5 | margin: 0; 6 | font-family: 'Roboto Condensed', sans-serif; 7 | } 8 | /* globals css */ -------------------------------------------------------------------------------- /src/redux/hooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | // hooks 4 | // Use throughout your app instead of plain `useDispatch` and `useSelector` 5 | export const useAppDispatch: () => AppDispatch = useDispatch 6 | export const useAppSelector: TypedUseSelectorHook = useSelector -------------------------------------------------------------------------------- /src/app/(withlayout)/layout.tsx: -------------------------------------------------------------------------------- 1 | import Contents from "@/components/ui/Contents"; 2 | import SideBar from "@/components/ui/Sidebar"; 3 | import { Layout } from "antd"; 4 | // Super Admin Layout 5 | const DashboardLayout = ({ children }: { children: React.ReactNode }) => { 6 | return ( 7 | 8 | 9 | {children} 10 | 11 | ); 12 | }; 13 | 14 | export default DashboardLayout; 15 | -------------------------------------------------------------------------------- /src/lib/Providers.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { store } from "@/redux/store"; 3 | import { Provider } from "react-redux"; 4 | import StyledComponentsRegistry from "./AntdRegistry"; 5 | // Providers 6 | const Providers = ({ children }: { children: React.ReactNode }) => { 7 | return ( 8 | 9 | {children} 10 | 11 | ); 12 | }; 13 | 14 | export default Providers; 15 | -------------------------------------------------------------------------------- /src/redux/store.ts: -------------------------------------------------------------------------------- 1 | // Store js 2 | import { reducer } from './rootReducer'; 3 | import { configureStore } from '@reduxjs/toolkit' 4 | 5 | export const store = configureStore({ 6 | reducer 7 | }) 8 | 9 | 10 | 11 | // Infer the `RootState` and `AppDispatch` types from the store itself 12 | export type RootState = ReturnType 13 | // Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState} 14 | export type AppDispatch = typeof store.dispatch -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | # gitignore 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import "./globals.css"; 2 | import type { Metadata } from "next"; 3 | import { Inter } from "next/font/google"; 4 | import Providers from "@/lib/Providers"; 5 | // layout tsx 6 | const inter = Inter({ subsets: ["latin"] }); 7 | 8 | export const metadata: Metadata = { 9 | title: "Create Next App", 10 | description: "Generated by create next app", 11 | }; 12 | 13 | export default function RootLayout({ 14 | children, 15 | }: { 16 | children: React.ReactNode; 17 | }) { 18 | return ( 19 | 20 | 21 | {children} 22 | 23 | 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /src/lib/AntdRegistry.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | // ant regisrty 3 | import React from "react"; 4 | import { createCache, extractStyle, StyleProvider } from "@ant-design/cssinjs"; 5 | import type Entity from "@ant-design/cssinjs/es/Cache"; 6 | import { useServerInsertedHTML } from "next/navigation"; 7 | 8 | const StyledComponentsRegistry = ({ children }: React.PropsWithChildren) => { 9 | const cache = React.useMemo(() => createCache(), []); 10 | useServerInsertedHTML(() => ( 11 |