Loading repository data…
Loading repository data…
ravikant-diwakar / repository
GoQnA is a modern Q&A web app built with React, TypeScript, and Firebase, enabling real-time, community-driven knowledge sharing through questions and answers.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
GoQnA is a modern, full-featured Q&A Knowledge Sharing Platform built with React, TypeScript, and Firebase. It enables seamless knowledge sharing through community-driven questions and answers, supporting real-time interactions, rich text formatting, and intuitive user experience.
The platform is modular and designed to scale. Upcoming enhancements may include:
| Technology | Purpose | Version |
|---|---|---|
| React | UI Components | 18.3.1 |
| TypeScript | Type Safety | 5.5.3 |
| React Router | Navigation | 6.22.0 |
| Tailwind CSS | Styling | 3.4.1 |
| Firebase SDK | Realtime Database & Auth | 10.8.0 |
| Service | Purpose |
|---|---|
| Firebase Firestore | NoSQL Database |
| Firebase Auth | User Authentication |
| Express.js | API Endpoints (Future) |
| Vite | Build Tool |
[!NOTE] Express.js is currently scaffolded for future backend expansion—Firebase handles most real-time and auth functionality.
[!IMPORTANT] Make sure Node.js ≥18.x and a configured Firebase project are available before setup.
git clone https://github.com/ravikant-diwakar/GoQnA-Knowledge-Sharing-Platform.git
cd GoQnA-Knowledge-Sharing-Platform
npm install
cd src/firebase && npm install
# Create .env file in root directory
VITE_FIREBASE_API_KEY=your_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
npm run dev:all
[!TIP] Use
npm run dev:allto run both frontend and backend in parallel during local development.
├── server/ # Express API endpoints
├── src/
│ ├── components/ # Reusable UI components
│ ├── context/ # React Context providers
│ ├── firebase/ # Firebase configuration
│ ├── hooks/ # Custom React hooks
│ ├── pages/ # Route components
│ └── types/ # TypeScript definitions
├── public/ # Static assets
└── tailwind.config.js # Tailwind configuration
sequenceDiagram
User->>Frontend: Login/Signup
Frontend->>Firebase: Auth Request
Firebase->>Frontend: JWT Token
Frontend->>Local Storage: Store Token
Frontend->>Firestore: User Profile Data
sequenceDiagram
User->>React: Navigate to /ask
React->>Firebase: Check auth state
Firebase->>React: Auth status
alt Authenticated
React->>User: Show question form
User->>React: Submit question
React->>Firestore: Add document
else Not Authenticated
React->>User: Redirect to /login
end
// Typical data fetching pattern
const { data, loading, error } = useFirestore<Question>('questions')
.getDocuments(
[/* query conditions */],
'createdAt',
'desc',
20
);
[!NOTE] This pattern ensures real-time sync and paginated fetching for Firestore collections.
[!CAUTION] This architecture provides a scalable foundation but requires additional security measures and error handling for production readiness. The Firebase-centric approach enables rapid development but needs careful attention to security rules and query optimization.
Question Document
interface Question {
title: string;
body: string;
tags: string[];
views: number;
upvotes: number;
answerCount: number;
isSolved: boolean;
createdAt: Timestamp;
userId: string;
}
[!WARNING] The following Firestore rules are minimal and intended for development only.
[!IMPORTANT] You must customize these rules before deploying to production to prevent unauthorized access.
Production deployment requires Firestore Security Rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /questions/{questionId} {
allow read: if true;
allow create: if request.auth != null;
allow update, delete: if request.auth.uid == resource.data.userId;
}
}
}
We welcome contributions! Please follow these steps:
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Distributed under the MIT License. See LICENSE for more information.