An educational blogging website focused on teaching coding, technology, and robotics to junior and teenage students, especially those in rural areas.
- Home Page: Hero section, popular blogs, and popular videos
- Blog System: Educational blog posts with categories (Tech, Coding, Robotics, Latest)
- Video Learning: YouTube embedded videos organized by topic
- Category Pages: Filter content by Tech, Coding, Robotics, or Latest
- Admin Panel: Easy interface to create blogs and add videos
- Responsive Design: Works on desktop, tablet, and mobile devices
- React 18 with TypeScript
- Vite (build tool)
- Bootstrap 5.3.2
- Framer Motion (animations)
- GSAP (animations)
- React Router (routing)
- Node.js with Express
- MongoDB Atlas (cloud database)
- Mongoose (MongoDB ODM)
- RESTful API
- Node.js (v16 or higher)
- npm or yarn
-
Clone or navigate to the project directory
-
Install all dependencies
npm run install:all
-
Set up environment variables
Create a
.envfile in thebackenddirectory:PORT=3001 MONGODB_URI=Note: The MongoDB connection string is already configured in the code, but it's recommended to use environment variables for security.
Create a
.envfile in thefrontenddirectory (optional):VITE_API_URL=http://localhost:3001/api -
Seed the database with sample data (optional)
cd backend npm run seedThis will add sample blogs and videos to help you get started.
-
Start the development servers
From the root directory:
npm run dev
Or start them separately:
# Terminal 1 - Backend cd backend npm run dev # Terminal 2 - Frontend cd frontend npm run dev
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- Navigate to
/adminin your browser - Click on "Create Blog" tab
- Fill in the form:
- Title: The blog post title
- Content: HTML content (you can use HTML tags for formatting)
- Excerpt: Short description (optional)
- Category: Select from Tech, Coding, Robotics, or Latest
- Author: Author name (defaults to "RuralCode Team")
- Featured Image URL: Link to an image (optional)
- Click "Create Blog"
- Navigate to
/adminin your browser - Click on "Add Video" tab
- Fill in the form:
- Title: Video title
- YouTube URL or Video ID: Full YouTube URL or just the video ID
- Description: Video description (optional)
- Category: Select from Tech, Coding, Robotics, or Latest
- Custom Thumbnail URL: Optional custom thumbnail
- Click "Add Video"
ruralcode/
├── backend/
│ ├── server.js # Express server and API routes
│ ├── models/ # MongoDB models (Category, Blog, Video)
│ ├── config/ # Database configuration
│ ├── scripts/ # Database seeding script
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API service functions
│ │ ├── types/ # TypeScript type definitions
│ │ ├── App.tsx # Main app component
│ │ └── main.tsx # Entry point
│ ├── package.json
│ └── vite.config.ts
├── package.json # Root package.json
└── README.md
- Push your code to GitHub
- Connect your repository to Vercel or Netlify
- Set build command:
cd frontend && npm install && npm run build - Set output directory:
frontend/dist - Add environment variable:
VITE_API_URL=https://your-backend-url.com/api
- Push your code to GitHub
- Create a new service on Render or Railway
- Connect your repository
- Set build command:
cd backend && npm install - Set start command:
cd backend && npm start - Add environment variables:
PORT=3001MONGODB_URI=your_mongodb_connection_string
Note: MongoDB Atlas is already configured and works great for free hosting!
GET /api/blogs- Get all blogs (query params:category,popular,limit)GET /api/blogs/:slug- Get single blog by slugPOST /api/blogs- Create a new blogPUT /api/blogs/:id- Update a blogDELETE /api/blogs/:id- Delete a blog
GET /api/videos- Get all videos (query params:category,popular,limit)GET /api/videos/:id- Get single videoPOST /api/videos- Create a new videoPUT /api/videos/:id- Update a videoDELETE /api/videos/:id- Delete a video
GET /api/categories- Get all categories
The design is inspired by modern educational platforms with:
- Clean, simple interface
- Purple/blue color scheme
- Responsive layout
- Smooth animations
- Accessible for rural learners
MIT License - feel free to use this project for educational purposes.
Contributions are welcome! Please feel free to submit a Pull Request.
For issues or questions, please open an issue on the repository.
Made with ❤️ for rural students learning coding and technology.