Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
94896d1
Init
mangledbottles Nov 7, 2023
619d0f7
🚀 feat: Implement video upload and playback features
mangledbottles Nov 9, 2023
9835fa3
Add Prisma generation to build
mangledbottles Nov 9, 2023
1defe75
Ignore env
mangledbottles Nov 9, 2023
e9b1786
Update to add source title to meta data
mangledbottles Nov 9, 2023
a85146d
Update request type to handle types
mangledbottles Nov 9, 2023
2e24b28
Update description for metadata
mangledbottles Nov 9, 2023
d4e7d7f
📦 feat: add authentication form, pages, and related functionalities
mangledbottles Nov 9, 2023
40c3b79
Add icon dependency
mangledbottles Nov 9, 2023
14867e3
🌐 feat: add Open Graph meta data with dynamic thumbnails for shared l…
mangledbottles Nov 10, 2023
92dc596
🚀 feat: add new device registration and authentication flow
mangledbottles Nov 10, 2023
fb83769
Increase preview resolution
mangledbottles Nov 10, 2023
91ca798
🎨 style: add overflow-x-hidden class to body for improved layout control
mangledbottles Nov 17, 2023
1893be8
🔀 refactor: add redirect functionality to authentication components
mangledbottles Nov 17, 2023
0025374
🔧 chore: update Prisma client and add 'sonner' and 'date-fns' packages
mangledbottles Nov 17, 2023
d4f6384
🚀 feat: Introduce DashboardHeader component for authenticated users
mangledbottles Nov 17, 2023
878f5c9
🔨 refactor: comment out console log in AuthOptions and update Devices…
mangledbottles Nov 17, 2023
d052683
🎨 style: Integrate CtaButton component into Hero section
mangledbottles Nov 17, 2023
4e05956
📱 feat: Add Devices page for user device management
mangledbottles Nov 17, 2023
b114449
📹 feat: Implement Video Library in Dashboard with Prisma
mangledbottles Nov 17, 2023
8f77f83
🆕 feat: Enhance new device registration in Dashboard
mangledbottles Nov 17, 2023
647cb58
🎞️ feat: Add robust video player interface with enhanced UI
mangledbottles Nov 17, 2023
bca6478
🔒 refactor: Enhance error handling in upload retrieval API
mangledbottles Nov 17, 2023
12b0c23
🔧 refactor: Improve redirect handling in sign-in and sign-up pages
mangledbottles Nov 18, 2023
a579371
✨ feat: Add dynamic OS detection for download page
mangledbottles Nov 18, 2023
2da8872
🚀 feat: Enhance device and video management in dashboard
mangledbottles Nov 18, 2023
cb50818
🧹 refactor: Streamline logging and update UI components for clarity
mangledbottles Nov 18, 2023
af8a681
📦 feat: install @tremor/react and shadcn libraries for UI enhancement
mangledbottles Nov 19, 2023
0ce9c2b
🔧 refactor: Update NextAuthOptions and Prisma schema for user-project…
mangledbottles Nov 19, 2023
4a90b19
👷 refactor: Enhance device revocation and upload handling in dashboar…
mangledbottles Nov 19, 2023
9b52743
🚀 feat: Add device verification endpoint in API
mangledbottles Nov 19, 2023
15d440a
🚀 feat: Add view count update route for uploads
mangledbottles Nov 19, 2023
a62794e
🎥 feat: Implement view tracking in Player component and enhance uploa…
mangledbottles Nov 19, 2023
62dee1c
🔗 refactor: Update ShareUploadButton for enhanced functionality and a…
mangledbottles Nov 19, 2023
bba1931
👥 feat: Implement TeamSwitcher component in dashboard and add project…
mangledbottles Nov 19, 2023
9aaa0f3
📊 feat: Integrate DashboardStatistics and UpgradeButton in dashboard
mangledbottles Nov 19, 2023
b82a975
🔄 refactor: Integrate IconShareUploadButton and update page styles
mangledbottles Nov 19, 2023
500bb16
🚀 feat: add DownloadButton component to dynamically display download …
mangledbottles Nov 29, 2023
d59d183
🗑️ refactor: remove 'Reset Password' page from auth module
mangledbottles Nov 29, 2023
78f7d35
🔄 refactor: standardize syntax and introduce new components in variou…
mangledbottles Nov 29, 2023
f9c41f3
🔥 feat: simplify Download page with DownloadButton and metadata utility
mangledbottles Nov 29, 2023
7a72c75
🔧 refactor: streamline user project assignment in AuthOptions
mangledbottles Nov 29, 2023
5cb6138
🛠️ refactor: enhance Player component with dynamic video loading and …
mangledbottles Nov 29, 2023
0711b91
👁️‍🗨️ style: reduce top padding in Player and ErrorBanner components …
mangledbottles Nov 29, 2023
2dae762
🌟 feat: enhance UpgradeButton with dynamic plan switching and styling
mangledbottles Nov 29, 2023
ef4623e
🔀 refactor: streamline variable handling in DashboardStatistics compo…
mangledbottles Nov 29, 2023
1c7c188
Upgrade packge
mangledbottles Nov 30, 2023
5434dc8
🚀 feat: Integrate PostHog analytics for comprehensive tracking and up…
mangledbottles Dec 5, 2023
36fe551
🔧 chore: Reorganize analytics script inclusion in layout
mangledbottles Dec 5, 2023
0915e5b
🆕 feat: Add dynamic download URL resolution based on OS in DownloadBu…
mangledbottles Dec 5, 2023
bfd6fe8
Favicon
mangledbottles Dec 6, 2023
a245025
🆕 feat: Implement subscription API route and UI alert dialog
mangledbottles Dec 6, 2023
141510c
Remove prevent default
mangledbottles Dec 6, 2023
c70c86b
🎨 refactor: streamline HTML structure in pricing.tsx for better reada…
mangledbottles Dec 10, 2023
61d692f
📝 refactor: simplify text layout and temporarily comment out action l…
mangledbottles Dec 10, 2023
1ce6064
📁 feat: add new thumbnail/route.ts API route for dynamic thumbnail ge…
mangledbottles Dec 10, 2023
cf35d96
Vercel Analytics
mangledbottles Dec 10, 2023
5bc64da
🚀 feat: Enhance DownloadButton with GitHub request tracking and error…
mangledbottles Dec 13, 2023
adf5282
🚀 feat: refactor DownloadButton, add macOS specific downloads, remove…
mangledbottles Dec 15, 2023
fef7586
🚀 feat: Add OS field to notification subscription and update utils
mangledbottles Dec 15, 2023
20e4ad4
Upgrade packages
mangledbottles Dec 16, 2023
25585fb
🚀 refactor: add new features and refactor pricing in ScreenLink app c…
mangledbottles Dec 17, 2023
9205607
📱 fix: improve mobile responsiveness in Features02 component by adjus…
mangledbottles Dec 17, 2023
c45712c
🔒 security: integrate Sentry for enhanced error tracking and monitoring
mangledbottles Dec 18, 2023
b115e53
Remove unused imports
mangledbottles Dec 18, 2023
d6890e1
Add Sharp for image optimization
mangledbottles Dec 18, 2023
8cf72bf
🔍 refactor: enhance logging in AuthOptions with project ID details
mangledbottles Dec 18, 2023
05ac161
🚨 fix: add error logging in `POST` of uploads route
mangledbottles Dec 18, 2023
9a18f12
📦 feat: Add star count badge to HeaderAction component
mangledbottles Dec 21, 2023
6d5f6fe
🔀 refactor: Enhance unauthenticated redirect in new device page
mangledbottles Dec 21, 2023
39c4a42
🛠️ refactor: Filter videos in Dashboard to exclude outdated and incom…
mangledbottles Dec 21, 2023
17439a5
🆕 feat: Add new 'Badge' component in UI library
mangledbottles Dec 21, 2023
0de1042
🌐 feat: Integrate LoopsClient and update base URL in utils
mangledbottles Dec 21, 2023
0d3452b
📈 feat: Enhance AuthOptions with user engagement tracking
mangledbottles Dec 21, 2023
ead65a2
📧 feat: Send email on user's first upload in uploads route
mangledbottles Dec 21, 2023
1ae0782
🔄 refactor: Enhance first upload tracking in uploads route
mangledbottles Dec 21, 2023
19ef112
📈 feat: Enhance signIn event handling in AuthOptions
mangledbottles Dec 21, 2023
cf375fc
🔍 refactor: enhance error message and improve code quality in AuthOpt…
mangledbottles Dec 21, 2023
a382610
🔧 refactor: improve user email handling in AuthOptions.ts
mangledbottles Dec 21, 2023
7a50a7d
Fix: typo
mangledbottles Dec 21, 2023
3f9428f
🗃️ chore: add createdAt and updatedAt fields to User model in Prisma …
mangledbottles Dec 28, 2023
530046a
📦 feat: integrate Tawk.to chat widget in app/layout.tsx for enhanced …
mangledbottles Dec 28, 2023
18f705a
🌟 feat: update pricing plan names and benefits in pricing.tsx to enha…
mangledbottles Dec 28, 2023
cc845aa
🆕 feat: implement new Tooltip component in UI and update package.json
mangledbottles Dec 28, 2023
5602385
🔧 fix: conditional rendering of star count in HeaderAction component
mangledbottles Dec 28, 2023
7ece5dc
📝 refactor: update CtaButton text to 'Start for Free' for clearer mes…
mangledbottles Dec 28, 2023
5cce4df
🆕 feat: add new Demo component and integrate it in hero.tsx
mangledbottles Dec 28, 2023
885bf5f
fix: show image via cdn
mangledbottles Dec 28, 2023
2086bcc
feat: move toaster to top right
mangledbottles Dec 28, 2023
b6025d7
🚀 feat: Enhance UI components with Footer inclusion, HeaderAction sim…
mangledbottles Dec 29, 2023
fd4eebd
🔥 feat: Simplify `hero.tsx` by removing the Download button
mangledbottles Dec 29, 2023
4d753e8
Refactor recording button and image source
mangledbottles Dec 29, 2023
39874fe
Refactor recording animation in Demo component
mangledbottles Dec 29, 2023
aba38ad
Update external scripts in layout.tsx
mangledbottles Jan 27, 2024
9bbbbc2
📈 feat: update pricing in pricing component for annual and monthly op…
mangledbottles Feb 15, 2024
91a4406
🔨 refactor: simplify toast invocation for download prompts in Demo co…
mangledbottles Feb 15, 2024
1f9b1f3
🎨 style: simplify imports and refactor video filtering logic in dashb…
mangledbottles Feb 15, 2024
3accdf3
🔄 refactor: standardize action exports and enhance project structure
mangledbottles Feb 25, 2024
c2668ea
📦 feat: implement infinite loading for uploads and enhance API routes
mangledbottles Feb 25, 2024
83bb44c
✨ feat: add UI components for enhanced app structure
mangledbottles Feb 25, 2024
0760f18
📈 feat: update Project schema defaults and add admin role
mangledbottles Feb 25, 2024
b3169b4
🔧 refactor: streamline error handling in updateTitle and enhance utils
mangledbottles Feb 25, 2024
592190d
✨ feat: enhance device authorization flow
mangledbottles Feb 25, 2024
ca7f5cf
✨ feat: enhance ViewHeader with dynamic title editing
mangledbottles Feb 25, 2024
12ebe68
✨ feat: add project settings management UI
mangledbottles Feb 25, 2024
08835db
✨ feat: implement billing page for project dashboard
mangledbottles Feb 25, 2024
bbae911
✨ feat: add project update API endpoint
mangledbottles Feb 25, 2024
9fd68cf
🚀 feat: implement team member management features
mangledbottles Feb 25, 2024
42538c8
🚀 feat: implement project invitation handling and seat checks
mangledbottles Feb 25, 2024
c2afba1
🔧 refactor: Update DashboardStatistics and TeamSwitcher for clarity a…
mangledbottles Feb 25, 2024
8f05ba4
🔐 feat: Enhance project layout and member page access control
mangledbottles Feb 25, 2024
ff15305
🔧 fix: Correct project seat check logic in invitation acceptance page
mangledbottles Feb 25, 2024
6eb53d0
🔧 fix: Update project switching logic
mangledbottles Feb 25, 2024
4f2af82
🔄 refactor: Enhance user feedback during project join process
mangledbottles Feb 25, 2024
b168bc4
Move existing desktop project into apps/desktop
mangledbottles Feb 25, 2024
d3f834a
Move screenlink-web project into apps/web
mangledbottles Feb 25, 2024
53456fc
Merge branch 'screenlink-web-temp' into merge-projects
mangledbottles Feb 25, 2024
2ae471b
Remove unused files and update .gitignore
mangledbottles Feb 25, 2024
b4e99a8
Add ESLint configuration file for desktop app
mangledbottles Feb 25, 2024
349dbf0
📝 docs: Add READMEs and update project documentation
mangledbottles Feb 25, 2024
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
1 change: 0 additions & 1 deletion .cursorignore

