Repository Name string | Filepath in the Repository string | File Contents string |
|---|---|---|
signalist_stock-tracker-app | components.json | {
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "",
"css": "app/globals.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide",
"aliases": {
"components": "@/components",
... |
signalist_stock-tracker-app | eslint.config.mjs | import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
});
const eslintConfig = [
...compat.extends("nex... |
signalist_stock-tracker-app | next.config.ts | import type { NextConfig } from "next";
const nextConfig: NextConfig = {
eslint: {
ignoreDuringBuilds: true,
}, typescript: {
ignoreBuildErrors: true
}
};
export default nextConfig;
|
signalist_stock-tracker-app | package-lock.json | {
"name": "stocks_app",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "stocks_app",
"version": "0.1.0",
"dependencies": {
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-... |
signalist_stock-tracker-app | package.json | {
"name": "stocks_app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"build": "next build --turbopack",
"start": "next start",
"lint": "eslint",
"test:db": "node scripts/test-db.mjs"
},
"dependencies": {
"@radix-ui/react-avatar": "^1.1.10",
"@r... |
signalist_stock-tracker-app | postcss.config.mjs | const config = {
plugins: ["@tailwindcss/postcss"],
};
export default config;
|
signalist_stock-tracker-app | README.md | <div align="center">
<br />
<a href="" target="_blank">
<img src="public/readme/hero.webp" alt="Project Banner">
</a>
<br />
<div>
<img src="https://img.shields.io/badge/-Next.js-black?style=for-the-badge&logoColor=white&logo=next.js&color=black"/>
<img src="https://img.shields.io/badge/-Be... |
signalist_stock-tracker-app | tsconfig.json | {
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModule... |
signalist_stock-tracker-app | .idea\material_theme_project_new.xml | <?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MaterialThemeProjectNewConfig">
<option name="metadata">
<MTProjectMetadataState>
<option name="migrated" value="true" />
<option name="pristineConfig" value="false" />
<option name="userId" value="-1373939... |
signalist_stock-tracker-app | .idea\vcs.xml | <?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project> |
signalist_stock-tracker-app | .idea\workspace.xml | <?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="8039e1aa-3cf1-4da6-86d9-6cc4a631c525" name="Changes" comment="">
<change be... |
signalist_stock-tracker-app | .idea\dictionaries\project.xml | <component name="ProjectDictionaryState">
<dictionary name="project">
<words>
<w>finnhub</w>
</words>
</dictionary>
</component> |
signalist_stock-tracker-app | .idea\inspectionProfiles\Project_Default.xml | <component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component> |
signalist_stock-tracker-app | app\globals.css | @import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
--color-sidebar-ring: var(--sidebar-ring);
--color-... |
signalist_stock-tracker-app | app\layout.tsx | import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import { Toaster } from "@/components/ui/sonner"
import "./globals.css";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
su... |
signalist_stock-tracker-app | app\(auth)\layout.tsx | import Link from "next/link";
import Image from "next/image";
import {auth} from "@/lib/better-auth/auth";
import {headers} from "next/headers";
import {redirect} from "next/navigation";
const Layout = async ({ children }: { children : React.ReactNode }) => {
const session = await auth.api.getSession({ headers: aw... |
signalist_stock-tracker-app | app\(auth)\sign-in\page.tsx | 'use client';
import { useForm } from 'react-hook-form';
import { Button } from '@/components/ui/button';
import InputField from '@/components/forms/InputField';
import FooterLink from '@/components/forms/FooterLink';
import {signInWithEmail, signUpWithEmail} from "@/lib/actions/auth.actions";
import {toast} from "son... |
signalist_stock-tracker-app | app\(auth)\sign-up\page.tsx | 'use client';
import {useForm} from "react-hook-form";
import {Button} from "@/components/ui/button";
import InputField from "@/components/forms/InputField";
import SelectField from "@/components/forms/SelectField";
import {INVESTMENT_GOALS, PREFERRED_INDUSTRIES, RISK_TOLERANCE_OPTIONS} from "@/lib/constants";
import ... |
signalist_stock-tracker-app | app\(root)\layout.tsx | import Header from "@/components/Header";
import {auth} from "@/lib/better-auth/auth";
import {headers} from "next/headers";
import {redirect} from "next/navigation";
const Layout = async ({ children }: { children : React.ReactNode }) => {
const session = await auth.api.getSession({ headers: await headers() });
... |
signalist_stock-tracker-app | app\(root)\page.tsx | import TradingViewWidget from "@/components/TradingViewWidget";
import {
HEATMAP_WIDGET_CONFIG,
MARKET_DATA_WIDGET_CONFIG,
MARKET_OVERVIEW_WIDGET_CONFIG,
TOP_STORIES_WIDGET_CONFIG
} from "@/lib/constants";
import {sendDailyNewsSummary} from "@/lib/inngest/functions";
const Home = () => {
const scri... |
signalist_stock-tracker-app | app\(root)\stocks\[symbol]\page.tsx | import TradingViewWidget from "@/components/TradingViewWidget";
import WatchlistButton from "@/components/WatchlistButton";
import {
SYMBOL_INFO_WIDGET_CONFIG,
CANDLE_CHART_WIDGET_CONFIG,
BASELINE_WIDGET_CONFIG,
TECHNICAL_ANALYSIS_WIDGET_CONFIG,
COMPANY_PROFILE_WIDGET_CONFIG,
COMPANY_FINANCIALS_WIDGET_CONFI... |
signalist_stock-tracker-app | app\api\inngest\route.ts | import {serve} from "inngest/next";
import {inngest} from "@/lib/inngest/client";
import {sendDailyNewsSummary, sendSignUpEmail} from "@/lib/inngest/functions";
export const { GET, POST, PUT } = serve({
client: inngest,
functions: [sendSignUpEmail, sendDailyNewsSummary],
})
|
signalist_stock-tracker-app | components\Header.tsx | import Link from "next/link";
import Image from "next/image";
import NavItems from "@/components/NavItems";
import UserDropdown from "@/components/UserDropdown";
import {searchStocks} from "@/lib/actions/finnhub.actions";
const Header = async ({ user }: { user: User }) => {
const initialStocks = await searchStocks... |
signalist_stock-tracker-app | components\NavItems.tsx | 'use client'
import {NAV_ITEMS} from "@/lib/constants";
import Link from "next/link";
import {usePathname} from "next/navigation";
import SearchCommand from "@/components/SearchCommand";
const NavItems = ({initialStocks}: { initialStocks: StockWithWatchlistStatus[]}) => {
const pathname = usePathname()
const... |
signalist_stock-tracker-app | components\SearchCommand.tsx | "use client"
import { useEffect, useState } from "react"
import { CommandDialog, CommandEmpty, CommandInput, CommandList } from "@/components/ui/command"
import {Button} from "@/components/ui/button";
import {Loader2, TrendingUp} from "lucide-react";
import Link from "next/link";
import {searchStocks} from "@/lib/act... |
signalist_stock-tracker-app | components\TradingViewWidget.tsx | 'use client';
import React, { memo } from 'react';
import useTradingViewWidget from "@/hooks/useTradingViewWidget";
import {cn} from "@/lib/utils";
interface TradingViewWidgetProps {
title?: string;
scriptUrl: string;
config: Record<string, unknown>;
height?: number;
className?: string;
}
const T... |
signalist_stock-tracker-app | components\UserDropdown.tsx | 'use client';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
import {useRouter} from "next/navigation... |
signalist_stock-tracker-app | components\WatchlistButton.tsx | "use client";
import React, { useMemo, useState } from "react";
// Minimal WatchlistButton implementation to satisfy page requirements.
// This component focuses on UI contract only. It toggles local state and
// calls onWatchlistChange if provided. Styling hooks match globals.css.
const WatchlistButton = ({
symbol... |
signalist_stock-tracker-app | components\forms\CountrySelectField.tsx | /* eslint-disable @typescript-eslint/no-explicit-any */
'use client';
import { useState } from 'react';
import { Control, Controller, FieldError } from 'react-hook-form';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '@/components/ui/popover';
import {
Command,
CommandEmpty,
CommandG... |
signalist_stock-tracker-app | components\forms\FooterLink.tsx | import Link from "next/link";
const FooterLink = ({ text, linkText, href }: FooterLinkProps) => {
return (
<div className="text-center pt-4">
<p className="text-sm text-gray-500">
{text}{` `}
<Link href={href} className="footer-link">
{linkTex... |
signalist_stock-tracker-app | components\forms\InputField.tsx | import React from 'react'
import {Label} from "@/components/ui/label";
import {Input} from "@/components/ui/input";
import {cn} from "@/lib/utils";
const InputField = ({ name, label, placeholder, type = "text", register, error, validation, disabled, value }: FormInputProps) => {
return (
<div className="sp... |
signalist_stock-tracker-app | components\forms\SelectField.tsx | import {Label} from "@/components/ui/label";
import {Controller} from "react-hook-form";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
const SelectField = ({ name, label, placeholder, options, control, error, required = false }: SelectFieldP... |
signalist_stock-tracker-app | components\ui\avatar.tsx | "use client"
import * as React from "react"
import * as AvatarPrimitive from "@radix-ui/react-avatar"
import { cn } from "@/lib/utils"
function Avatar({
className,
...props
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
return (
<AvatarPrimitive.Root
data-slot="avatar"
className={cn(
... |
signalist_stock-tracker-app | components\ui\button.tsx | import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all dis... |
signalist_stock-tracker-app | components\ui\command.tsx | "use client"
import * as React from "react"
import { Command as CommandPrimitive } from "cmdk"
import { SearchIcon } from "lucide-react"
import { cn } from "@/lib/utils"
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog"
function Command({
classN... |
signalist_stock-tracker-app | components\ui\dialog.tsx | "use client"
import * as React from "react"
import * as DialogPrimitive from "@radix-ui/react-dialog"
import { XIcon } from "lucide-react"
import { cn } from "@/lib/utils"
function Dialog({
...props
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
return <DialogPrimitive.Root data-slot="dialog" {...props}... |
signalist_stock-tracker-app | components\ui\dropdown-menu.tsx | "use client"
import * as React from "react"
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
import { cn } from "@/lib/utils"
function DropdownMenu({
...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
... |
signalist_stock-tracker-app | components\ui\input.tsx | import * as React from "react"
import { cn } from "@/lib/utils"
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
return (
<input
type={type}
data-slot="input"
className={cn(
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selec... |
signalist_stock-tracker-app | components\ui\label.tsx | "use client"
import * as React from "react"
import * as LabelPrimitive from "@radix-ui/react-label"
import { cn } from "@/lib/utils"
function Label({
className,
...props
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
return (
<LabelPrimitive.Root
data-slot="label"
className={cn(
... |
signalist_stock-tracker-app | components\ui\popover.tsx | "use client"
import * as React from "react"
import * as PopoverPrimitive from "@radix-ui/react-popover"
import { cn } from "@/lib/utils"
function Popover({
...props
}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
return <PopoverPrimitive.Root data-slot="popover" {...props} />
}
function PopoverTrigger(... |
signalist_stock-tracker-app | components\ui\select.tsx | "use client"
import * as React from "react"
import * as SelectPrimitive from "@radix-ui/react-select"
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
import { cn } from "@/lib/utils"
function Select({
...props
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
return <SelectPrimitiv... |
signalist_stock-tracker-app | components\ui\sonner.tsx | "use client"
import { useTheme } from "next-themes"
import { Toaster as Sonner, ToasterProps } from "sonner"
const Toaster = ({ ...props }: ToasterProps) => {
const { theme = "system" } = useTheme()
return (
<Sonner
theme={theme as ToasterProps["theme"]}
className="toaster group"
style={
... |
signalist_stock-tracker-app | database\mongoose.ts | import mongoose from 'mongoose';
const MONGODB_URI = process.env.MONGODB_URI;
declare global {
var mongooseCache: {
conn: typeof mongoose | null;
promise: Promise<typeof mongoose> | null;
}
}
let cached = global.mongooseCache;
if(!cached) {
cached = global.mongooseCache = { conn: null, p... |
signalist_stock-tracker-app | database\models\watchlist.model.ts | import { Schema, model, models, type Document, type Model } from 'mongoose';
export interface WatchlistItem extends Document {
userId: string;
symbol: string;
company: string;
addedAt: Date;
}
const WatchlistSchema = new Schema<WatchlistItem>(
{
userId: { type: String, required: true, index: true },
... |
signalist_stock-tracker-app | hooks\useDebounce.ts | 'use client';
import { useCallback, useRef } from 'react';
export function useDebounce(callback: () => void, delay: number) {
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
return useCallback(() => {
if(timeoutRef.current) {
clearTimeout(timeoutRef.current);
}
ti... |
signalist_stock-tracker-app | hooks\useTradingViewWidget.tsx | 'use client';
import { useEffect, useRef } from "react";
const useTradingViewWidget = (scriptUrl: string, config: Record<string, unknown>, height = 600) => {
const containerRef = useRef<HTMLDivElement | null>(null);
useEffect(() => {
if (!containerRef.current) return;
if (containerRef.curr... |
signalist_stock-tracker-app | lib\constants.ts | export const NAV_ITEMS = [
{ href: '/', label: 'Dashboard' },
{ href: '/search', label: 'Search' },
// { href: '/watchlist', label: 'Watchlist' },
];
// Sign-up form select options
export const INVESTMENT_GOALS = [
{ value: 'Growth', label: 'Growth' },
{ value: 'Income', label: 'Income' },
{ va... |
signalist_stock-tracker-app | lib\utils.ts | import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export const formatTimeAgo = (timestamp: number) => {
const now = Date.now();
const diffInMs = now - timestamp * 1000; // Convert to milliseconds
... |
signalist_stock-tracker-app | lib\actions\auth.actions.ts | 'use server';
import {auth} from "@/lib/better-auth/auth";
import {inngest} from "@/lib/inngest/client";
import {headers} from "next/headers";
export const signUpWithEmail = async ({ email, password, fullName, country, investmentGoals, riskTolerance, preferredIndustry }: SignUpFormData) => {
try {
const r... |
signalist_stock-tracker-app | lib\actions\finnhub.actions.ts | 'use server';
import { getDateRange, validateArticle, formatArticle } from '@/lib/utils';
import { POPULAR_STOCK_SYMBOLS } from '@/lib/constants';
import { cache } from 'react';
const FINNHUB_BASE_URL = 'https://finnhub.io/api/v1';
const NEXT_PUBLIC_FINNHUB_API_KEY = process.env.NEXT_PUBLIC_FINNHUB_API_KEY ?? '';
as... |
signalist_stock-tracker-app | lib\actions\user.actions.ts | 'use server';
import {connectToDatabase} from "@/database/mongoose";
export const getAllUsersForNewsEmail = async () => {
try {
const mongoose = await connectToDatabase();
const db = mongoose.connection.db;
if(!db) throw new Error('Mongoose connection not connected');
const users ... |
signalist_stock-tracker-app | lib\actions\watchlist.actions.ts | 'use server';
import { connectToDatabase } from '@/database/mongoose';
import { Watchlist } from '@/database/models/watchlist.model';
export async function getWatchlistSymbolsByEmail(email: string): Promise<string[]> {
if (!email) return [];
try {
const mongoose = await connectToDatabase();
const db = mo... |
signalist_stock-tracker-app | lib\better-auth\auth.ts | import { betterAuth } from "better-auth";
import { mongodbAdapter} from "better-auth/adapters/mongodb";
import { connectToDatabase} from "@/database/mongoose";
import { nextCookies} from "better-auth/next-js";
let authInstance: ReturnType<typeof betterAuth> | null = null;
export const getAuth = async () => {
if(a... |
signalist_stock-tracker-app | lib\inngest\client.ts | import { Inngest} from "inngest";
export const inngest = new Inngest({
id: 'signalist',
ai: { gemini: { apiKey: process.env.GEMINI_API_KEY! }}
})
|
signalist_stock-tracker-app | lib\inngest\functions.ts | import {inngest} from "@/lib/inngest/client";
import {NEWS_SUMMARY_EMAIL_PROMPT, PERSONALIZED_WELCOME_EMAIL_PROMPT} from "@/lib/inngest/prompts";
import {sendNewsSummaryEmail, sendWelcomeEmail} from "@/lib/nodemailer";
import {getAllUsersForNewsEmail} from "@/lib/actions/user.actions";
import { getWatchlistSymbolsByEma... |
signalist_stock-tracker-app | lib\inngest\prompts.ts | export const PERSONALIZED_WELCOME_EMAIL_PROMPT = `Generate highly personalized HTML content that will be inserted into an email template at the {{intro}} placeholder.
User profile data:
{{userProfile}}
PERSONALIZATION REQUIREMENTS:
You MUST create content that is obviously tailored to THIS specific user by:
IMPORTAN... |
signalist_stock-tracker-app | lib\nodemailer\index.ts | import nodemailer from 'nodemailer';
import {WELCOME_EMAIL_TEMPLATE, NEWS_SUMMARY_EMAIL_TEMPLATE} from "@/lib/nodemailer/templates";
export const transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: process.env.NODEMAILER_EMAIL!,
pass: process.env.NODEMAILER_PASSWORD!,
... |
signalist_stock-tracker-app | lib\nodemailer\templates.ts | export const WELCOME_EMAIL_TEMPLATE = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="format-detection" content="telephone=no">
<meta name="x-apple-disable-message-reformatting">
<title>Welcome to Sign... |
signalist_stock-tracker-app | middleware\index.ts | import { NextRequest, NextResponse } from "next/server";
import { getSessionCookie } from "better-auth/cookies";
export async function middleware(request: NextRequest) {
const sessionCookie = getSessionCookie(request);
if (!sessionCookie) {
return NextResponse.redirect(new URL("/", request.url));
... |
signalist_stock-tracker-app | scripts\test-db.mjs | import 'dotenv/config';
import mongoose from 'mongoose';
async function main() {
const uri = process.env.MONGODB_URI;
if (!uri) {
console.error('ERROR: MONGODB_URI must be set in .env');
process.exit(1);
}
try {
const startedAt = Date.now();
await mongoose.connect(uri, { bufferCommands: false ... |
signalist_stock-tracker-app | scripts\test-db.ts | import { connectToDatabase } from "../database/mongoose";
async function main() {
try {
await connectToDatabase();
// If connectToDatabase resolves without throwing, connection is OK
console.log("OK: Database connection succeeded");
process.exit(0);
} catch (err) {
console.error("ERROR: Databas... |
signalist_stock-tracker-app | types\global.d.ts | declare global {
type SignInFormData = {
email: string;
password: string;
};
type SignUpFormData = {
fullName: string;
email: string;
password: string;
country: string;
investmentGoals: string;
riskTolerance: string;
preferredIndustry:... |
screen_recording_sharing_app | .xatarc | {
"databaseURL": "https://Anil-Thapa-Magar-s-workspace-hjs5mv.eu-central-1.xata.sh/db/snap-cast",
"codegen": {
"output": "src/xata.ts"
}
} |
screen_recording_sharing_app | drizzle.config.ts | import { config } from "dotenv";
import { defineConfig } from "drizzle-kit";
config({ path: "./.env" });
export default defineConfig({
schema: "./drizzle/schema.ts",
out: "./drizzle/migrations",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL_POSTGRES!,
},
});
|
screen_recording_sharing_app | eslint.config.mjs | import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js... |
screen_recording_sharing_app | index.d.ts | declare interface User {
name: string;
email: string;
emailVerified: boolean;
image?: string | null;
createdAt: Date;
updatedAt: Date;
id: string;
}
type VideoFormValues = {
title: string;
description: string;
tags: string;
visibility: "public" | "private";
};
declare interface FormFieldProps {
... |
screen_recording_sharing_app | middleware.ts | import { NextRequest, NextResponse } from "next/server";
import { headers } from "next/headers";
import { auth } from "@/lib/auth";
import aj, { createMiddleware, detectBot, shield } from "./lib/arcjet";
export async function middleware(request: NextRequest) {
const session = await auth.api.getSession({
headers:... |
screen_recording_sharing_app | next.config.ts | import type { NextConfig } from "next";
const nextConfig: NextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "*",
port: "",
pathname: "/**",
},
],
},
... |
screen_recording_sharing_app | package-lock.json | {
"name": "snap-cast",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "snap-cast",
"version": "0.1.0",
"dependencies": {
"@arcjet/inspect": "^1.0.0-beta.6",
"@arcjet/next": "^1.0.0-beta.6",
"@xata.io/client": "^0.0.0-next.v... |
screen_recording_sharing_app | package.json | {
"name": "snap-cast",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@arcjet/inspect": "^1.0.0-beta.6",
"@arcjet/next": "^1.0.0-beta.6",
"@xata.io/client": "... |
screen_recording_sharing_app | postcss.config.mjs | const config = {
plugins: ["@tailwindcss/postcss"],
};
export default config;
|
screen_recording_sharing_app | README.md | <div align="center">
<br />
<a href="https://www.youtube.com/watch?v=honnJp7-cCU" target="_blank">
<img src="public/readme/hero.jpg" alt="Project Banner">
</a>
<br />
<div>
<img src="https://img.shields.io/badge/-Next.JS-black?style=for-the-badge&logoColor=white&logo=nextdotjs&color=black" alt=... |
screen_recording_sharing_app | tsconfig.json | {
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModule... |
screen_recording_sharing_app | xata.ts | // Generated by Xata Codegen 0.30.1. Please do not edit.
import { buildClient } from "@xata.io/client";
import type { BaseClientOptions } from "@xata.io/client";
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export type DatabaseSchema = {};
const DatabaseClient = buildClient();
const defaultOpt... |
screen_recording_sharing_app | .xata\migrations\.ledger | mig_d09ebl5442djk2h8ros0
sql_1cd2fbef96c0bb
sql_f4d1b59bd4dd16
sql_4659b44e506be0
sql_7498e765f0c177
sql_71be56a08d0323
sql_87f3a0d8db0b76
sql_7e4ee57dfe31d9
sql_addb6a1dae8612
|
screen_recording_sharing_app | app\globals.css | @import "tailwindcss";
:root {
--background: #ffffff;
--foreground: #171717;
}
@theme inline {
--font-karla: var(--font-geist-karla);
--font-satoshi: var(--font-satoshi);
--color-background: var(--background);
--color-foreground: var(--foreground);
}
@theme {
--color-blue-100: #2c325d;
--color-light-... |
screen_recording_sharing_app | app\layout.tsx | import type { Metadata } from "next";
import { Karla } from "next/font/google";
import "./globals.css";
import { satoshi } from "../fonts/font";
const geistKarla = Karla({
variable: "--font-geist-karla",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "SnapCast",
description: "A Screen Shar... |
screen_recording_sharing_app | app\(auth)\sign-in\page.tsx | "use client";
import Link from "next/link";
import Image from "next/image";
import { authClient } from "@/lib/auth-client";
const SignIn = () => {
return (
<main className="sign-in">
<aside className="testimonial">
<Link href="/">
<Image
src="/assets/icons/logo.svg"
... |
screen_recording_sharing_app | app\(root)\layout.tsx | import { Navbar } from "@/components";
const RootLayout = ({
children,
}: Readonly<{
children: React.ReactNode;
}>) => {
return (
<div>
<Navbar />
{children}
</div>
);
};
export default RootLayout;
|
screen_recording_sharing_app | app\(root)\page.tsx | import { EmptyState, Pagination, SharedHeader, VideoCard } from "@/components";
import { getAllVideos } from "@/lib/actions/video";
const page = async ({ searchParams }: SearchParams) => {
const { query, filter, page } = await searchParams;
const { videos, pagination } = await getAllVideos(
query,
filter,... |
screen_recording_sharing_app | app\(root)\profile\[id]\page.tsx | import { redirect } from "next/navigation";
import { getAllVideosByUser } from "@/lib/actions/video";
import { EmptyState, SharedHeader, VideoCard } from "@/components";
const ProfilePage = async ({ params, searchParams }: ParamsWithSearch) => {
const { id } = await params;
const { query, filter } = await searchP... |
screen_recording_sharing_app | app\(root)\upload\page.tsx | "use client";
import { useState, FormEvent, ChangeEvent, useEffect } from "react";
import {
getVideoUploadUrl,
getThumbnailUploadUrl,
saveVideoDetails,
} from "@/lib/actions/video";
import { useRouter } from "next/navigation";
import { FileInput, FormField } from "@/components";
import { useFileInput } from "@/l... |
screen_recording_sharing_app | app\(root)\video\[videoId]\page.tsx | import { redirect } from "next/navigation";
import { VideoDetailHeader, VideoInfo, VideoPlayer } from "@/components";
import { getTranscript, getVideoById } from "@/lib/actions/video";
const page = async ({ params }: Params) => {
const { videoId } = await params;
const { user, video } = await getVideoById(videoI... |
screen_recording_sharing_app | app\api\auth\[...all]\route.ts | import aj, {
ArcjetDecision,
shield,
slidingWindow,
validateEmail,
} from "@/lib/arcjet";
import ip from "@arcjet/ip";
import { auth } from "@/lib/auth";
import { toNextJsHandler } from "better-auth/next-js";
import { NextRequest } from "next/server";
const emailValidation = aj.withRule(
validateEmail({
... |
screen_recording_sharing_app | components\DropdownList.tsx | "use client";
import Image from "next/image";
import { useState } from "react";
import { cn } from "@/lib/utils";
const DropdownList = ({
options,
selectedOption,
onOptionSelect,
triggerElement,
}: DropdownListProps) => {
const [isOpen, setIsOpen] = useState(false);
const handleOptionClick = (option: st... |
screen_recording_sharing_app | components\EmptyState.tsx | import Image from "next/image";
const EmptyState = ({ icon, title, description }: EmptyStateProps) => {
return (
<section className="empty-state">
<figure>
<Image src={icon} alt="icon" width={46} height={46} />
</figure>
<article>
<h1>{title}</h1>
<p>{description}</p>
... |
screen_recording_sharing_app | components\FileInput.tsx | import Image from "next/image";
const FileInput = ({
id,
label,
accept,
file,
previewUrl,
inputRef,
onChange,
onReset,
type,
}: FileInputProps) => (
<section className="file-input">
<label htmlFor={id}>{label}</label>
<input
type="file"
id={id}
accept={accept}
hidden... |
screen_recording_sharing_app | components\FormField.tsx | const FormField = ({
id,
label,
type = "text",
value,
onChange,
placeholder,
as = "input",
options = [],
}: FormFieldProps) => (
<div className="form-field">
<label htmlFor={id}>{label}</label>
{as === "textarea" ? (
<textarea
id={id}
name={id}
value={value}
... |
screen_recording_sharing_app | components\ImageWithFallback.tsx | "use client";
import Image from "next/image";
import { useEffect, useState } from "react";
const ImageWithFallback = ({
fallback = "/assets/images/dummy.jpg",
alt,
src,
...props
}: ImageWithFallbackProps) => {
const [error, setError] = useState<boolean | null>(null);
const [imgSrc, setImgSrc] = useState<st... |
screen_recording_sharing_app | components\index.ts | export { default as Navbar } from "./Navbar";
export { default as VideoCard } from "./VideoCard";
export { default as ImageWithFallback } from "./ImageWithFallback";
export { default as FileInput } from "./FileInput";
export { default as FormField } from "./FormField";
export { default as VideoPlayer } from "./VideoPla... |
screen_recording_sharing_app | components\Navbar.tsx | "use client";
import Image from "next/image";
import Link from "next/link";
import { redirect, useRouter } from "next/navigation";
import { authClient } from "@/lib/auth-client";
import ImageWithFallback from "./ImageWithFallback";
const Navbar = () => {
const router = useRouter();
const { data: session } = authCl... |
screen_recording_sharing_app | components\Pagination.tsx | "use client";
import { cn, generatePagination, updateURLParams } from "@/lib/utils";
import Image from "next/image";
import { useRouter, useSearchParams } from "next/navigation";
type PaginationProps = {
currentPage?: number;
totalPages?: number;
queryString?: string;
filterString?: string;
};
const Paginatio... |
screen_recording_sharing_app | components\RecordScreen.tsx | "use client";
import Image from "next/image";
import { useRouter } from "next/navigation";
import { useRef, useState } from "react";
import { useScreenRecording } from "@/lib/hooks/useScreenRecording";
import { ICONS } from "@/constants";
const RecordScreen = () => {
const router = useRouter();
const videoRef = u... |
screen_recording_sharing_app | components\SharedHeader.tsx | "use client";
import Image from "next/image";
import Link from "next/link";
import { useState, useEffect } from "react";
import { useRouter, useSearchParams, usePathname } from "next/navigation";
import RecordScreen from "./RecordScreen";
import { filterOptions } from "@/constants";
import ImageWithFallback from "./Im... |
screen_recording_sharing_app | components\VideoCard.tsx | "use client";
import Image from "next/image";
import ImageWithFallback from "./ImageWithFallback";
import Link from "next/link";
import { useState } from "react";
const VideoCard = ({
id,
title,
thumbnail,
userImg,
username,
createdAt,
views,
visibility,
duration,
}: VideoCardProps) => {
const [cop... |
screen_recording_sharing_app | components\VideoDetailHeader.tsx | "use client";
import { daysAgo } from "@/lib/utils";
import { deleteVideo, updateVideoVisibility } from "@/lib/actions/video";
import Image from "next/image";
import React, { useState } from "react";
import { useRouter } from "next/navigation";
import { authClient } from "@/lib/auth-client";
import { visibilities } fro... |
screen_recording_sharing_app | components\VideoInfo.tsx | "use client";
import { cn, parseTranscript } from "@/lib/utils";
import { useState } from "react";
import EmptyState from "./EmptyState";
import { infos } from "@/constants";
const VideoInfo = ({
transcript,
createdAt,
description,
videoId,
videoUrl,
title,
}: VideoInfoProps) => {
const [info, setInfo] =... |
screen_recording_sharing_app | components\VideoPlayer.tsx | "use client";
import { cn, createIframeLink } from "@/lib/utils";
import { useEffect, useRef, useState } from "react";
import {
incrementVideoViews,
getVideoProcessingStatus,
} from "@/lib/actions/video";
import { initialVideoState } from "@/constants";
const VideoPlayer = ({ videoId, className }: VideoPlayerProp... |
screen_recording_sharing_app | constants\index.ts | export const MAX_VIDEO_SIZE = 500 * 1024 * 1024;
export const MAX_THUMBNAIL_SIZE = 10 * 1024 * 1024;
export const BUNNY = {
STREAM_BASE_URL: "https://video.bunnycdn.com/library",
STORAGE_BASE_URL: "https://sg.storage.bunnycdn.com/snapcast",
CDN_URL: "https://snapcast.b-cdn.net",
EMBED_URL: "https://iframe.medi... |
screen_recording_sharing_app | drizzle\db.ts | import { drizzle } from "drizzle-orm/xata-http";
import { getXataClient } from "../xata";
const xata = getXataClient();
export const db = drizzle(xata);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.