diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..4ae0440 --- /dev/null +++ b/.env.example @@ -0,0 +1,7 @@ +# Supabase (required) +NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url +NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key +SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key + +# OpenAI (required) +OPENAI_API_KEY=your_openai_api_key diff --git a/app/auth/layout.tsx b/app/auth/layout.tsx new file mode 100644 index 0000000..5451132 --- /dev/null +++ b/app/auth/layout.tsx @@ -0,0 +1,13 @@ +export default function AuthLayout({ + children, +}: { + children: React.ReactNode; +}) { + // Auth pages handle their own full-screen layout + // This layout removes the container wrapper from the root layout + return ( +
+ {children} +
+ ); +} diff --git a/lib/content/auth.json b/lib/content/auth.json new file mode 100644 index 0000000..c2e164c --- /dev/null +++ b/lib/content/auth.json @@ -0,0 +1,81 @@ +{ + "login": { + "title": "Welcome back", + "subtitle": "Sign in to continue your research", + "form": { + "emailLabel": "Email Address", + "emailPlaceholder": "you@example.com", + "passwordLabel": "Password", + "passwordPlaceholder": "Enter your password", + "rememberMe": "Remember me", + "forgotPassword": "Forgot password?", + "submitButton": "Sign In", + "submittingButton": "Signing in..." + }, + "footer": { + "noAccount": "Don't have an account?", + "signUpLink": "Sign up for free" + }, + "features": [ + { + "title": "Chat with Your Papers", + "description": "Ask questions and get instant answers with precise citations from your research documents." + }, + { + "title": "Organize Your Library", + "description": "Keep all your research papers organized in collections for easy access and management." + }, + { + "title": "AI-Powered Insights", + "description": "Leverage advanced AI to understand complex papers and extract key information effortlessly." + } + ], + "errors": { + "default": "Failed to sign in. Please check your credentials." + } + }, + "signup": { + "title": "Create your account", + "subtitle": "Start exploring research papers with AI", + "sidebarTitle": "Start your research journey", + "form": { + "nameLabel": "Full Name", + "namePlaceholder": "John Doe", + "emailLabel": "Email Address", + "emailPlaceholder": "you@example.com", + "passwordLabel": "Password", + "passwordPlaceholder": "Create a password", + "passwordHint": "Must be at least 6 characters", + "termsPrefix": "I agree to the", + "termsLink": "Terms and Conditions", + "submitButton": "Create Account", + "submittingButton": "Creating account..." + }, + "footer": { + "hasAccount": "Already have an account?", + "signInLink": "Sign in" + }, + "benefits": [ + { + "title": "Instant Setup", + "description": "Upload your first paper and start chatting in under a minute. No complex configuration needed." + }, + { + "title": "Secure & Private", + "description": "Your research papers are encrypted and only accessible to you. We take your privacy seriously." + }, + { + "title": "Free to Start", + "description": "Get started with generous free limits. No credit card required to explore the platform." + } + ], + "success": { + "title": "Check your email", + "message": "We've sent a confirmation link to {email}. Click the link to activate your account.", + "backButton": "Back to Sign In" + }, + "errors": { + "default": "Failed to create account. Please try again." + } + } +} diff --git a/lib/content/common.json b/lib/content/common.json new file mode 100644 index 0000000..baf6634 --- /dev/null +++ b/lib/content/common.json @@ -0,0 +1,10 @@ +{ + "brand": { + "name": "ThinkFolio", + "tagline": "Reading that talks back. Think faster. Struggle less.", + "motto": "Think faster. Struggle less." + }, + "footer": { + "poweredBy": "Powered by" + } +} diff --git a/lib/content/index.ts b/lib/content/index.ts new file mode 100644 index 0000000..870af32 --- /dev/null +++ b/lib/content/index.ts @@ -0,0 +1,122 @@ +import commonContent from './common.json'; +import authContent from './auth.json'; +import landingContent from './landing.json'; + +// Type definitions +export interface FeatureItem { + title: string; + description: string; +} + +export interface StepItem { + step: string; + title: string; + description: string; +} + +export interface LandingContent { + hero: { + title: string; + subtitle: string; + primaryCta: string; + secondaryCta: string; + }; + features: { + title: string; + items: FeatureItem[]; + }; + moreFeatures: { + title: string; + items: FeatureItem[]; + }; + howItWorks: { + title: string; + steps: StepItem[]; + }; + cta: { + title: string; + subtitle: string; + button: string; + }; +} + +export interface CommonContent { + brand: { + name: string; + tagline: string; + motto: string; + }; + footer: { + poweredBy: string; + }; +} + +export interface LoginContent { + title: string; + subtitle: string; + form: { + emailLabel: string; + emailPlaceholder: string; + passwordLabel: string; + passwordPlaceholder: string; + rememberMe: string; + forgotPassword: string; + submitButton: string; + submittingButton: string; + }; + footer: { + noAccount: string; + signUpLink: string; + }; + features: FeatureItem[]; + errors: { + default: string; + }; +} + +export interface SignupContent { + title: string; + subtitle: string; + sidebarTitle: string; + form: { + nameLabel: string; + namePlaceholder: string; + emailLabel: string; + emailPlaceholder: string; + passwordLabel: string; + passwordPlaceholder: string; + passwordHint: string; + termsPrefix: string; + termsLink: string; + submitButton: string; + submittingButton: string; + }; + footer: { + hasAccount: string; + signInLink: string; + }; + benefits: FeatureItem[]; + success: { + title: string; + message: string; + backButton: string; + }; + errors: { + default: string; + }; +} + +export interface AuthContent { + login: LoginContent; + signup: SignupContent; +} + +// Typed exports +export const common: CommonContent = commonContent; +export const auth: AuthContent = authContent; +export const landing: LandingContent = landingContent; + +// Convenience exports +export const brand = common.brand; +export const login = auth.login; +export const signup = auth.signup; diff --git a/lib/content/landing.json b/lib/content/landing.json new file mode 100644 index 0000000..8494743 --- /dev/null +++ b/lib/content/landing.json @@ -0,0 +1,75 @@ +{ + "hero": { + "title": "Read and understand research papers", + "subtitle": "A smart PDF reader that lets you read your papers and ask questions about anything you don't understand. Get instant answers with precise citations.", + "primaryCta": "Get Started", + "secondaryCta": "Sign In" + }, + "features": { + "title": "Everything you need to understand research", + "items": [ + { + "title": "Read Your PDFs", + "description": "A clean, distraction-free PDF reader built for research. Read your papers comfortably with full navigation." + }, + { + "title": "Ask Questions", + "description": "Stuck on a concept? Just ask. Get clear explanations for anything you don't understand in the paper." + }, + { + "title": "Precise Citations", + "description": "Every answer comes with exact page references so you can jump right to the source and verify." + }, + { + "title": "Create Collections", + "description": "Organize your research into custom collections. Group papers by topic, project, or however you work best." + } + ] + }, + "moreFeatures": { + "title": "Designed for researchers", + "items": [ + { + "title": "Access Anywhere", + "description": "Your papers are securely stored in the cloud. Read and chat with your library from any device, anywhere." + }, + { + "title": "AI-Powered Insights", + "description": "Powered by advanced AI to understand complex academic language and break down difficult concepts for you." + }, + { + "title": "Save for Later", + "description": "Build your reading queue with papers you want to explore. Never lose track of important research again." + }, + { + "title": "Dark Mode", + "description": "Easy on the eyes during those late-night reading sessions. Full dark mode support throughout the app." + } + ] + }, + "howItWorks": { + "title": "How it works", + "steps": [ + { + "step": "1", + "title": "Upload your PDF", + "description": "Drag and drop or browse to upload your research paper. We support files up to 5MB." + }, + { + "step": "2", + "title": "Read your paper", + "description": "Open your PDF in our clean reader. Navigate pages, zoom, and read comfortably." + }, + { + "step": "3", + "title": "Ask when stuck", + "description": "Don't understand something? Ask the AI and get clear explanations with page citations." + } + ] + }, + "cta": { + "title": "Ready to read smarter?", + "subtitle": "Join researchers who understand papers faster with ThinkFolio. Free to get started.", + "button": "Create Free Account" + } +} diff --git a/lib/contexts/AuthContext.tsx b/lib/contexts/AuthContext.tsx index ffa3c23..1ef31e2 100644 --- a/lib/contexts/AuthContext.tsx +++ b/lib/contexts/AuthContext.tsx @@ -129,4 +129,4 @@ export const useAuth = () => { throw new Error('useAuth must be used within an AuthProvider'); } return context; -} \ No newline at end of file +}