This file was deleted.

40 changes: 38 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
# Dependencies
/node_modules
/.pnp
.pnp.js

# Testing
/coverage

# Build directories
dist
dist-ssr
dist-electron
release
/build

# Local environment overrides
*.local
.env
.env*.local

# Editor directories and files
.vscode/*
Expand All @@ -25,3 +36,28 @@ release
*.njsproj
*.sln
*.sw?

# Misc & OS generated files
*.pem
*.tsbuildinfo
next-env.d.ts
.vscode
.cursorignore

# Debug logs
.pnpm-debug.log*

# Vercel
.vercel

# Framework-specific
.next/
/out/

# Contentlayer
.contentlayer

# Sentry Config File
.sentryclirc

.env
233 changes: 13 additions & 220 deletions README.md

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
211 changes: 211 additions & 0 deletions apps/desktop/README.md

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions apps/web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# CHANGELOG.md

## [1.0.3] - 2023-10-04

- Update Twitter icon
- Update dependencies

## [1.0.1] - 2023-05-06

- Dependencies update

## [1.0.0] - 2023-04-11

First release
77 changes: 77 additions & 0 deletions apps/web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<div align="center">
<h1 align="center">
<img src="./public/assets/screenlink.svg" width="100" />
<br>ScreenLink Web</h1>

<p align="center">
<img src="https://img.shields.io/badge/Next.js-000000.svg?style=flat-square&logo=Next.js&logoColor=white" alt="Next.js" />
<img src="https://img.shields.io/badge/React-61DAFB.svg?style=flat-square&logo=React&logoColor=black" alt="React" />
<img src="https://img.shields.io/badge/TypeScript-3178C6.svg?style=flat-square&logo=TypeScript&logoColor=white" alt="TypeScript" />
<img src="https://img.shields.io/badge/Tailwind_CSS-38B2AC.svg?style=flat-square&logo=Tailwind-CSS&logoColor=white" alt="Tailwind CSS" />
<img src="https://img.shields.io/badge/Vercel-000000.svg?style=flat-square&logo=Vercel&logoColor=white" alt="Vercel" />
</p>

<p align="center">
<a href="https://screenlink.io">Visit ScreenLink.io</a>
</p>

</div>

---

## 📖 Table of Contents

- [📖 Table of Contents](#-table-of-contents)
- [📍 Overview](#-overview)
- [🚀 Getting Started](#-getting-started)
- [🔧 Installation](#-installation)
- [📦 Features](#-features)
- [🤝 Contributing](#-contributing)

---

## 📍 Overview

ScreenLink Web is the web platform for ScreenLink, the open-source alternative to Loom for screen recording. It manages user accounts, video uploads, and serves as the landing page for new users. Built with Next.js, it leverages the best of React and server-side rendering for a fast and seamless user experience.

---

## 🚀 Getting Started

To run the development server:
```bash
yarn dev
```


Visit [http://localhost:3000](http://localhost:3000) to view the application.

## 🔧 Installation

1. Clone the repository:
```bash
git clone https://github.com/mangledbottles/screenlink
```


2. Install dependencies:
```bash
cd screenlink/apps/web && yarn
```


3. Start the development server:
```bash
yarn dev
```


## 📦 Features

- **User Account Management:** Sign up, sign in, and manage user profiles.
- **Video Uploads:** Upload and manage screen recordings.
- **Landing Page:** Informational landing page for new users.

## 🤝 Contributing

Contributions are welcome! Check out the [issues](https://github.com/mangledbottles/screenlink-web/issues) or submit a pull request.
3 changes: 3 additions & 0 deletions apps/web/actions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './updateUploadTitle';
export * from './navigate';

8 changes: 8 additions & 0 deletions apps/web/actions/navigate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use server'

import { redirect } from 'next/navigation'

export async function navigate(url: string) {
redirect(url);
}

31 changes: 31 additions & 0 deletions apps/web/actions/updateUploadTitle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
'use server';

import { prisma } from '@/app/utils';
import { z } from 'zod';
import { revalidatePath } from 'next/cache';

// Define the schema for the title update payload
const updateTitleSchema = z.object({
id: z.string(),
newTitle: z.string().min(1, "Title cannot be empty"),
});

// Adjust the function signature to match useFormState expectations
export async function updateTitle(params: { id: string, newTitle: string }) {
const result = updateTitleSchema.safeParse(params);

if (!result.success) {
return { success: false, error: 'Validation failed' }; // Handle error case
}

const { id, newTitle } = result.data;

await prisma.upload.update({
where: { id },
data: { sourceTitle: newTitle },
});

await revalidatePath(`/view/${id}`);

return { success: true };
}
76 changes: 76 additions & 0 deletions apps/web/app/(auth)/AuthForm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
"use client";

import { BuiltInProviderType, Provider } from "next-auth/providers";
import {
ClientSafeProvider,
LiteralUnion,
signIn,
useSession,
} from "next-auth/react";
import React from "react";
import {
AiFillGithub,
AiOutlineGoogle,
AiOutlineQuestionCircle,
AiOutlineSlack,
} from "react-icons/ai";

const ICONS: {
[key: string]: React.ComponentType<any>;
} = {
github: AiFillGithub,
google: AiOutlineGoogle,
slack: AiOutlineSlack,
};

const SocialButton = ({
provider,
redirect,
}: {
provider: any;
redirect?: string;
}) => {
const icon =
ICONS[provider.id as keyof typeof ICONS] || AiOutlineQuestionCircle;
return (
<div className="mb-4 w-full" key={provider.name}>
<button
onClick={() => signIn(provider.id, { callbackUrl: redirect ?? "/app" })}
type="button"
className="inline-flex items-center gap-x-1.5 rounded px-2.5 py-2.5 text-base shadow-sm text-white bg-indigo-500 hover:bg-indigo-600 w-full"
>
{React.cloneElement(React.createElement(icon), {
className: "w-5 h-5",
})}
<span className={"ml-4"}>Continue with {provider.name}</span>
</button>
</div>
);
};

export default function AuthForm({
providers,
redirect,
}: {
providers: Record<
LiteralUnion<BuiltInProviderType, string>,
ClientSafeProvider
> | null;
redirect?: string;
}) {
if (!providers) return null;
return (
<div className="flex flex-col">
{Object.values(providers).map((provider: ClientSafeProvider) => {
if (!provider?.name || !provider?.id) return null;
return (
<SocialButton
key={provider.name}
provider={provider}
redirect={redirect}
/>
);
})}
</div>
);
}
28 changes: 28 additions & 0 deletions apps/web/app/(auth)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Image from 'next/image'
import Header from '@/components/ui/header'
import Illustration from '@/public/images/auth-illustration.svg'

export default function AuthLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<>
<Header nav={false} />

<main className="grow">
<section className="relative">

{/* Illustration */}
<div className="hidden md:block absolute left-1/2 -translate-x-1/2 pointer-events-none -z-10" aria-hidden="true">
<Image src={Illustration} className="max-w-none" priority alt="Page Illustration" />
</div>

