Skip to content

Commit 18f7eb4

Browse files
committed
feat: migrate to app router
1 parent 3d754c4 commit 18f7eb4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2451
-5346
lines changed

.deepsource.toml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
node_modules
4+
/node_modules
55
/.pnp
66
.pnp.js
77

@@ -25,11 +25,11 @@ yarn-debug.log*
2525
yarn-error.log*
2626

2727
# local env files
28-
.env
29-
.env.local
30-
.env.development.local
31-
.env.test.local
32-
.env.production.local
28+
.env*.local
3329

3430
# vercel
3531
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
1-
#OctoPlay - A Simplified Music Analytics Tool
1+
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).
22

3-
OctoPlay is an easy-to-use music app to analyse and gain insightful data on your
4-
music experience. Currently supporting Spotify using their
5-
[Web API](https://developer.spotify.com/documentation/web-api/).
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
```
14+
15+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
16+
17+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
18+
19+
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
20+
21+
## Learn More
22+
23+
To learn more about Next.js, take a look at the following resources:
24+
25+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27+
28+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29+
30+
## Deploy on Vercel
31+
32+
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.
33+
34+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

app/favicon.ico

25.3 KB
Binary file not shown.

app/globals.css

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@layer base {
6+
:root {
7+
--background: 0 0% 100%;
8+
--foreground: 20 14.3% 4.1%;
9+
10+
--card: 0 0% 100%;
11+
--card-foreground: 20 14.3% 4.1%;
12+
13+
--popover: 0 0% 100%;
14+
--popover-foreground: 20 14.3% 4.1%;
15+
16+
--primary: 24 9.8% 10%;
17+
--primary-foreground: 60 9.1% 97.8%;
18+
19+
--secondary: 60 4.8% 95.9%;
20+
--secondary-foreground: 24 9.8% 10%;
21+
22+
--muted: 60 4.8% 95.9%;
23+
--muted-foreground: 25 5.3% 44.7%;
24+
25+
--accent: 60 4.8% 95.9%;
26+
--accent-foreground: 24 9.8% 10%;
27+
28+
--destructive: 0 84.2% 60.2%;
29+
--destructive-foreground: 60 9.1% 97.8%;
30+
31+
--border: 20 5.9% 90%;
32+
--input: 20 5.9% 90%;
33+
--ring: 20 14.3% 4.1%;
34+
35+
--radius: 0.5rem;
36+
}
37+
38+
.dark {
39+
--background: 20 14.3% 4.1%;
40+
--foreground: 60 9.1% 97.8%;
41+
42+
--card: 20 14.3% 4.1%;
43+
--card-foreground: 60 9.1% 97.8%;
44+
45+
--popover: 20 14.3% 4.1%;
46+
--popover-foreground: 60 9.1% 97.8%;
47+
48+
--primary: 60 9.1% 97.8%;
49+
--primary-foreground: 24 9.8% 10%;
50+
51+
--secondary: 12 6.5% 15.1%;
52+
--secondary-foreground: 60 9.1% 97.8%;
53+
54+
--muted: 12 6.5% 15.1%;
55+
--muted-foreground: 24 5.4% 63.9%;
56+
57+
--accent: 12 6.5% 15.1%;
58+
--accent-foreground: 60 9.1% 97.8%;
59+
60+
--destructive: 0 62.8% 30.6%;
61+
--destructive-foreground: 60 9.1% 97.8%;
62+
63+
--border: 12 6.5% 15.1%;
64+
--input: 12 6.5% 15.1%;
65+
--ring: 24 5.7% 82.9%;
66+
}
67+
}
68+
69+
@layer base {
70+
* {
71+
@apply border-border;
72+
}
73+
body {
74+
@apply bg-background text-foreground;
75+
}
76+
}

app/layout.tsx

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import { Metadata } from "next";
2-
import React from "react";
3-
import { SessionProvider } from "next-auth/react";
4-
import { SessionProviders } from "../utils/session-provider";
1+
import { ThemeProvider } from "@/components/theme-provider";
2+
import "./globals.css";
3+
import type { Metadata } from "next";
4+
import { Inter } from "next/font/google";
5+
import { SessionProvider } from "@/components/session-provider";
6+
7+
const inter = Inter({ subsets: ["latin"] });
58

69
export const metadata: Metadata = {
710
title: "OctoPlay",
8-
description: "Welcome to OctoPlay",
11+
description:
12+
"A simplified music insight tool built on Spotify's web API",
913
};
1014

1115
export default function RootLayout({
@@ -14,9 +18,19 @@ export default function RootLayout({
1418
children: React.ReactNode;
1519
}) {
1620
return (
17-
<html lang="en">
18-
<body>
19-
<SessionProviders>{children}</SessionProviders>
21+
<html
22+
lang="en"
23+
suppressHydrationWarning
24+
>
25+
<body className={inter.className}>
26+
<SessionProvider>
27+
<ThemeProvider
28+
attribute="class"
29+
defaultTheme="dark"
30+
>
31+
{children}
32+
</ThemeProvider>
33+
</SessionProvider>
2034
</body>
2135
</html>
2236
);

app/page.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
1-
"use client";
2-
3-
import { useSession } from "next-auth/react";
4-
import AuthenticatedScreen from "../components/AuthenticatedScreen";
5-
import UnauthenticatedScreen from "../components/UnauthenticatedScreen";
6-
import { useEffect, useState } from "react";
1+
import Hero from "@/components/ui/Hero";
72

83
export default function Home() {
9-
const { status } = useSession();
10-
11-
console.log(status);
12-
13-
if (status === "authenticated") {
14-
return <AuthenticatedScreen />;
15-
} else {
16-
return <UnauthenticatedScreen />;
17-
}
4+
return <Hero />;
185
}

app/profile/page.tsx

Lines changed: 0 additions & 142 deletions
This file was deleted.

0 commit comments

Comments
 (0)