-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Enlighten is a comprehensive platform designed to provide an all-in-one solution for content creators and learners. The platform includes features such as content upload, interactive learning, progress tracking, and community collaboration.
The project is divided into two main components: the frontend and the backend. Below is an overview of the directory structure.
The frontend is responsible for the user interface and interaction.
enlighten/ │ ├── frontend/ │ ├── app/ │ │ ├── pages/ # Directory containing different pages │ │ │ ├── creatorpage.tsx # Creator page component │ │ │ ├── discoverpage.tsx # Discover page component │ │ │ ├── landingpage.tsx # Landing page component │ │ ├── components/ # Reusable UI components │ │ │ ├── ui/ # UI-related components (e.g., Button, Input) │ │ │ │ ├── button.tsx │ │ │ │ ├── input.tsx │ │ │ │ ├── avatar.tsx │ │ │ ├── TypeWriter.tsx # TypeWriter component │ │ │ ├── AnimatedLogo.tsx # AnimatedLogo component │ │ ├── layout/ # Layout components │ │ │ ├── header.tsx # Header component │ │ │ ├── footer.tsx # Footer component │ │ ├── api/ # API routes │ │ │ ├── auth.tsx # Authentication API routes │ │ ├── page.tsx # Main entry point for the Home page │ ├── public/ # Public assets │ │ ├── images/ # Images and icons │ │ └── favicon.ico # Favicon │ ├── styles/ # Global and component-specific styles │ │ └── globals.css # Global styles │ ├── .env.local # Environment variables for frontend │ ├── package.json # Project dependencies and scripts for frontend │ ├── tailwind.config.js # Tailwind CSS configuration │ ├── postcss.config.js # PostCSS configuration │ └── README.md # Frontend documentation │ ├── backend/ │ ├── src/ # Source files │ │ ├── controllers/ # Route controllers │ │ │ ├── authController.js # Authentication controller │ │ │ ├── contentController.js # Content management controller │ │ ├── models/ # Database models │ │ │ ├── User.js # User model │ │ │ ├── Content.js # Content model │ │ ├── routes/ # API routes │ │ │ ├── authRoutes.js # Authentication routes │ │ │ ├── contentRoutes.js # Content management routes │ │ ├── middleware/ # Middleware functions │ │ │ ├── authMiddleware.js # Authentication middleware │ │ ├── config/ # Configuration files │ │ │ ├── db.js # Database configuration │ │ ├── server.js # Main entry point for the server │ ├── .env # Environment variables for backend │ ├── package.json # Project dependencies and scripts for backend │ ├── README.md # Backend documentation │ ├── jest.config.js # Jest configuration for testing │ ├── nodemon.json # Nodemon configuration for development │ ├── .gitignore # Git ignore file for backend │ └── .prettierrc # Prettier configuration for code formatting │ └── README.md # Overall project documentation
Follow these steps to set up the project locally.
- Navigate to the
frontend
directory: cd enlighten/frontend
markdown Copy code 2. Install the dependencies: npm install
markdown
Copy code
3. Create a .env.local
file with the necessary environment variables.
- Navigate to the
backend
directory: cd enlighten/backend
markdown Copy code 2. Install the dependencies: npm install
markdown
Copy code
3. Set up the environment variables in a .env
file.
4. Start the MongoDB server if it’s not already running.
- Navigate to the
frontend
directory: cd enlighten/frontend
markdown Copy code 2. Start the development server: npm run dev
markdown Copy code
- Navigate to the
backend
directory: cd enlighten/backend
markdown Copy code 2. Start the backend server: npm start
markdown Copy code
-
POST
/api/auth/login
- User login -
POST
/api/auth/signup
- User signup
-
GET
/api/content
- Get all content -
POST
/api/content
- Create new content -
GET
/api/content/:id
- Get content by ID
To deploy the project, follow these steps:
- Set up environment variables on the server.
- Build the frontend and backend: npm run build
markdown Copy code 3. Start the servers on your hosting environment.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.