- Knowledge (By Aris)
Provide a comprehensive and engaging learning experience on text-based content. Designed for self-learners who prefer reading over video lectures, offering courses across various subjects like programming, history, science and more.
- Self-learners who prefer text-based learning.
- Students and professionals looking for supplementary educational resources.
- Next.js: Selected for its server-side rendering capabilities, which enhance SEO and improve performance, especially beneficial for a content-rich application like Knowledge by Aris
- React: Used for building a dynamic and interactive user interface, taking advantage of its component-based architecture.
- TypeScript: Implemented for its strong typing features, which enhance code quality and maintainability.
- shadcn/ui: As a design system for building the user interface.
- Next.js API Routes: Leveraged for building API endpoints within the Next.js framework. This simplifies development by using a unified framework for both frontend and backend, eliminating the need for a separate Express.js server.
- MongoDB Atlas: Chosen as the database solution for its scalability and flexibility, particularly suitable for handling document-based data structures in a dynamic, text-based learning platform.
- Mongoose: Utilized as a MongoDB object modeling tool, designed to work in an asynchronous environment and simplify interactions with the database.
- Clerk: Integrated for robust user authentication and management. Clerk
provides a seamless and secure way to handle user sign-ups, sign-ins, and
profile management.
- Pre-built UI Components: Using Clerk's customizable components for user authentication processes.
- Session Management: Securely managed through Clerk's APIs, offering both server-side and client-side integrations.
- User Data Management: Utilizing Clerk for storing and managing user profiles and authentication states.
- Git: For version control, facilitating collaborative development and code versioning.
- ESLint: To enforce coding standards and detect potential issues in JavaScript/TypeScript.
- Prettier: An opinionated code formatter to ensure a consistent code style across the project.
- Vercel: Used for deploying the Next.js application, providing seamless integration, automatic deployments, and support for serverless functions.
- Zustand: For state management.
- Zod: For data validation.
- Fetch API: Employed for making HTTP requests from the frontend to the backend. The Fetch API is native to modern browsers, eliminating the need for additional libraries like Axios.
- Courses
- Sections
- Lessons
- _id: Unique identifier for each course.
- title: Name of the course.
- description: A brief overview of the course.
- category: The subject category of the course (e.g., programming, history, science).
- sections: An array of
ObjectIdreferences to theSectionmodel, representing the sections within the course. course is currently active and available. - createdBy:
ObjectIdreference to theUserwho created the course.
- _id: Unique identifier for each section.
- title: Title of the section.
- description: A brief overview of the section.
- courseId:
ObjectIdreference to the correspondingCourse. - lessons: An array of
ObjectIdreferences to theLessonmodel, representing the lessons within the section.
- _id: Unique identifier for each lesson.
- title: Title of the lesson.
- content: The main textual content of the lesson.
- sectionId:
ObjectIdreference to the correspondingSection
External: https://knowledgebyaris.com/ Internal: /api/
- Sign Up
- Sign In
/api/courses/:courseIdGET: Get a course by course IdPUT: Update a course by course IdDELETE: Delete a course.
/api/coursesGET: Get a list of courses.POST: Create a new course.
/api/courses/instructor/:instructorIdGET: Get a list of courses by instructor Id.
/api/courses/:courseId/sectionsPOST: Create a section for a course.
/api/sections/:sectionIdGET: Get a section with its lessonsPUT: Update a sectionDELETE: Delete a section
/api/sections/:sectionId/lessonsPOST: Create a lesson for a section.GET: Get a list of lessons for a section.
/api/lessons/:lessonIdGET: Get a lesson from IdPUT: Update a lessonDELETE: Delete a lesson
- Clone the repository
git clone git@github.com:lordaris/knowledge.git - Install the dependencies by running
npm installin the root directory. - Create a
.env.localfile in the root directory and add the following environment variables:MONGODB_URI=<your-mongodb-uri>NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<your-clerk-publishable-key>CLERK_SECRET_KEY=<your-clerk-secret-key> - Run the development server using
npm run dev.






