AfroWiki is a modern, AI-enhanced knowledge platform dedicated to documenting and preserving Black history, culture, and achievements worldwide. Our platform combines community-contributed content with AI-driven insights to provide a comprehensive and focused resource for exploring Black heritage and contemporary culture.
-
Authentication System
- Multiple sign-in options (GitHub, Email/Password)
- Secure session management with JWT
- User profile management with image upload
- Role-based access control (User, Editor, Admin)
-
Content Management
- Article submission and review workflow
- Rich text editing with markdown support
- Version control for content tracking
- Category and tag organization
- AI-powered content verification
-
Search & Discovery
- Advanced search with filters
- Category-based browsing
- Smart result ranking
- Content recommendations
-
Modern Stack
- Next.js 14 App Router
- TypeScript for type safety
- Prisma ORM for database management
- Tailwind CSS for styling
- Framer Motion for animations
-
Performance
- Server-side rendering
- Optimized image handling
- Responsive design
- Dark mode by default
See our Progress Tracker for detailed development status.
- Node.js 18.0 or later
- npm or yarn
- Git
-
Clone the repository:
git clone https://github.com/yourusername/AfroWiki.git cd AfroWiki
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
Required environment variables:
# Database DATABASE_URL="file:./dev.db" # Authentication NEXTAUTH_SECRET="your-secret-key" GITHUB_ID="your-github-oauth-id" GITHUB_SECRET="your-github-oauth-secret" # Deployment (required in production) NEXT_PUBLIC_BASE_URL="http://localhost:3000" # In development # NEXT_PUBLIC_BASE_URL="https://your-domain.com" # In production
-
Initialize the database:
npx prisma migrate dev npx prisma db seed
-
Start the development server:
npm run dev
The application will be available at http://localhost:3000
.
AfroWiki/
├── prisma/ # Database schema and migrations
├── public/ # Static assets
│ └── uploads/ # User-uploaded content
├── src/
│ ├── app/ # Next.js 14 app directory
│ │ ├── api/ # API routes
│ │ │ ├── admin/ # Admin-specific endpoints
│ │ │ ├── auth/ # Authentication endpoints
│ │ │ └── articles/ # Article management
│ │ ├── articles/ # Article pages
│ │ ├── auth/ # Authentication pages
│ │ ├── dashboard/ # User dashboard
│ │ ├── profile/ # User profile pages
│ │ └── settings/ # User settings
│ ├── components/ # Reusable React components
│ │ ├── articles/ # Article-related components
│ │ ├── dashboard/ # Dashboard components
│ │ ├── layout/ # Layout components
│ │ ├── ui/ # UI components
│ │ └── user/ # User-related components
│ └── lib/ # Utility functions and configurations
│ ├── auth.ts # Authentication utilities
│ ├── config.ts # Environment configuration
│ ├── db.ts # Database client
│ └── factChecker.ts # AI fact-checking system
└── types/ # TypeScript type definitions
- Configure your deployment platform (Render, DigitalOcean, etc.) with the required environment variables.
- Set
NEXT_PUBLIC_BASE_URL
to your production domain (e.g., https://your-domain.com). - Ensure your database connection string is properly configured for production.
- The application uses dynamic base URL configuration for authentication redirects
- All authentication callbacks and redirects will use the
NEXT_PUBLIC_BASE_URL
value - In development, it defaults to http://localhost:3000 if not set
- File uploads are stored in the
public/uploads
directory
We welcome contributions! Please see our Contributing Guidelines for details on how to submit pull requests, report issues, and contribute to the project.
- Fork and clone the repository
- Install dependencies:
npm install
- Set up environment variables (see above)
- Run database migrations:
npx prisma migrate dev
- Start the development server:
npm run dev
- Make your changes
- Run tests and linting:
npm run lint
- Submit a pull request
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature
- Make your changes
- Run tests and linting:
npm run lint
- Commit your changes:
git commit -m 'Add feature'
- Push to your fork:
git push origin feature/your-feature
- Create a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- The open-source community for various tools and libraries
- All contributors who help make AfroWiki better
- The Black community for inspiring this project
For questions or support, please open an issue in our GitHub repository.