Official website for Refactron - an AI-powered code refactoring and optimization platform.
A modern landing page built with React, TypeScript, and Tailwind CSS.
# Clone the repository
git clone https://github.com/Refactron-ai/Refactron_Website.git
cd Refactron_Website
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env and configure your environment variables
# Start development server
npm startOpen http://localhost:3000 to view it in your browser.
By default, the login and signup pages are only accessible on the app.refactron.dev subdomain. To test them locally:
- Create a
.envfile in the project root (if you haven't already) - Add the following environment variable:
REACT_APP_ENABLE_LOCAL_AUTH=true
- Restart your development server (
npm start) - Navigate to:
When local auth is enabled, you'll see a "Local Testing Mode" indicator badge on the auth pages.
Note: The auth pages will automatically detect localhost, 127.0.0.1, and local network IPs (192.168.x.x, 10.0.x.x) when REACT_APP_ENABLE_LOCAL_AUTH is enabled.
To enable social login with Google and GitHub:
-
Google OAuth Setup:
- Go to Google Cloud Console
- Create OAuth 2.0 credentials
- Add authorized redirect URIs:
- Production:
https://app.refactron.dev/auth/callback - Local:
http://localhost:3000/auth/callback
- Production:
- Copy the Client ID and add to
.env:REACT_APP_GOOGLE_CLIENT_ID=your_google_client_id_here
-
GitHub OAuth Setup:
- Go to GitHub Developer Settings
- Create a new OAuth App
- Set Authorization callback URL:
- Production:
https://app.refactron.dev/auth/callback - Local:
http://localhost:3000/auth/callback
- Production:
- Copy the Client ID and add to
.env:REACT_APP_GITHUB_CLIENT_ID=your_github_client_id_here
-
Backend API Requirements: The OAuth flow requires backend endpoints:
POST /api/auth/google/callback- Handle Google OAuth callbackPOST /api/auth/github/callback- Handle GitHub OAuth callback
These endpoints should:
- Exchange the authorization code for tokens
- Verify the state parameter
- Create or authenticate the user
- Return a JWT token and redirect URL
Note: Without backend endpoints, OAuth buttons will show an error. The UI gracefully handles missing OAuth configuration.
- React 18 + TypeScript
- Tailwind CSS
- Framer Motion
- EmailJS
- Vercel Analytics
npm start # Start development server
npm run build # Build for production
npm test # Run tests
npm run lint # Lint codeWe welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
New to the project? Check out issues labeled good first issue.
See Workflows Documentation for details.
Having CI issues? Check the CI Troubleshooting Guide.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ by the Refactron Team