{children}

</section>
</main>
</>
)
}
56 changes: 56 additions & 0 deletions apps/web/app/(auth)/signin/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { getProviders } from "next-auth/react";
import Link from "next/link";
import AuthForm from "../AuthForm";
import { getServerSession } from "next-auth";
import { authOptions } from "@/app/api/auth/[...nextauth]/AuthOptions";
import { redirect } from "next/navigation";
import { constructMetadata } from "@/app/utils";

export const metadata = constructMetadata({
description:
"Login to ScreenLink to start recording demos with your screen and camera.",
title: "Sign In - ScreenLink",
});

export default async function SignIn({
searchParams,
}: {
searchParams?: { [key: string]: string | string[] | undefined };
}) {
const session = await getServerSession(authOptions);

// If the user is already logged in, redirect.
// Note: Make sure not to redirect to the same page
// To avoid an infinite loop!
if (session) {
redirect("/app");
}

// Get redirect from query
const redirectTo = searchParams?.redirect
? String(searchParams?.redirect)
: "/app";

return (
<div className="relative max-w-6xl mx-auto px-4 sm:px-6">
<div className="pt-32 pb-12 md:pt-40 md:pb-20">
{/* Page header */}
<div className="max-w-3xl mx-auto text-center pb-12">
<h1 className="h2 font-hkgrotesk">Welcome back!</h1>
</div>
<div className="max-w-sm mx-auto">
{/* Social logins */}
<AuthForm providers={await getProviders()} redirect={redirectTo} />
<div className="text-center mt-6">
<div className="text-sm text-slate-500">
Don't you have an account?{" "}
<Link className="font-medium text-indigo-500" href="/signup">
Get Started
</Link>
</div>
</div>
</div>
</div>
</div>
);
}
Loading