A community-driven platform designed to bridge the knowledge-sharing gap within African communities through inclusivity, multilingual support, and innovative features.
- Introduction
- Vision and Mission
- Key Features
- Tech Stack
- Architecture Overview
- Setup Instructions
- Running the Application
- Testing
- Deployment
- Contributing
- Community and Support
- Roadmap
- Screenshots
- Awards and Recognition
- License
- Acknowledgements
AskAfrica is a revolutionary Q&A platform designed to address the lack of localized, culturally relevant knowledge-sharing platforms in Africa. By leveraging cutting-edge technology and a deep understanding of African communities, AskAfrica aims to empower individuals across the continent with access to valuable information and expertise.
Our platform supports multiple languages, allowing users to interact in their native tongues, fostering inclusivity and community empowerment. Whether you're a student seeking academic guidance, a professional looking for industry insights, or simply curious about African culture and traditions, AskAfrica is your go-to resource for authentic, community-driven knowledge.
To become the premier knowledge-sharing platform for Africa, connecting minds across the continent and diaspora, and fostering a culture of collaborative learning and innovation.
Our mission is to:
- Bridge the information gap in African communities
- Promote cross-cultural understanding and knowledge exchange
- Empower African voices and expertise
- Facilitate access to quality, localized information
- Foster a spirit of curiosity, learning, and mutual support
AskAfrica offers a rich set of features designed to enhance user experience and facilitate knowledge sharing:
- Support for over 100 African languages
- Automatic translation of questions and answers
- Language preference settings for user profiles
- Ask and answer questions with ease
- Rich text editor with support for images and formatting
- Tag questions with relevant topics for easy discovery
- Upvote, downvote, and save questions for later
- Comment threads for in-depth discussions
- @mention functionality to involve specific users
- Include code snippets with syntax highlighting
- Support for multiple programming languages
- Executable code blocks for interactive learning
- Search questions by keywords, tags, or categories
- Filter results by date, popularity, or user reputation
- Personalized search results based on user interests
- Customizable user profiles showcasing expertise and contributions
- Reputation points earned through quality contributions
- Badges and achievements to recognize user milestones
- AI-powered question recommendations based on user activity
- "Related Questions" feature to explore similar topics
- Daily digest emails with personalized content suggestions
- Fully responsive design for seamless mobile usage
- Native mobile apps for iOS and Android (coming soon)
- Progressive Web App (PWA) functionality for offline access
- Sync capabilities to update content when back online
- Explore and filter job opportunities by location or category
- Direct application process for listed jobs
- Company profiles and reviews from community members
- High-contrast mode for visually impaired users
- Screen reader compatibility
- Keyboard navigation support
- User-driven moderation system
- Flagging mechanism for inappropriate content
- Trusted user program for community leaders
AskAfrica leverages a modern and robust tech stack to deliver a seamless user experience:
- Framework: Next.js 14 with TypeScript
- UI Components: React Icons, Shadcn UI
- Styling: Tailwind CSS for responsive design
- State Management: Redux Toolkit
- Forms: React Hook Form with Zod validation
- Database: MongoDB with Mongoose ODM
- API: GraphQL with Apollo Server
- Authentication: Clerk for secure user management
- Search: Elasticsearch for fast and accurate searches
- Caching: Redis for improved performance
- Deployment: Vercel for seamless deployments
- CI/CD: GitHub Actions for automated testing and deployment
- Monitoring: Sentry for error tracking and performance monitoring
- Analytics: Mixpanel for user behavior analysis
- Rich Text Editing: TinyMCE editor
- Code Highlighting: PrismJS
- Internationalization: next-i18next for multilingual support
- Job Search: Integration with JSearch API
- AI & Machine Learning: TensorFlow.js for content recommendations
AskAfrica follows a microservices architecture to ensure scalability and maintainability:
graph TD
A[Client] -->|API Requests| B[API Gateway]
B --> C[Authentication Service]
B --> D[Q&A Service]
B --> E[Search Service]
B --> F[Recommendation Service]
B --> G[Job Service]
C --> H[(User DB)]
D --> I[(Content DB)]
E --> J[(Search Index)]
F --> K[(ML Models)]
G --> L[(Job DB)]
This architecture allows us to:
- Scale individual services based on demand
- Implement new features without affecting the entire system
- Ensure high availability and fault tolerance
Ensure you have the following installed:
- Node.js (version 14 or above)
- npm or yarn package manager
- Git
- MongoDB (local instance or cloud service)
- Redis (for caching)
- Clone the repository:
git clone https://github.com/your-username/askafrica.git
cd askafrica
- Install dependencies:
npm install
- Set up environment variables:
Create a
.env.local
file in the root directory and add the following variables:
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Database
MONGODB_URI=your_mongodb_connection_string
# Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
# API Keys
OPENAI_API_KEY=your_openai_api_key
NEXT_PUBLIC_TINY_EDITOR_API_KEY=your_tiny_editor_api_key
NEXT_PUBLIC_RAPID_API_KEY=your_rapid_api_key
# Webhooks
NEXT_CLERK_WEBHOOK_SECRET=your_clerk_webhook_secret
Replace your_*
placeholders with your actual credentials.
-
Clerk Authentication:
- Sign up at Clerk
- Create a new application
- Copy your API keys from the dashboard
- Configure OAuth providers if needed
-
OpenAI API:
- Sign up at OpenAI
- Generate an API key in your account settings
-
TinyMCE Editor:
- Sign up at TinyMCE
- Obtain your API key from the dashboard
-
RapidAPI (for JSearch):
- Sign up at RapidAPI
- Subscribe to the JSearch API
- Copy your API key
- MongoDB:
- Set up a MongoDB cluster (local or cloud service like MongoDB Atlas)
- Obtain your connection string
- Add the connection string to your
.env.local
file
- In the Clerk dashboard, create a new webhook endpoint
- Set the Endpoint URL to
https://your-app-url.com/api/webhooks/clerk
- Select the required events (e.g., user.created, user.updated)
- Copy the Webhook Secret to your
.env.local
file
To test webhooks locally:
- Install ngrok
- Start your local server:
npm run dev
- In a new terminal window, start ngrok:
ngrok http 3000
- Update the webhook URL in the Clerk dashboard with the ngrok URL
- Update
NEXT_PUBLIC_APP_URL
in.env.local
with the ngrok URL
To start the development server:
npm run dev
Visit http://localhost:3000
in your browser to see the application.
For production:
npm run build
npm start
AskAfrica uses Jest for unit and integration tests, and Cypress for end-to-end testing.
To run unit and integration tests:
npm run test
To run end-to-end tests:
npm run test:e2e
AskAfrica is configured for deployment on Vercel. To deploy:
- Push your code to a GitHub repository
- Connect your repository to Vercel
- Configure your environment variables in the Vercel dashboard
- Deploy the application
For other hosting providers, ensure you set up the necessary environment variables and build commands as specified in the package.json
file.
Homepage of AskAfrica showcasing trending questions and categories
Detailed Question Page with answers, comments, and related questions
User Profile Page displaying achievements, contributions, and activity feed
Mobile-responsive view of AskAfrica, ensuring seamless usage on smartphones
Dark mode option for comfortable nighttime browsing
This project is licensed under the MIT License. See the LICENSE file for details.
We would like to thank the following organizations and projects that have made AskAfrica possible:
- Next.js for the amazing React framework
- Vercel for their superb hosting and deployment platform
- MongoDB for the robust and scalable database solution
- Clerk for simplified user authentication and management
- TinyMCE for the powerful rich text editor
- Tailwind CSS for the utility-first CSS framework
- All our open-source dependencies and their maintainers
- The amazing African developer community for their continuous support and feedback
Built with ❤️ by the AskAfrica Team
For any questions or support, please open an issue in the GitHub repository or contact our support team at mayalaplamedi.rw@gmail.com.