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
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions app/auth/layout.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="fixed inset-0 z-50 bg-gray-50 dark:bg-gray-900 overflow-auto">
{children}
</div>
);
}
81 changes: 81 additions & 0 deletions lib/content/auth.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
10 changes: 10 additions & 0 deletions lib/content/common.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
122 changes: 122 additions & 0 deletions lib/content/index.ts
Original file line number Diff line number Diff line change
@@ -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;
75 changes: 75 additions & 0 deletions lib/content/landing.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
2 changes: 1 addition & 1 deletion lib/contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ export const useAuth = () => {
throw new Error('useAuth must be used within an AuthProvider');
}
return context;
}
}