A modern, full-stack Stack Overflow clone with stunning animations and powerful features
🌐 Live Demo: https://devqna-volx.vercel.app/
Built by Debanjan | Version 2.0
- Overview
- Features
- Tech Stack
- Getting Started
- Project Structure
- Configuration
- API Documentation
- Deployment
- Contributing
DevQnA is a modern Q&A platform designed for developers to share knowledge, solve problems, and build community. Inspired by Stack Overflow, it features a clean, responsive UI with smooth animations and a robust backend powered by Appwrite.
✅ Full-featured Q&A platform with questions, answers, comments, and voting
✅ User authentication with secure login/registration
✅ Rich text editor with markdown support and code highlighting
✅ Image uploads for questions with Appwrite Storage
✅ User profiles with reputation system and avatar support
✅ Tag-based organization for easy content discovery
✅ Real-time updates for votes and interactions
✅ Responsive design optimized for all devices
✅ Beautiful animations using Anime.js and Framer Motion
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16.0.1 | React framework with App Router |
| React | 19.2.0 | UI library with RSC support |
| TypeScript | ^5 | Type-safe development |
| Tailwind CSS | ^4 | Utility-first styling |
| Anime.js | ^4.2.2 | Advanced animations |
| Framer Motion | ^12.23.24 | Animation library |
| Service | Purpose |
|---|---|
| Appwrite | Backend-as-a-Service |
| ├─ Authentication | User management & sessions |
| ├─ Database (Tables) | NoSQL document storage |
| ├─ Storage | File uploads & management |
| └─ Functions | Serverless functions |
- @uiw/react-md-editor - Markdown editor with preview
- Shadcn/ui - Radix UI component library
- Lucide React - Beautiful icon library
- React Icons - Additional icon sets
- Zustand - Lightweight state management
- Class Variance Authority - Component variants
- Secure user registration and login
- Session management with JWT tokens
- User profiles with customizable avatars
- Reputation system tracking contributions
- Password recovery (planned)
- Create Questions - Rich markdown editor with code syntax highlighting
- Upload Images - Attach screenshots and diagrams to questions
- Add Answers - Provide detailed solutions to help others
- Edit & Delete - Full CRUD operations for your content
- Markdown Support - Format content with headers, lists, code blocks, and more
- Voting System - Upvote/downvote questions and answers
- Comments - Threaded discussions on questions and answers
- Reputation Points - Earn reputation for helpful contributions
- Tags - Organize and filter content by technology/topic
- View Counts - Track question popularity
- Responsive Design - Mobile-first, works on all devices
- Dark Theme - Easy on the eyes for long coding sessions
- Smooth Animations - Polished interactions throughout
- Loading States - Elegant spinners and skeleton screens
- Error Handling - Clear feedback for user actions
- AnimatedLoader - 5 variants (dots, wave, pulse, orbit, infinity)
- AnimatedCounter - Smooth number transitions
- AnimatedProgress - Linear, circular, and gradient progress bars
- AnimatedList - Staggered list animations
- AnimatedCardReveal - Scroll-triggered card animations
- FloatingElements - Background particle effects
- GlitchText - Hover glitch effect
- TypingAnimation - Typewriter text effect
- AuroraText - Gradient aurora effect
- Particles - Interactive particle system
- ShimmerButton - Shimmering button effect
- BorderBeam - Animated border glow
Before you begin, ensure you have the following installed:
- Node.js 18.x or higher
- npm or yarn package manager
- Appwrite account (cloud.appwrite.io or self-hosted)
-
Clone the repository
git clone https://github.com/Debanjan110d/stcakoverflow_using_appwirte.git cd stcakoverflow_using_appwirte -
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile in the root directory:# Appwrite Configuration NEXT_PUBLIC_APPWRITE_HOST_URI=https://cloud.appwrite.io/v1 NEXT_PUBLIC_APPWRITE_PROJECT_ID=your_project_id_here APPWRITE_API_KEY=your_api_key_here
How to get credentials:
- Sign up at cloud.appwrite.io
- Create a new project
- Copy the Project ID from project settings
- Generate an API key with full permissions
-
Set up Appwrite database and storage
npm run setup-db
This will create:
- ✅ Users collection (profiles with avatars)
- ✅ Questions collection
- ✅ Answers collection
- ✅ Comments collection
- ✅ Votes collection
- ✅ Storage bucket for question attachments
-
Optional: Migrate existing users
npm run migrate-users
-
Start the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
For a visual guide, check out the setup tutorial: [Coming Soon]
devqna/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── (auth)/ # Authentication pages
│ │ │ ├── login/ # Login page
│ │ │ ├── register/ # Registration page
│ │ │ └── layout.tsx # Auth layout
│ │ ├── api/ # API routes
│ │ │ ├── answer/ # Answer endpoints
│ │ │ └── vote/ # Vote endpoints
│ │ ├── ask/ # Ask question page
│ │ ├── questions/ # Questions pages
│ │ │ ├── [id]/ # Question detail
│ │ │ └── page.tsx # Questions list
│ │ ├── tags/ # Browse by tags
│ │ ├── users/ # User profiles
│ │ ├── layout.tsx # Root layout
│ │ ├── page.tsx # Home page
│ │ └── globals.css # Global styles
│ │
│ ├── components/ # React components
│ │ ├── ui/ # UI library (Shadcn)
│ │ │ ├── avatar.tsx # Avatar with fallback
│ │ │ ├── button.tsx # Button variants
│ │ │ ├── card.tsx # Card component
│ │ │ ├── spinner.tsx # Loading spinner
│ │ │ └── ... # Other UI components
│ │ ├── Answers.tsx # Answer list & form
│ │ ├── Comments.tsx # Comment threads
│ │ ├── Footer.tsx # Site footer
│ │ ├── Header.tsx # Navigation header
│ │ ├── Pagination.tsx # Page navigation
│ │ ├── QuestionCard.tsx # Question preview
│ │ ├── QuestionForm.tsx # Ask question form
│ │ ├── RTE.tsx # Rich text editor
│ │ ├── Sidebar.tsx # Navigation sidebar
│ │ └── VoteButtons.tsx # Voting UI
│ │
│ ├── hooks/ # Custom React hooks
│ │ └── useAppwrite.ts # Appwrite data hooks
│ │
│ ├── lib/ # Utility functions
│ │ ├── appwrite.ts # Appwrite client SDK
│ │ └── utils.ts # Helper functions
│ │
│ ├── models/ # Appwrite configuration
│ │ ├── client/ # Client-side SDK
│ │ │ └── config.ts # Client initialization
│ │ ├── server/ # Server-side SDK
│ │ │ ├── config.ts # Server initialization
│ │ │ ├── dbSetup.ts # Database setup
│ │ │ ├── storageSetup.ts # Storage bucket setup
│ │ │ ├── user.collection.ts
│ │ │ ├── question.collection.ts
│ │ │ ├── answer.collection.ts
│ │ │ ├── comment.collection.ts
│ │ │ └── votes.collection.ts
│ │ ├── index.ts # Type definitions
│ │ └── name.ts # Collection names
│ │
│ ├── store/ # State management
│ │ └── Auth.ts # Zustand auth store
│ │
│ └── proxy.ts # Server proxy setup
│
├── scripts/ # Utility scripts
│ ├── setup-db.ts # Database initialization
│ └── migrate-users.ts # User migration script
│
├── public/ # Static assets
├── .env.local # Environment variables (create this)
├── next.config.ts # Next.js configuration
├── tailwind.config.cjs # Tailwind CSS config
├── tsconfig.json # TypeScript config
└── package.json # Project dependencies
| Variable | Description | Example |
|---|---|---|
NEXT_PUBLIC_APPWRITE_HOST_URI |
Appwrite API endpoint | https://cloud.appwrite.io/v1 |
NEXT_PUBLIC_APPWRITE_PROJECT_ID |
Your Appwrite project ID | 6734abc... |
APPWRITE_API_KEY |
Server-side API key | d123abc... |
The app uses the following database collections:
userId(string) - Appwrite account IDname(string) - Display nameemail(string) - Email addressavatar(string, optional) - Avatar URLreputation(integer) - User reputation scorebio(string, optional) - User biography
title(string) - Question titlecontent(string) - Markdown contentauthorId(string) - Author's user IDtags(array) - Topic tagsattachmentId(string, optional) - Image file ID
content(string) - Markdown contentauthorId(string) - Author's user IDquestionId(string) - Parent question ID
content(string) - Comment textauthorId(string) - Author's user IDtypeId(string) - Parent question/answer IDtype(enum) - "question" or "answer"
voteStatus(enum) - "upvoted" or "downvoted"votedById(string) - Voter's user IDtypeId(string) - Target question/answer IDtype(enum) - "question" or "answer"
- question-attachments - Stores uploaded images
- Max size: 50MB
- Allowed: jpg, png, jpeg, gif, webp, pdf
// Questions
getQuestions(limit, offset) → { documents, total }
getQuestionById(id) → Question
createQuestion(data) → { success, data }
updateQuestion(id, data) → { success, data }
deleteQuestion(id) → { success }
// Answers
getAnswersByQuestionId(id) → Answer[]
createAnswer(data) → { success, data }
updateAnswer(id, data) → { success, data }
deleteAnswer(id) → { success }
// Votes
getVotesByTypeId(id, type) → Vote[]
createOrUpdateVote(data, existingId?) → { success, data }
deleteVote(id) → { success }
// Comments
getCommentsByTypeId(id, type) → Comment[]
createComment(data) → { success, data }
// Users
getUserProfile(userId) → UserProfile
createUserProfile(data) → { success, data }
updateUserProfile(userId, data) → { success, data }
// Storage
uploadQuestionAttachment(file) → { success, fileId }
getAttachmentUrl(fileId) → string// Data fetching hooks
useQuestions(limit, offset) → { questions, total, loading, error }
useQuestion(id) → { question, loading, error, refetch }
useAnswers(questionId) → { answers, loading, error, refetch }
useVotes(id, type) → { votes, voteCount, userVote, loading, refetch }
useComments(id, type) → { comments, loading, error, refetch }
useAuthor(authorId) → { author, loading }
useStats() → { stats, loading, refetch }# Development
npm run dev # Start dev server on localhost:3000
# Production
npm run build # Build for production
npm run start # Start production server
# Database & Setup
npm run setup-db # Initialize Appwrite database and storage
npm run migrate-users # Migrate existing users to new schema
# Code Quality
npm run lint # Run ESLint checksBuilt with Anime.js and Framer Motion for smooth, eye-catching interactions:
- AnimatedLoader - 5 variants (dots, wave, pulse, orbit, infinity)
- AnimatedCounter - Smooth number transitions
- AnimatedProgress - Linear, circular, gradient progress bars
- AnimatedList - Staggered list animations
- AnimatedCardReveal - Scroll-triggered card reveals
- FloatingElements - Background particle effects
- GlitchText - Hover glitch effect
- TypingAnimation - Typewriter text effect
- AuroraText - Gradient aurora effect
- Particles - Interactive particle system
- ShimmerButton - Shimmering button effect
- BorderBeam - Animated border glow
- MagicCard - Gradient card hover effect
Built on Radix UI primitives with Tailwind CSS:
- Button - Multiple variants and sizes
- Input - Text inputs with icons
- Textarea - Multi-line text input
- Label - Form labels
- Card - Content containers
- Badge - Tag-like badges
- Avatar - User avatars with fallback
- Spinner - Loading indicators
-
Push your code to GitHub
-
Import to Vercel
- Go to vercel.com
- Click "Import Project"
- Select your repository
-
Configure environment variables
- Add all variables from
.env.local - Click "Deploy"
- Add all variables from
-
Update Appwrite settings
- Add your Vercel domain to Appwrite's allowed domains
- Update redirect URLs if using OAuth
The app can be deployed to any platform supporting Next.js:
- Netlify - Add build command:
npm run build - Railway - Auto-detects Next.js configuration
- AWS Amplify - Full Next.js support
- Digital Ocean App Platform - One-click deploy
Live Demo: https://devqna-volx.vercel.app/
- Real-time preview
- Code syntax highlighting
- Toolbar with formatting options
- Dark mode support
- Upvote/downvote questions and answers
- Vote count updates in real-time
- Visual feedback with animations
- Track user contributions
- Award points for helpful answers
- Display user stats on profile
- Full-text search across questions
- Filter by tags, date, votes
- Sort by newest, active, unanswered
- Real-time notifications
- Email verification
- Password reset functionality
- Advanced search with filters
- Tag suggestions while typing
- Badges and achievements system
- User following system
- Bookmarks and favorites
- Code playground integration
- Dark/light theme toggle
- Admin dashboard
- Content moderation tools
- Analytics and insights
- Mobile applications (React Native)
- API rate limiting
- Community guidelines enforcement
- Multi-language support (i18n)
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow the existing code style
- Write meaningful commit messages
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation as needed
Found a bug or have a feature request? Please open an issue on GitHub with:
- Bug Reports: Steps to reproduce, expected vs actual behavior, screenshots
- Feature Requests: Clear description, use cases, potential implementation
This project is licensed under the MIT License - feel free to use it for learning or commercial purposes.
MIT License
Copyright (c) 2025 Debanjan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Built with inspiration and components from:
- Stack Overflow - The original Q&A platform
- Appwrite - Amazing BaaS platform
- Shadcn/ui - Beautiful component library
- Magic UI - Animated components
- Aceternity UI - UI inspiration
- Anime.js - Animation library
- Vercel - Hosting and deployment
- The Next.js team for an amazing framework
- The React community for continuous innovation
- All open-source contributors who made this possible
Built by: Debanjan
GitHub: @Debanjan110d
Live Demo: https://devqna-volx.vercel.app/
For questions, feedback, or support:
- 💬 Open an issue on GitHub
- 📧 Email: [Your Email]
- 🐦 Twitter: [Your Twitter]
DevQnA - Where developers help developers 🚀
Made with ❤️ by Debanjan