diff --git a/pages/concepts/_meta.json b/pages/concepts/_meta.json index 5a1b913..3b93bab 100644 --- a/pages/concepts/_meta.json +++ b/pages/concepts/_meta.json @@ -1,4 +1,3 @@ { - "infra-overview": "Infrastructure Overview", - "api-overview": "API Overview" + "infra-overview": "Infrastructure Overview" } diff --git a/pages/concepts/api-overview.mdx b/pages/concepts/api-overview.mdx deleted file mode 100644 index c585721..0000000 --- a/pages/concepts/api-overview.mdx +++ /dev/null @@ -1,7 +0,0 @@ -import { Callout } from 'nextra-theme-docs' - -# API Overview - - - This page is still a work in progress. - diff --git a/pages/concepts/infra-overview.mdx b/pages/concepts/infra-overview.mdx index c7c0fdd..e178c2f 100644 --- a/pages/concepts/infra-overview.mdx +++ b/pages/concepts/infra-overview.mdx @@ -5,9 +5,9 @@ import Image from "next/image"; LearnHouse is separated into two parts/codebases : -- **Frontend** : Web interface for the user to interact with the application, some parts are server rendered and some are client rendered, we use React Server Components enabled by Next.js 13 +- **Frontend** : Web interface for the user to interact with the application, some parts are server rendered and some are client rendered, we use React Server Components enabled by Next.js 14 -- **Backend** : Backend code in Python using FastAPI that handles : Storage, Authentication, Uploads etc. +- **Backend** : Backend code in Python using FastAPI that handles : Storage, Authentication, Uploads, AI etc. Here is a diagram that explains the infrastructure in a simple way to get started : diff --git a/pages/features/_meta.json b/pages/features/_meta.json index bfff855..a758f65 100644 --- a/pages/features/_meta.json +++ b/pages/features/_meta.json @@ -2,5 +2,7 @@ "courses": "Courses", "activities": "Activities", "collections": "Collections", + "ai": "LearnHouse AI", + "users-management": "Users Management", "trail": "Trail" } diff --git a/pages/features/ai/_meta.json b/pages/features/ai/_meta.json new file mode 100644 index 0000000..4757cb6 --- /dev/null +++ b/pages/features/ai/_meta.json @@ -0,0 +1,4 @@ +{ + "students": "Students", + "teachers": "Teachers" +} diff --git a/pages/features/ai/students.mdx b/pages/features/ai/students.mdx new file mode 100644 index 0000000..677e6d5 --- /dev/null +++ b/pages/features/ai/students.mdx @@ -0,0 +1,13 @@ +# For students + +LearnHouse AI provides different features for students to help them in their learning process. + +
+Hello + + +- Chat with activity : Students can chat with the bot and ask questions about the course. The bot will answer the questions and provide the students with the necessary information. + +## Context aware + +LearnHouse AI is context aware. It can understand the context of the course and the activity and replies accordingly. \ No newline at end of file diff --git a/pages/features/ai/teachers.mdx b/pages/features/ai/teachers.mdx new file mode 100644 index 0000000..09c50b1 --- /dev/null +++ b/pages/features/ai/teachers.mdx @@ -0,0 +1,16 @@ +# For teachers + +LearnHouse AI provides different features to improve teachers workflow while teaching online & writing content. + +
+Hello + + +- Writer : Write content with AI assistance. +- Continue writing : Based on a paragraph or a sentence, AI can continue writing the content. +- Make longer : AI can make the content longer bsed on the text selected. +- Translate : Translate the content to different languages. + +## Context aware + +LearnHouse AI is context aware. It can understand the context of the content and provide suggestions based on the context of your course and previous paragraphs. \ No newline at end of file diff --git a/pages/features/users-management.mdx b/pages/features/users-management.mdx new file mode 100644 index 0000000..a453cd0 --- /dev/null +++ b/pages/features/users-management.mdx @@ -0,0 +1,14 @@ +import Image from 'next/image' + +# Users management + +You can manage users from the admin dashboard. You can add, remove, and edit users. You can also assign roles to users. + +
+Hello + +- Users : Add new users, remove users, and edit their roles and permissions. +- Invite users : Invite new users to join your organization by sending them an email and assigning them to a UserGroup. +- Signup Acess : Enable or disable the signup access for new users, if disabled only userd with an invite code can join the organization. + + diff --git a/pages/self-hosting/_meta.json b/pages/self-hosting/_meta.json index c8255b8..bf85572 100644 --- a/pages/self-hosting/_meta.json +++ b/pages/self-hosting/_meta.json @@ -3,6 +3,6 @@ "configuration": "Configuration", "organization-hosting-modes": "Organization Hosting Modes", "docker-and-kube": "Docker and Kubernetes", - "vercel": "Vercel", + "ai": "AI", "content-storage": "Content Storage" } diff --git a/pages/self-hosting/ai.mdx b/pages/self-hosting/ai.mdx new file mode 100644 index 0000000..bb957db --- /dev/null +++ b/pages/self-hosting/ai.mdx @@ -0,0 +1,87 @@ +import { Callout } from 'nextra/components' + +# AI Self Hosting + +AI can be used in your self hosted instance of LearnHouse, it is powered by [OpenAI](https://openai.com) and you will need to create an account and get an API key to use it. + +To enable AI in your self hosted instance, you will need to follow the steps below. + +## Enabling AI + +Either use environment variables or the config file to enable AI. + +### Environment Variables + +- `LEARNHOUSE_OPENAI_API_KEY` - Your OpenAI API key +- `LEARNHOUSE_IS_AI_ENABLED` - Set to `true` to enable AI, `false` to disable it + +### Config file + +```json filename="config.yaml" copy {18-20} +site_name: LearnHouse +site_description: LearnHouse is an open-source platform tailored for learning experiences. +contact_email: hi@learnhouse.app + +hosting_config: + domain: learnhouse.app + ssl: true + allowed_origins: + - http://localhost:3000 + - http://localhost:3001 + cookies_config: + domain: ".localhost" + allowed_regexp: '\b((?:https?://)[^\s/$.?#].[^\s]*)\b' + +database_config: + sql_connection_string: postgresql://learnhouse:learnhouse@postgresql:27017/ + +ai_config: + openai_api_key: "your-openai-api-key" + is_ai_enabled: true +``` +## Organizations + +AI is enabled on a per-organization basis, you can enable or disable AI for each organization, choose what model and features to use and set the usage limit. + + + The Organization config model is subject to change in future versions of LearnHouse + + +### Organization Config table + +Every Organization comes with a dedicated row in the `organizationconfig` table, you can find the `config` json column and set the AI configuration for that organization. + +```json filename="organizationconfig > your organization row > config column" copy {2-15} +{ + "AIConfig": { + "ai_model": "gpt-3.5-turbo", + "embeddings": "text-embedding-ada-002", + "enabled": true, + "features": { + "activity_ask": true, + "course_ask": false, + "editor": true, + "global_ai_ask": false + }, + "limits": { + "limits_enabled": true, + "max_asks": 200 + } + }, + "GeneralConfig": { + "active": true, + "color": "#000000", + "limits": { + "limits_enabled": false, + "max_staff": 0, + "max_storage": 0, + "max_users": 0 + }, + "users": { + "signup_mechanism": "inviteOnly" + } + } +} +``` + + diff --git a/pages/self-hosting/overview.mdx b/pages/self-hosting/overview.mdx index 9742d95..8e5e521 100644 --- a/pages/self-hosting/overview.mdx +++ b/pages/self-hosting/overview.mdx @@ -1,5 +1,18 @@ # Self Hosting Overview -LearnHouse is open source software and can be installed and maintained on just about any Cloud provider. We also support different hosting schemas like using AWS S3 or CloudFlare R2 for content storage or using Vercel for frontend hosting. +LearnHouse is open source software and can be installed and maintained on just about any Cloud provider. We also support different hosting schemas like using AWS S3 or CloudFlare R2 for content storage. + +## Prerequisites + +- Node.js 18.x +- Python 3.11 +- Pnpm +- Docker +- Docker Compose + +## Steps + +- [Get started & Install LearnHouse](/setup-dev-environment) +- [Configure LearnHouse](/self-hosting/configuration) diff --git a/pages/self-hosting/vercel.mdx b/pages/self-hosting/vercel.mdx deleted file mode 100644 index a6cedb7..0000000 --- a/pages/self-hosting/vercel.mdx +++ /dev/null @@ -1,7 +0,0 @@ -import { Callout } from "nextra-theme-docs"; - -# Vercel as Frontend - - - We're still working on a Vercel guide. - diff --git a/public/img/pages/features.png b/public/img/pages/features.png index a0009bf..5e96c1f 100644 Binary files a/public/img/pages/features.png and b/public/img/pages/features.png differ diff --git a/public/img/schemas/infra_overview.png b/public/img/schemas/infra_overview.png index e3ebf66..dd841f3 100644 Binary files a/public/img/schemas/infra_overview.png and b/public/img/schemas/infra_overview.png differ diff --git a/public/img/schemas/infra_overview_old.png b/public/img/schemas/infra_overview_old.png new file mode 100644 index 0000000..e3ebf66 Binary files /dev/null and b/public/img/schemas/infra_overview_old.png differ