Skip to content

Anonify is a platform designed for users to express themselves freely without revealing their identity. Built with a strong emphasis on privacy and security, it provides a safe space for sharing thoughts, feedback, or confessions.

License

Notifications You must be signed in to change notification settings

lra8dev/Anonify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

72 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Anonify 🎭

Next.js React TypeScript Prisma License

Anonify - Where your identity remains a secret. A modern anonymous feedback platform that allows users to send and receive messages without revealing their identity.

🌟 Features

  • 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

πŸš€ Tech Stack

Frontend

Backend

Validation & Utilities

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18 or higher)
  • pnpm (recommended) or npm/yarn
  • PostgreSQL database
  • Git

πŸ› οΈ Installation

  1. Clone the repository

    git clone https://github.com/lra8dev/anonify.git
    cd anonify
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    Create a .env file 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"
  4. Set up the database

    pnpm db:generate
    pnpm db:migrate
  5. Run the development server

    pnpm dev
  6. Open your browser

    Navigate to http://localhost:3000

πŸ“¦ Available Scripts

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 Studio

πŸ—‚οΈ Project Structure

anonify/
β”œβ”€β”€ 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

πŸ” Authentication Setup

OAuth Providers

  1. 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
  2. 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

Google AI API

  1. Go to Google AI Studio
  2. Create an API key
  3. Add it to .env as GOOGLE_AI_API_KEY

🎯 Usage

  1. Sign Up: Create an account using email/username and password, or use OAuth (Google/GitHub)
  2. Enable Messages: Toggle message acceptance in your dashboard
  3. Share Your Link: Copy your unique profile URL and share it with others
  4. Receive Messages: Users can send you anonymous messages through your profile link
  5. Manage Messages: View, read, and delete messages from your dashboard
  6. Send Messages: Visit any user's profile to send them anonymous messages

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

lra8dev

πŸ™ Acknowledgments

  • 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

πŸ“ž Support

If you have any questions or need help, please open an issue on GitHub.


Made with ❀️ by lra8dev

About

Anonify is a platform designed for users to express themselves freely without revealing their identity. Built with a strong emphasis on privacy and security, it provides a safe space for sharing thoughts, feedback, or confessions.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published