Skip to content

Backend API for DevHub, a community platform for developers with custom authentication and real-time features

License

Notifications You must be signed in to change notification settings

usama7365/Devhub-Backend

Repository files navigation

DevHub Backend

🚀 Backend API for DevHub Community Platform

Supporting discussions, knowledge base, bug reports, blogs, and more for developers

DevHub Backend

✨ Features

  • 💬 Discussions API - Enable community discussions with tagging and voting
  • 📚 Knowledge Base API - Manage and serve community-driven documentation
  • 🐛 Bug Reports API - Report and track bugs with detailed statuses
  • 📝 Blog API - Manage and share blog posts within the community
  • 🎥 Virtual Meetings API - Integration for real-time virtual meeting functionalities
  • 🔒 Authentication - JWT-based user authentication system
  • 🌙 Real-time Features - Live updates, notifications, and chat

🛠️ Tech Stack

  • Backend:

    • Node.js
    • Express.js
    • MongoDB (via Mongoose)
    • JWT Authentication
    • REST API
  • Development Tools:

    • Nodemon (for hot-reloading during development)
    • dotenv (for managing environment variables)

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

  1. Clone the repository:
git clone https://github.com/usama7365/Devhub-Backend.git
cd Devhub-Backend
  1. Install dependencies:
npm install
  1. Set up environment variables in a .env file:
PORT="8080"
NODE_ENV=PRODUCTION
MONGO_URI=" Enter your MongoDB URI"
CLIENT_URL=http://localhost:3000

# NodeMailer
EMAIL_USER= "Enter your email address"
EMAIL_PASS= "Enter your email App password"

JWT_SECRET=bdf298405dc8fb298ef8c86921dbc5f1d7e78191
REFRESH_TOKEN_SECRET=bdf298405dc8fb24dpf8c86921dbc5f1d7e78191

MAIL= "Enter your email address"
  1. Start the development server:
npm run server

🏗️ Project Structure

src/
├── config/        # DB connection and environment settings
├── controllers/   # API route controllers for business logic
├── models/        # Mongoose models (User, Discussion, etc.)
├── routes/        # Express route handlers
├── middlewares/   # Authentication and error handling middlewares
├── utils/         # Helper functions
├── server.js/     # Entry point to start the server
└── .env           # Environment variables (not tracked in Git)

🤝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a new branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Commit your changes: git commit -m 'Add amazing feature'
  5. Push to the branch: git push origin feature/amazing-feature
  6. Open a Pull Request

📝 License

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

🌟 Core Features

Discussions API

  • Create, update, and view discussions
  • Tagging and categorization of topics
  • Upvoting and marking solutions

Knowledge Base API

  • Manage community-driven documentation
  • Categorized articles
  • Search functionality
  • Version history

Bug Reports API

  • Structured bug reporting system
  • Status tracking
  • Solution sharing
  • Integration with discussions

Blog API

  • Rich text editor
  • Image uploads
  • Tags and categories
  • Social sharing

Virtual Meetings

  • Real-time video conferencing
  • Screen sharing
  • Chat functionality
  • Meeting scheduling

🔒 Security

  • Custom authentication system (JWT)
  • Protected API routes
  • Secure data handling

🔄 Real-time Features

  • Live notifications
  • Real-time chat
  • Instant updates
  • Presence indicators

📈 Future Roadmap

  • Advanced code editor integration
  • GitHub integration
  • Team collaboration features
  • API documentation
  • Community events calendar
  • Developer portfolios
  • Job board integration
  • Mentorship program

💖 Acknowledgments

  • Node.js for backend infrastructure
  • Express.js for the server framework
  • MongoDB for NoSQL database
  • JWT for authentication
  • dotenv for environment variables management

💸 Sponsorship

If you appreciate the work I'm doing on DevHub and want to support the development of the platform, consider becoming a sponsor.

💖 Sponsor Links:

Thank you for supporting the DevHub community! 🙏

📧 Contact

For questions or support, please open an issue or contact the maintainers:

About

Backend API for DevHub, a community platform for developers with custom authentication and real-time features

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •