A React application with Supabase authentication, featuring GitHub OAuth integration and a protected dashboard. This is a personal experiment in developer productivity tooling, inspired by tools like ZenHub, Linear, and Zerocracy.
-
Authentication System
- Email/password registration and login
- GitHub OAuth integration
- Persistent sessions across browser refresh
- Protected routes with automatic redirects
-
User Dashboard
- Protected dashboard accessible only to authenticated users
- User profile information display
- GitHub username and avatar (when using OAuth)
- Session management and logout functionality
-
Modern UI/UX
- Responsive design with Tailwind CSS
- Dark mode support
- Loading states and error handling
- LOTR-inspired theming
- Node.js 18+ and npm
- A Supabase account and project
- (Optional) GitHub OAuth app for social login
git clone <your-repo-url>
cd anduril
npm install
- Create a new project at supabase.com
- Go to Settings โ API to find your project URL and anon key
- Copy
.env.example
to.env.local
:
cp .env.example .env.local
- Update
.env.local
with your Supabase credentials:
VITE_SUPABASE_URL=your-project-url
VITE_SUPABASE_ANON_KEY=your-anon-key
-
Go to GitHub Settings โ Developer settings โ OAuth Apps
-
Create a new OAuth App with:
- Application name:
Andรบril
(or your preferred name) - Homepage URL:
http://localhost:5173
(for development) - Authorization callback URL:
http://localhost:5173/auth/callback
- Application name:
-
Add your GitHub Client ID to
.env.local
:
VITE_GITHUB_CLIENT_ID=your-github-client-id
- In your Supabase dashboard:
- Go to Authentication โ Providers
- Enable GitHub provider
- Add your GitHub OAuth app credentials
- Set redirect URL to:
https://your-project-ref.supabase.co/auth/v1/callback
npm run dev
Visit http://localhost:5173
to see the app.
src/
โโโ components/
โ โโโ Header.tsx # Navigation with auth state
โ โโโ Layout.tsx # App layout wrapper
โ โโโ ProtectedRoute.tsx # Route protection component
โโโ contexts/
โ โโโ AuthContext.tsx # Authentication state management
โโโ lib/
โ โโโ supabase.ts # Supabase client configuration
โโโ pages/
โ โโโ HomePage.tsx # Landing page
โ โโโ LoginPage.tsx # Sign in form
โ โโโ RegisterPage.tsx # Sign up form
โ โโโ DashboardPage.tsx # Protected user dashboard
โ โโโ AboutPage.tsx # About the project
โ โโโ DocsPage.tsx # Documentation
โโโ router/
โโโ index.tsx # React Router configuration
Manages authentication state using Supabase Auth:
const { user, session, loading, signIn, signUp, signOut, signInWithGitHub } = useAuth()
Wraps components that require authentication:
<ProtectedRoute>
<DashboardPage />
</ProtectedRoute>
import { supabase } from './lib/supabase'
// Sign in
const { error } = await supabase.auth.signInWithPassword({ email, password })
// GitHub OAuth
const { error } = await supabase.auth.signInWithOAuth({
provider: 'github',
options: { redirectTo: `${window.location.origin}/dashboard` }
})
- Registration: Users can create accounts with email/password or GitHub OAuth
- Email Confirmation: Email signups require email verification
- Login: Multiple authentication methods supported
- Session Persistence: Sessions persist across browser refresh
- Protected Routes: Dashboard requires authentication
- Logout: Clean session termination
Built with Tailwind CSS featuring:
- Responsive design (mobile-first)
- Dark mode support
- Custom color palette (amber/orange theme)
- Smooth transitions and hover effects
- Loading states and error styling
Update your production environment with:
VITE_SUPABASE_URL=your-production-supabase-url
VITE_SUPABASE_ANON_KEY=your-production-anon-key
VITE_GITHUB_CLIENT_ID=your-production-github-client-id
npm run build
npm run preview # Test production build locally
- Connect your GitHub repository
- Set environment variables in your hosting platform
- Update GitHub OAuth callback URLs for production domain
- Update Supabase redirect URLs for production
- GitHub repository integration
- Productivity analytics dashboard
- Focus tools and distraction blocking
- Project management features
- Advanced user preferences
This is a personal experiment in understanding GitHub-integrated productivity tools. Named after the legendary sword from The Lord of the Rings, it's built in public as a learning journey.
Not a startup or commercial productโjust one developer figuring out what actually helps with productivity while learning how tools like ZenHub and Linear work under the hood.
This project is open source and available under the MIT License.
"The Blade that was Broken shall return to Minas Tirith." โ๏ธ