Anonify - Where your identity remains a secret. A modern anonymous feedback platform that allows users to send and receive messages without revealing their identity.
- Anonymous Messaging: Send messages to users without revealing your identity
- User Authentication:
- Credentials-based authentication (email/username & password)
- OAuth integration (Google & GitHub)
- Secure password hashing with bcryptjs
- Message Management:
- Toggle message acceptance on/off
- View and manage received messages
- Delete unwanted messages
- Real-time message updates
- AI-Powered Suggestions: Get AI-generated message suggestions using Google's Generative AI
- User Dashboard:
- Manage your profile
- Copy and share your profile URL
- Track all received messages
- Responsive Design: Beautiful UI that works seamlessly on desktop and mobile
- Dark Mode: Theme switching with next-themes
- Type-Safe: Built with TypeScript and Zod validation
- Next.js 15 - React framework with App Router
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS 4 - Styling
- Radix UI - Accessible component primitives
- React Hook Form - Form management
- TanStack Query - Data fetching and caching
- Sonner - Toast notifications
- NextAuth.js 5 - Authentication
- Prisma - Database ORM
- PostgreSQL - Database
- Google Generative AI - AI-powered message suggestions
- Zod - Schema validation
- bcryptjs - Password hashing
- clsx & tailwind-merge - Class management
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- pnpm (recommended) or npm/yarn
- PostgreSQL database
- Git
-
Clone the repository
git clone https://github.com/lra8dev/anonify.git cd anonify -
Install dependencies
pnpm install
-
Set up environment variables
Create a
.envfile in the root directory:# Database DATABASE_URL="postgresql://user:password@localhost:5432/anonify" DIRECT_URL="postgresql://user:password@localhost:5432/anonify" # NextAuth AUTH_SECRET="your-secret-key-here" # Generate with: openssl rand -base64 32 AUTH_TRUST_HOST=true # OAuth Providers AUTH_GITHUB_ID="your-github-oauth-id" AUTH_GITHUB_SECRET="your-github-oauth-secret" AUTH_GOOGLE_ID="your-google-oauth-id" AUTH_GOOGLE_SECRET="your-google-oauth-secret" # Google AI GOOGLE_AI_API_KEY="your-google-ai-api-key"
-
Set up the database
pnpm db:generate pnpm db:migrate
-
Run the development server
pnpm dev
-
Open your browser
Navigate to http://localhost:3000
pnpm dev # Start development server with Turbopack
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Run ESLint
pnpm db:generate # Generate Prisma client
pnpm db:migrate # Run database migrations
pnpm db:deploy # Deploy migrations to production
pnpm db:reset # Reset database
pnpm db:studio # Open Prisma Studioanonify/
βββ app/ # Next.js App Router
β βββ (auth)/ # Authentication pages (sign-in, sign-up)
β βββ (landing)/ # Landing page
β βββ api/ # API routes
β βββ dashboard/ # User dashboard
β βββ u/[username]/ # Public user profile pages
β βββ globals.css # Global styles
βββ auth/ # NextAuth configuration
βββ components/ # Reusable React components
β βββ ui/ # UI components (shadcn/ui)
β βββ navbar/ # Navigation component
β βββ oauth-signin/ # OAuth authentication component
βββ constants/ # App constants
βββ context/ # React context providers
βββ icons/ # Custom icon components
βββ lib/ # Utility libraries
β βββ db/ # Database clients
β βββ validators/ # Zod schemas
β βββ bcrypt-methods/ # Password hashing utilities
βββ prisma/ # Prisma schema and migrations
βββ types/ # TypeScript type definitions
βββ utils/ # Helper functions
-
GitHub OAuth
- Go to GitHub Developer Settings
- Create a new OAuth App
- Set callback URL to:
http://localhost:3000/api/auth/callback/github - Copy Client ID and Client Secret to
.env
-
Google OAuth
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Set callback URL to:
http://localhost:3000/api/auth/callback/google - Copy Client ID and Client Secret to
.env
- Go to Google AI Studio
- Create an API key
- Add it to
.envasGOOGLE_AI_API_KEY
- Sign Up: Create an account using email/username and password, or use OAuth (Google/GitHub)
- Enable Messages: Toggle message acceptance in your dashboard
- Share Your Link: Copy your unique profile URL and share it with others
- Receive Messages: Users can send you anonymous messages through your profile link
- Manage Messages: View, read, and delete messages from your dashboard
- Send Messages: Visit any user's profile to send them anonymous messages
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
lra8dev
- GitHub: @lra8dev
- Next.js for the amazing framework
- shadcn/ui for the beautiful UI components
- Vercel for hosting and deployment
- All contributors and supporters of this project
If you have any questions or need help, please open an issue on GitHub.
Made with β€οΈ by lra8dev