Skip to content

Commit

Permalink
Merge branch 'main' into swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
abedmohammed committed Oct 27, 2024
2 parents e9d3f2c + e5da214 commit a4d33f6
Show file tree
Hide file tree
Showing 25 changed files with 5,674 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/babel","next/core-web-vitals"]
}
36 changes: 36 additions & 0 deletions frontend/.gitignore
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
36 changes: 36 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.

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

## 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.
12 changes: 12 additions & 0 deletions frontend/app/(auth)/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}

export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
5 changes: 5 additions & 0 deletions frontend/app/(auth)/login/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function LoginPage() {
return (
<div>LoginPage</div>
);
}
5 changes: 5 additions & 0 deletions frontend/app/(auth)/register/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function RegisterPage() {
return (
<div>RegisterPage</div>
);
}
5 changes: 5 additions & 0 deletions frontend/app/(main)/chats/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function ChatsPage() {
return (
<div>ChatsPage</div>
);
}
5 changes: 5 additions & 0 deletions frontend/app/(main)/dashboard/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function DashboardPage() {
return (
<div>DashboardPage</div>
);
}
5 changes: 5 additions & 0 deletions frontend/app/(main)/journals/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function JournalsPage() {
return (
<div>JournalsPage</div>
);
}
17 changes: 17 additions & 0 deletions frontend/app/(main)/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Navbar from '@/components/navbar/Navbar'
import { config } from '@fortawesome/fontawesome-svg-core'
import '@fortawesome/fontawesome-svg-core/styles.css'
config.autoAddCss = false

export default function MainLayout({ children }) {
return (
<html lang="en">
<body>
<div className='min-h-screen flex flex-col justify-between'>
{children}
<Navbar />
</div>
</body>
</html>
);
}
5 changes: 5 additions & 0 deletions frontend/app/(main)/settings/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function SettingsPage() {
return (
<div>SettingsPage</div>
);
}
5 changes: 5 additions & 0 deletions frontend/app/(main)/stats/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function StatsPage() {
return (
<div>StatsPage</div>
);
}
Binary file added frontend/app/favicon.ico
Binary file not shown.
Binary file added frontend/app/fonts/GeistMonoVF.woff
Binary file not shown.
Binary file added frontend/app/fonts/GeistVF.woff
Binary file not shown.
27 changes: 27 additions & 0 deletions frontend/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
--background: #ffffff;
--foreground: #171717;
}

@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}

body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
}

@layer utilities {
.text-balance {
text-wrap: balance;
}
}
30 changes: 30 additions & 0 deletions frontend/app/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import localFont from "next/font/local";
import "./globals.css";

const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
weight: "100 900",
});
const geistMono = localFont({
src: "./fonts/GeistMonoVF.woff",
variable: "--font-geist-mono",
weight: "100 900",
});

export const metadata = {
title: "Create Next App",
description: "Generated by create next app",
};

export default function RootLayout({ children }) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>
</html>
);
}
7 changes: 7 additions & 0 deletions frontend/app/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function LandingPage() {
return (
<div>
Hello World
</div>
);
}
52 changes: 52 additions & 0 deletions frontend/components/navbar/Navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
'use client';

import { usePathname } from "next/navigation";
import Link from "next/link";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faBook, faComments, faHouse, faChartColumn, faGear } from "@fortawesome/free-solid-svg-icons";

export default function Navbar() {
const routes = [
{
name: 'Journals',
path: '/journals',
icon: faBook,
},
{
name: 'Chats',
path: '/chats',
icon: faComments,
},
{
name: 'Dashboard',
path: '/dashboard',
icon: faHouse,
},
{
name: 'Stats',
path: '/stats',
icon: faChartColumn,
},
{
name: 'Settings',
path: '/settings',
icon: faGear,
},
];

const currentPath = usePathname();

// PLACEHOLDER
const isLoggedIn = true;

return (
<div className="flex justify-evenly items-center bg-indigo-100 h-24">
{routes.map((route) => (
<Link className={
`${currentPath === route.path ? 'text-purple-600' : 'text-gray-600'}
transition ease-in-out duration-500 text-3xl`
} href={isLoggedIn ? route.path : '/login'} key={route.name}><FontAwesomeIcon icon={route.icon}/></Link>
))}
</div>
);
}
7 changes: 7 additions & 0 deletions frontend/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}
4 changes: 4 additions & 0 deletions frontend/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

export default nextConfig;
Loading

0 comments on commit a4d33f6

Please sign in to comment.