Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
# env files
.env
.env*.local

# vercel
Expand Down
32 changes: 32 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
},
{
"name": "Next.js: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Next.js: debug full stack",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/next",
"runtimeArgs": ["--inspect"],
"skipFiles": ["<node_internals>/**"],
"serverReadyAction": {
"action": "debugWithEdge",
"killOnServerStop": true,
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"webRoot": "${workspaceFolder}"
}
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"prettier.enable": false
}
37 changes: 37 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Credits

## Next.js

The MIT License (MIT)

Copyright (c) 2024 Vercel, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## vite-tsconfig-paths

MIT License

Copyright (c) Alec Larson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
49 changes: 31 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,57 @@
{
"private": true,
"scripts": {
"dev": "next dev",
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start"
"start": "next start",
"test": "tsc --noEmit && vitest",
"test-watch": "vitest"
},
"dependencies": {
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-popover": "^1.1.2",
"@radix-ui/react-select": "^2.1.2",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@supabase/ssr": "latest",
"@supabase/supabase-js": "latest",
"@usebasejump/shared": "^0.0.3",
"autoprefixer": "10.4.17",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"cmdk": "^0.2.0",
"cmdk": "^1.0.4",
"date-fns": "^3.6.0",
"geist": "^1.2.1",
"lucide-react": "^0.368.0",
"next": "latest",
"lucide-react": "^0.454.0",
"next": "15.0.2",
"next-themes": "^0.3.0",
"postcss": "8.4.33",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028",
"swr": "^2.2.5",
"tailwind-merge": "^2.2.2",
"tailwindcss": "3.4.1",
"tailwindcss-animate": "^1.0.7",
"typescript": "5.3.3"
},
"devDependencies": {
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.0.1",
"@types/node": "20.11.5",
"@types/react": "18.2.48",
"@types/react-dom": "18.2.18",
"encoding": "^0.1.13"
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@vitejs/plugin-react": "^4.3.3",
"encoding": "^0.1.13",
"jsdom": "^25.0.1",
"vitest": "^2.1.4",
"vitest-tsconfig-paths": "^3.4.1"
},
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447",
"resolutions": {
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
}
}
2 changes: 1 addition & 1 deletion src/app/auth/callback/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function GET(request: Request) {
const origin = requestUrl.origin;

if (code) {
const supabase = createClient();
const supabase = await createClient();
await supabase.auth.exchangeCodeForSession(code);
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/dashboard/(personalAccount)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DashboardHeader from "@/components/dashboard/dashboard-header";

export default async function PersonalAccountDashboard({children}: {children: React.ReactNode}) {

const supabaseClient = createClient();
const supabaseClient = await createClient();

const {data: personalAccount, error} = await supabaseClient.rpc('get_personal_account');

Expand All @@ -25,4 +25,4 @@ export default async function PersonalAccountDashboard({children}: {children: Re
</>
)

}
}
6 changes: 3 additions & 3 deletions src/app/dashboard/(personalAccount)/settings/billing/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {createClient} from "@/lib/supabase/server";
import AccountBillingStatus from "@/components/basejump/account-billing-status";
import AccountBillingStatus from "@/components/basejump/account-billing-status/account-billing-status";

const returnUrl = process.env.NEXT_PUBLIC_URL as string;

export default async function PersonalAccountBillingPage() {
const supabaseClient = createClient();
const supabaseClient = await createClient();
const {data: personalAccount} = await supabaseClient.rpc('get_personal_account');


Expand All @@ -13,4 +13,4 @@ export default async function PersonalAccountBillingPage() {
<AccountBillingStatus accountId={personalAccount.account_id} returnUrl={`${returnUrl}/dashboard/settings/billing`} />
</div>
)
}
}
4 changes: 2 additions & 2 deletions src/app/dashboard/(personalAccount)/settings/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SettingsNavigation from "@/components/dashboard/settings-navigation";
import DashboardTitle from "@/components/dashboard/dashboard-title";
import {Separator} from "@/components/ui/separator";

export default function PersonalAccountSettingsPage({children}) {
export default function PersonalAccountSettingsPage({children}: {children: React.ReactElement}) {
const items = [
{ name: "Profile", href: "/dashboard/settings" },
{ name: "Teams", href: "/dashboard/settings/teams" },
Expand All @@ -20,4 +20,4 @@ export default function PersonalAccountSettingsPage({children}) {
</div>
</div>
)
}
}
4 changes: 2 additions & 2 deletions src/app/dashboard/(personalAccount)/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import EditPersonalAccountName from "@/components/basejump/edit-personal-account
import {createClient} from "@/lib/supabase/server";

export default async function PersonalAccountSettingsPage() {
const supabaseClient = createClient();
const supabaseClient = await createClient();
const {data: personalAccount} = await supabaseClient.rpc('get_personal_account');

return (
<div>
<EditPersonalAccountName account={personalAccount} />
</div>
)
}
}
17 changes: 13 additions & 4 deletions src/app/dashboard/[accountSlug]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ import {createClient} from "@/lib/supabase/server";
import DashboardHeader from "@/components/dashboard/dashboard-header";
import { redirect } from "next/navigation";

export default async function PersonalAccountDashboard({children, params: {accountSlug}}: {children: React.ReactNode, params: {accountSlug: string}}) {
const supabaseClient = createClient();
export default async function PersonalAccountDashboard(props: {children: React.ReactNode, params: Promise<{accountSlug: string}>}) {
const params = await props.params;

const {
accountSlug
} = params;

const {
children
} = props;

const supabaseClient = await createClient();

const {data: teamAccount, error} = await supabaseClient.rpc('get_account_by_slug', {
slug: accountSlug
Expand All @@ -30,5 +40,4 @@ export default async function PersonalAccountDashboard({children, params: {accou
<div className="w-full p-8">{children}</div>
</>
)

}
}
14 changes: 10 additions & 4 deletions src/app/dashboard/[accountSlug]/settings/billing/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import {createClient} from "@/lib/supabase/server";
import AccountBillingStatus from "@/components/basejump/account-billing-status";
import AccountBillingStatus from "@/components/basejump/account-billing-status/account-billing-status";
import { Alert } from "@/components/ui/alert";

const returnUrl = process.env.NEXT_PUBLIC_URL as string;

export default async function TeamBillingPage({params: {accountSlug}}: {params: {accountSlug: string}}) {
const supabaseClient = createClient();
export default async function TeamBillingPage(props: {params: Promise<{accountSlug: string}>}) {
const params = await props.params;

const {
accountSlug
} = params;

const supabaseClient = await createClient();
const {data: teamAccount} = await supabaseClient.rpc('get_account_by_slug', {
slug: accountSlug
});
Expand All @@ -22,4 +28,4 @@ export default async function TeamBillingPage({params: {accountSlug}}: {params:
<AccountBillingStatus accountId={teamAccount.account_id} returnUrl={`${returnUrl}/dashboard/${accountSlug}/settings/billing`} />
</div>
)
}
}
12 changes: 11 additions & 1 deletion src/app/dashboard/[accountSlug]/settings/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@ import SettingsNavigation from "@/components/dashboard/settings-navigation";
import DashboardTitle from "@/components/dashboard/dashboard-title";
import {Separator} from "@/components/ui/separator";

export default function TeamSettingsPage({children, params: {accountSlug}}: {children: React.ReactNode, params: {accountSlug: string}}) {
export default async function TeamSettingsPage(props: {children: React.ReactNode, params: Promise<{accountSlug: string}>}) {
const params = await props.params;

const {
accountSlug
} = params;

const {
children
} = props;

const items = [
{ name: "Account", href: `/dashboard/${accountSlug}/settings` },
{ name: "Members", href: `/dashboard/${accountSlug}/settings/members` },
Expand Down
12 changes: 9 additions & 3 deletions src/app/dashboard/[accountSlug]/settings/members/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ import ManageTeamMembers from "@/components/basejump/manage-team-members";
import ManageTeamInvitations from "@/components/basejump/manage-team-invitations";
import { Alert } from "@/components/ui/alert";

export default async function TeamMembersPage({params: {accountSlug}}: {params: {accountSlug: string}}) {
const supabaseClient = createClient();
export default async function TeamMembersPage(props: {params: Promise<{accountSlug: string}>}) {
const params = await props.params;

const {
accountSlug
} = params;

const supabaseClient = await createClient();
const {data: teamAccount} = await supabaseClient.rpc('get_account_by_slug', {
slug: accountSlug
});
Expand All @@ -21,4 +27,4 @@ export default async function TeamMembersPage({params: {accountSlug}}: {params:
<ManageTeamMembers accountId={teamAccount.account_id} />
</div>
)
}
}
12 changes: 9 additions & 3 deletions src/app/dashboard/[accountSlug]/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ import EditTeamName from "@/components/basejump/edit-team-name";
import EditTeamSlug from "@/components/basejump/edit-team-slug";
import { createClient } from "@/lib/supabase/server";

export default async function TeamSettingsPage({ params: { accountSlug } }: { params: { accountSlug: string } }) {
const supabaseClient = createClient();
export default async function TeamSettingsPage(props: { params: Promise<{ accountSlug: string }> }) {
const params = await props.params;

const {
accountSlug
} = params;

const supabaseClient = await createClient();
const { data: teamAccount } = await supabaseClient.rpc('get_account_by_slug', {
slug: accountSlug
});
Expand All @@ -14,4 +20,4 @@ export default async function TeamSettingsPage({ params: { accountSlug } }: { pa
<EditTeamSlug account={teamAccount} />
</div>
)
}
}
7 changes: 4 additions & 3 deletions src/app/invitation/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import AcceptTeamInvitation from "@/components/basejump/accept-team-invitation";
import AcceptTeamInvitation from "@/components/basejump/accept-team-invitations/accept-team-invitation";
import { redirect } from "next/navigation"

export default async function AcceptInvitationPage({searchParams}: {searchParams: {token?: string}}) {
export default async function AcceptInvitationPage(props: {searchParams: Promise<{token?: string}>}) {
const searchParams = await props.searchParams;

if (!searchParams.token) {
redirect("/");
Expand All @@ -12,4 +13,4 @@ export default async function AcceptInvitationPage({searchParams}: {searchParams
<AcceptTeamInvitation token={searchParams.token} />
</div>
)
}
}
Loading