├── .eslintignore ├── .eslintrc.json ├── .github └── ISSUE_TEMPLATE │ ├── bug.yml │ ├── enhancement.yml │ ├── feature.yml │ └── others.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Design ├── HomePage-MyClasses-dm.png ├── HomePage-MyClasses-wm.png ├── Login.png ├── LoginPage.png └── Register.png ├── LICENSE ├── Learn.md ├── README.md ├── components.json ├── next.config.mjs ├── package-lock.json ├── package.json ├── postcss.config.mjs ├── src ├── app │ ├── api │ │ └── auth │ │ │ └── [...nextauth] │ │ │ └── route.ts │ ├── favicon.ico │ ├── fonts │ │ ├── GeistMonoVF.woff │ │ └── GeistVF.woff │ ├── globals.css │ ├── layout.tsx │ ├── page.tsx │ ├── register │ │ └── page.tsx │ ├── signin │ │ └── page.tsx │ └── studentloginOpenLMS.jpg ├── components │ ├── Navbar.tsx │ └── ui │ │ ├── animated-gradient-text.tsx │ │ ├── button.tsx │ │ ├── checkbox.tsx │ │ └── input.tsx ├── lib │ ├── auth.ts │ └── utils.ts └── public │ └── bg.jpg ├── tailwind.config.ts └── tsconfig.json /.eslintignore: -------------------------------------------------------------------------------- 1 | # .eslintignore 2 | 3 | node_modules/ 4 | build/ 5 | public/ -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- 1 | name: 🐞 Bug Report 2 | description: File a bug report. 3 | title: "[Bug] " 4 | labels: ["bug", "triage"] 5 | body: 6 | - type: checkboxes 7 | attributes: 8 | label: Is there an existing issue for this? 9 | description: Please search to see if an issue already exists for the bug you encountred. 10 | options: 11 | - label: I have searched the existing issues 12 | required: true 13 | - type: textarea 14 | attributes: 15 | label: Current Behaviour 16 | description: A concise description of what you're experiencing. 17 | validations: 18 | required: false 19 | - type: textarea 20 | attributes: 21 | label: Expected Behaviour 22 | description: A concise description of what you expect to happen. 23 | validations: 24 | required: false 25 | - type: textarea 26 | attributes: 27 | label: Steps to Reproduce 28 | description: steps to reproduce the behaviour. 29 | placeholder: | 30 | 1. In this environment... 31 | 2. With this config... 32 | 3. Run '...' 33 | 4. See error... 34 | validations: 35 | required: false 36 | - type: textarea 37 | attributes: 38 | label: Environment 39 | description: | 40 | examples: 41 | - **OS**: Ubuntu 20.04 42 | - **Node**: 20.12.2 43 | - **npm**: 10.5.0 44 | value: | 45 | - OS: 46 | - Node: 47 | - npm: 48 | render: markdown 49 | validations: 50 | required: false 51 | - type: textarea 52 | attributes: 53 | label: Anything else? 54 | description: | 55 | Links? References? Anything that will give more context about the issue you're encountring! 56 | 57 | Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. 58 | validations: 59 | required: false 60 | - type: dropdown 61 | id: browsers 62 | attributes: 63 | label: On what browsers you're seeing the problem. 64 | multiple: true 65 | options: 66 | - Firefox 67 | - Chrome 68 | - Safari 69 | - Microsoft Edge -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.yml: -------------------------------------------------------------------------------- 1 | name: ✨ Enhancement Tracking Issue 2 | description: Provide supporting details for a feature in development 3 | labels: ["enhancement"] 4 | body: 5 | - type: textarea 6 | id: feature 7 | attributes: 8 | label: What would you like to be added? 9 | description: | 10 | Suggest code, documentation or any improvemnets you think will be good. 11 | validations: 12 | required: true 13 | 14 | - type: textarea 15 | id: rationale 16 | attributes: 17 | label: Why is this needed? 18 | validations: 19 | required: true -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🛠️ Feature Request 3 | description: Suggest an idea to help us improve W&B 4 | title: "[Feature]: <title>" 5 | labels: ["feature", "triage"] 6 | 7 | body: 8 | - type: markdown 9 | attributes: 10 | value: | 11 | **Thanks :heart: for taking the time to fill out this feature request report!** 12 | We kindly ask that you search to see if an issue [already exists](https://github.com/Bhanu-code/db-drawer/issues) for your feature. 13 | 14 | We are also happy to accept contributions from our users. For more details see [here](https://github.com/Bhanu-code/db-drawer/blob/main/CONTRIBUTING.md). 15 | 16 | - type: textarea 17 | attributes: 18 | label: Description 19 | description: | 20 | A clear and concise description of the feature you're interested in. 21 | validations: 22 | required: true 23 | 24 | - type: textarea 25 | attributes: 26 | label: Suggested Solution 27 | description: | 28 | Describe the solution you'd like. A clear and concise description of what you want to happen. 29 | validations: 30 | required: true 31 | 32 | - type: textarea 33 | attributes: 34 | label: Alternatives 35 | description: | 36 | Describe alternatives you've considered. 37 | A clear and concise description of any alternative solutions or features you've considered. 38 | validations: 39 | required: false 40 | 41 | - type: textarea 42 | attributes: 43 | label: Additional Context 44 | description: | 45 | Add any other context about the problem here. 46 | validations: 47 | required: false -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/others.yml: -------------------------------------------------------------------------------- 1 | name: 👽 Other Issues 2 | description: File an issue not in category from above. 3 | title: "[Other] <title>" 4 | labels: ["other"] 5 | body: 6 | - type: checkboxes 7 | attributes: 8 | label: Is there an existing issue for this? 9 | description: Please search to see if an issue already exists for the bug you encountred. 10 | options: 11 | - label: I have searched the existing issues 12 | required: true 13 | - type: textarea 14 | attributes: 15 | label: Problem or Suggestment 16 | description: A concise description of what you're experiencing. 17 | validations: 18 | required: false 19 | - type: textarea 20 | attributes: 21 | label: Anything else? 22 | description: | 23 | Links? References? Anything that will give more context about the issue you're encountring! 24 | 25 | Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. 26 | validations: 27 | required: false 28 | - type: dropdown 29 | id: browsers 30 | attributes: 31 | label: On what browsers you're seeing the problem. 32 | multiple: true 33 | options: 34 | - Firefox 35 | - Chrome 36 | - Safari 37 | - Microsoft Edge -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | .env 31 | 32 | # vercel 33 | .vercel 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | next-env.d.ts 38 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct - OpenLMS 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to make participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to a positive environment for our 15 | community include: 16 | 17 | * Demonstrating empathy and kindness toward other people 18 | * Being respectful of differing opinions, viewpoints, and experiences 19 | * Giving and gracefully accepting constructive feedback 20 | * Accepting responsibility and apologizing to those affected by our mistakes, 21 | and learning from the experience 22 | * Focusing on what is best not just for us as individuals, but for the 23 | overall community 24 | 25 | Examples of unacceptable behavior include: 26 | 27 | * The use of sexualized language or imagery, and sexual attention or 28 | advances 29 | * Trolling, insulting or derogatory comments, and personal or political attacks 30 | * Public or private harassment 31 | * Publishing others' private information, such as a physical or email 32 | address, without their explicit permission 33 | * Other conduct which could reasonably be considered inappropriate in a 34 | professional setting 35 | 36 | ## Our Responsibilities 37 | 38 | Project maintainers are responsible for clarifying and enforcing our standards of 39 | acceptable behavior and will take appropriate and fair corrective action in 40 | response to any instances of unacceptable behavior. 41 | 42 | Project maintainers have the right and responsibility to remove, edit, or reject 43 | comments, commits, code, wiki edits, issues, and other contributions that are 44 | not aligned to this Code of Conduct, or to ban 45 | temporarily or permanently any contributor for other behaviors that they deem 46 | inappropriate, threatening, offensive, or harmful. 47 | 48 | ## Scope 49 | 50 | This Code of Conduct applies within all community spaces, and also applies when 51 | an individual is officially representing the community in public spaces. 52 | Examples of representing our community include using an official e-mail address, 53 | posting via an official social media account, or acting as an appointed 54 | representative at an online or offline event. 55 | 56 | ## Enforcement 57 | 58 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 59 | reported to the community leaders responsible for enforcement at <bhanuchowhan652@gmail.com>. 60 | All complaints will be reviewed and investigated promptly and fairly. 61 | 62 | All community leaders are obligated to respect the privacy and security of the 63 | reporter of any incident. 64 | 65 | ## Attribution 66 | 67 | This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version 68 | [1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and 69 | [2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md), 70 | and was generated by [contributing-gen](https://github.com/bttger/contributing-gen). -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | <!-- omit in toc --> 2 | # Contributing to OpenLMS 3 | 4 | First off, thanks for taking the time to contribute! ❤️ 5 | 6 | All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉 7 | 8 | > And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: 9 | > - Star the project 10 | > - Tweet about it 11 | > - Refer this project in your project's readme 12 | > - Mention the project at local meetups and tell your friends/colleagues 13 | 14 | <!-- omit in toc --> 15 | ## Table of Contents 16 | 17 | - [Code of Conduct](#code-of-conduct) 18 | - [I Have a Question](#i-have-a-question) 19 | - [I Want To Contribute](#i-want-to-contribute) 20 | - [Reporting Bugs](#reporting-bugs) 21 | - [Suggesting Enhancements](#suggesting-enhancements) 22 | - [Your First Code Contribution](#your-first-code-contribution) 23 | - [Improving The Documentation](#improving-the-documentation) 24 | - [Styleguides](#styleguides) 25 | - [Commit Messages](#commit-messages) 26 | - [Join The Project Team](#join-the-project-team) 27 | 28 | 29 | ## Code of Conduct 30 | 31 | This project and everyone participating in it is governed by the 32 | [OpenLMS Code of Conduct](https://github.com/Bhanu-code/OpenLMS?tab=readme-ov-fileblob/master/CODE_OF_CONDUCT.md). 33 | By participating, you are expected to uphold this code. Please report unacceptable behavior 34 | to <bhanuchowhan652@gmail.com>. 35 | 36 | 37 | ## I Have a Question 38 | 39 | > If you want to ask a question, we assume that you have read the available [Documentation](). 40 | 41 | Before you ask a question, it is best to search for existing [Issues](https://github.com/Bhanu-code/OpenLMS?tab=readme-ov-file/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. 42 | 43 | If you then still feel the need to ask a question and need clarification, we recommend the following: 44 | 45 | - Open an [Issue](https://github.com/Bhanu-code/OpenLMS?tab=readme-ov-file/issues/new). 46 | - Provide as much context as you can about what you're running into. 47 | - Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. 48 | 49 | We will then take care of the issue as soon as possible. 50 | 51 | <!-- 52 | You might want to create a separate issue tag for questions and include it in this description. People should then tag their issues accordingly. 53 | 54 | Depending on how large the project is, you may want to outsource the questioning, e.g. to Stack Overflow or Gitter. You may add additional contact and information possibilities: 55 | - IRC 56 | - Slack 57 | - Gitter 58 | - Stack Overflow tag 59 | - Blog 60 | - FAQ 61 | - Roadmap 62 | - E-Mail List 63 | - Forum 64 | --> 65 | 66 | ## I Want To Contribute 67 | 68 | > ### Legal Notice <!-- omit in toc --> 69 | > When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. 70 | 71 | ### Reporting Bugs 72 | 73 | <!-- omit in toc --> 74 | #### Before Submitting a Bug Report 75 | 76 | A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible. 77 | 78 | - Make sure that you are using the latest version. 79 | - Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](). If you are looking for support, you might want to check [this section](#i-have-a-question)). 80 | - To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/Bhanu-code/OpenLMS?tab=readme-ov-fileissues?q=label%3Abug). 81 | - Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue. 82 | - Collect information about the bug: 83 | - Stack trace (Traceback) 84 | - OS, Platform and Version (Windows, Linux, macOS, x86, ARM) 85 | - Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant. 86 | - Possibly your input and the output 87 | - Can you reliably reproduce the issue? And can you also reproduce it with older versions? 88 | 89 | <!-- omit in toc --> 90 | #### How Do I Submit a Good Bug Report? 91 | 92 | > You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <bhanuchowhan652@gmail.com>. 93 | <!-- You may add a PGP key to allow the messages to be sent encrypted as well. --> 94 | 95 | We use GitHub issues to track bugs and errors. If you run into an issue with the project: 96 | 97 | - Open an [Issue](https://github.com/Bhanu-code/OpenLMS?tab=readme-ov-file/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.) 98 | - Explain the behavior you would expect and the actual behavior. 99 | - Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case. 100 | - Provide the information you collected in the previous section. 101 | 102 | Once it's filed: 103 | 104 | - The project team will label the issue accordingly. 105 | - A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. 106 | - If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution). 107 | 108 | <!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. --> 109 | 110 | 111 | ### Suggesting Enhancements 112 | 113 | This section guides you through submitting an enhancement suggestion for OpenLMS, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions. 114 | 115 | <!-- omit in toc --> 116 | #### Before Submitting an Enhancement 117 | 118 | - Make sure that you are using the latest version. 119 | - Read the [documentation]() carefully and find out if the functionality is already covered, maybe by an individual configuration. 120 | - Perform a [search](https://github.com/Bhanu-code/OpenLMS?tab=readme-ov-file/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. 121 | - Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library. 122 | 123 | <!-- omit in toc --> 124 | #### How Do I Submit a Good Enhancement Suggestion? 125 | 126 | Enhancement suggestions are tracked as [GitHub issues](https://github.com/Bhanu-code/OpenLMS?tab=readme-ov-file/issues). 127 | 128 | - Use a **clear and descriptive title** for the issue to identify the suggestion. 129 | - Provide a **step-by-step description of the suggested enhancement** in as many details as possible. 130 | - **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you. 131 | - You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI --> 132 | - **Explain why this enhancement would be useful** to most db-drawer users. You may also want to point out the other projects that solved it better and which could serve as inspiration. 133 | 134 | <!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. --> 135 | 136 | ### Your First Code Contribution 137 | <!-- TODO 138 | include Setup of env, IDE and typical getting started instructions? 139 | 140 | --> 141 | 142 | ### Improving The Documentation 143 | <!-- TODO 144 | Updating, improving and correcting the documentation 145 | 146 | --> 147 | 148 | ## Styleguides 149 | ### Commit Messages 150 | <!-- TODO 151 | 152 | --> 153 | 154 | ## Join The Project Team 155 | <!-- TODO --> 156 | 157 | <!-- omit in toc --> 158 | ## Attribution 159 | This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)! -------------------------------------------------------------------------------- /Design/HomePage-MyClasses-dm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bhanu-code/OpenLMS/58e73e7b8124f079f1c5da6037276943c8faed24/Design/HomePage-MyClasses-dm.png -------------------------------------------------------------------------------- /Design/HomePage-MyClasses-wm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bhanu-code/OpenLMS/58e73e7b8124f079f1c5da6037276943c8faed24/Design/HomePage-MyClasses-wm.png -------------------------------------------------------------------------------- /Design/Login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bhanu-code/OpenLMS/58e73e7b8124f079f1c5da6037276943c8faed24/Design/Login.png -------------------------------------------------------------------------------- /Design/LoginPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bhanu-code/OpenLMS/58e73e7b8124f079f1c5da6037276943c8faed24/Design/LoginPage.png -------------------------------------------------------------------------------- /Design/Register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bhanu-code/OpenLMS/58e73e7b8124f079f1c5da6037276943c8faed24/Design/Register.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Bhanu Chowhan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Learn.md: -------------------------------------------------------------------------------- 1 | 2 | # OpenLMS 3 | 4 | <br> 5 | <br> 6 | <br> 7 | <br> 8 | <br> 9 | <br> 10 | 11 | 12 | <!-- TABLE OF CONTENTS --> 13 | 14 | <details open="open"> 15 | <summary><h2 style="display: inline-block">Table of Contents</h2></summary> 16 | <ol> 17 | <li> 18 | <a href="#1 Project Description">Project Description</a> 19 | </li> 20 | <li> 21 | <a href="#2 Tech Stacks">Tech Stacks</a> 22 | </li> 23 | <li> 24 | <a href="#4 Building the project in your system">Building the project in your system</a> 25 | </li> 26 | <li> 27 | <a href="#5 Contributing">Contributing</a> 28 | </li> 29 | 30 | 31 | # <a name="1 Project Description">Project description:</a> 32 | 33 | 34 | Every educational institutes wants to create and manage an Learning Management System. But, it is not possible for every institute to create their own LMS because of cost of market to create an LMS for them. So, OpenLMS is an open source bioler plate LMS system which such institutes can use for LMS. This codebase will provide them a basic LMS with design, efficiency and secuirity. 35 | 36 | Students will able to see their courses with their institutes, attend exams & assignments, attend lectures, track their progress & backlogs. 37 | 38 | Teacher will be able to take exams, online classes, attch assignments, provide study materials etc. 39 | 40 | Institutes can manage their faculty, student progress without being bounded in-person. 41 | 42 | # <a name="2 Tech Stacks">Tech Stacks:</a> 43 | 44 | To be able to contribute to this project following technolgies you should learn, 45 | 46 | 1. Next.js 47 | 2. TypeScript 48 | 3. TailwindCSS 49 | 4. Redux State Management 50 | 5. React Query 51 | 6. Formik 52 | 53 | # <a name="3 Building the project in your system">Building the project in your system</a> 54 | 55 | **Build the project:** 56 | For building the project in your system follow this steps, 57 | 58 | 59 | 1. Fork the OpenLMS repository. 60 | 2. Clone the repository. 61 | 3. cd to <folder> && npm install. 62 | 4. npm run dev 63 | 5. Now create a new branch in OpenLMS project, make changes and raise PR. 64 | 65 | 66 | 67 | # <a name="4 Contributing">Contributing</a> 68 | 69 | [ Note: Always create a New Branch for a New PR ] 70 | 71 | <a href="https://github.com/Bhanu-code/OpenLMS/blob/main/CONTRIBUTING.md">refer to CONTRIBUTING.md </a> 72 | 73 | <a href="https://github.com/Bhanu-code/OpenLMS/blob/main/CODE_OF_CONDUCT.md">refer to CODE_OF_CONDUCT.md </a> 74 | 75 | 76 | 77 | 78 | 79 | ## 🙏 Support 80 | 81 | This project needs a ⭐️ from you. Don't forget to leave a star ⭐️ 82 | 83 | 84 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | <p align="center"> 2 | <img src="https://readme-typing-svg.herokuapp.com/?color=45ffaa&size=40&width=900&height=80&lines=Welcome%20to%20OpenLMS"/> 3 | </p> 4 | <p align="center"> 5 | 6 | <a href="https://github.com/Bhanu-code/OpenLMS"><img src="https://badges.frapsoft.com/os/v1/open-source.svg?v=103"></a> <a href="https://github.com/Bhanu-code/OpenLMS/blob/master/LICENSE"><img src="https://img.shields.io/badge/MIT-Licence-blue.svg?v=103"></a> 7 | 8 | ![GitHub issues](https://img.shields.io/github/issues/Bhanu-code/OpenLMS) 9 | ![GitHub pull requests](https://img.shields.io/github/issues-pr/Bhanu-code/OpenLMS) 10 | ![GitHub forks](https://img.shields.io/github/forks/Bhanu-code/OpenLMS) 11 | ![GitHub Repo stars](https://img.shields.io/github/stars/Bhanu-code/OpenLMS?style=social) 12 | ![GitHub contributors](https://img.shields.io/github/contributors/Bhanu-code/OpenLMS) 13 | <br/> 14 | ![Repo Size](https://img.shields.io/github/repo-size/Bhanu-code/OpenLMS) 15 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github?af=5236ad) 16 | <br/> 17 | ![Visitors Count](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2FBhanu-code2023%2FOpenLMS&label=visitors&countColor=%2337d67a&style=flat&labelStyle=upper) 18 | </p> 19 | 20 | ## Table of Contents 21 | 1. [Introduction](#introduction) 22 | 2. [Tech Stack](#tech-stack) 23 | 3. [Features](#features) 24 | 4. [Web Screens](#screens) 25 | 5. [Installation Guide](#installation-guide) 26 | 6. [Contributing Guide](#contributing-guide) 27 | 7. [Outreach](#outreach) 28 | 8. [Project Admin](#project-admin) 29 | 9. [Code of Conduct](#code-of-conduct) 30 | 10. [Learn More](#learn-more) 31 | 11. [Deploy on Vercel](#deploy-on-vercel) 32 | 12. [License](#license) 33 | 13. [Support](#support) 34 | 14. [Contributors](#contributors) 35 | 15. [Design Links](#design) 36 | 37 | ## ✨🎈Introduction 38 | 39 | OpenLMS is an open-source learning management system (LMS) built using **Next.js**, a popular React framework. It provides institutions with a comprehensive platform to manage online learning activities effectively. With features like course creation, video conferencing, discussion forums, and file sharing, OpenLMS aims to be a user-friendly and scalable solution for educational institutions. 40 | 41 | ## ⌨️Tech Stack 42 | 43 | - **Next.js** – React framework for server-side rendering and static site generation. 44 | - **Redux** – State management. 45 | - **Formik** – Form handling and validation. 46 | - **Shadcn/UI** – UI components for consistent design. 47 | - **TypeScript** – Static typing for better development experience. 48 | - **React-query** – Server state management and data fetching. 49 | - **TailwindCSS** – Utility-first CSS framework for styling. 50 | 51 | ## 💻Features 52 | 53 | - User-friendly interface for creating and managing courses, assignments, and assessments. 54 | - Integrated video conferencing for live classes and meetings. 55 | - Discussion forums for students and instructors to collaborate and share ideas. 56 | - File sharing for submitting assignments and sharing resources. 57 | - Customizable to suit the needs of different institutions. 58 | - Scalable to support institutions of all sizes. 59 | 60 | ## 🖼Web Screens 61 | 62 | 1. Login Screen: 63 | <img src="https://github.com/Reboot2004/OpenLMS/blob/Figma-Design/Design/Login.png"/> 64 | 65 | 66 | 2. Signup Screen: 67 | <img src="https://github.com/Reboot2004/OpenLMS/blob/Figma-Design/Design/Register.png"/> 68 | 69 | 70 | 71 | ## 🧑🏻‍💻Installation Guide 72 | 73 | 1. *Clone this repository to your local machine:* 74 | 75 | ``` 76 | git clone https://github.com/your-username/OpenLMS.git 77 | cd ai-content-generator 78 | ``` 79 | 2. *Install the required dependencies:* 80 | ``` 81 | npm install 82 | ``` 83 | 84 | 3. *Setup environment variables* 85 | Create a .env.local file in the root directory and add the following values: 86 | ``` 87 | SOCKET_IO_SERVER_URL=http://localhost:3001 88 | ``` 89 | 4. *Run the application* 90 | For development: 91 | ``` 92 | npm run dev 93 | ``` 94 | For production: 95 | ``` 96 | npm run build 97 | npm start 98 | ``` 99 | 100 | ## 🛠️ Contributing Guide 101 | 102 | We welcome contributions to the **OpenLMS** project! To contribute: 103 | 1. Fork the repository 104 | 2. Create a feature branch (`git checkout -b feature-name`) 105 | 3. Commit your changes (`git commit -am 'Add new feature'`) 106 | 4. Push to the branch (`git push origin feature-name`) 107 | 5. Create a new Pull Request 108 | 109 | Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) for more detailed information. 110 | 111 | 112 | ## 💪 Outreach 113 | 114 | HelpOps-Hub is proudly part of global initiatives engaging with passionate developers and open-source enthusiasts worldwide: 115 | 116 | <table> 117 | <tr> 118 | <th>Name</th> 119 | <th>Logo</th> 120 | <th>Purpose</th> 121 | </tr> 122 | <tr> 123 | <td>GSSoC'2024-Extd </td> 124 | <td><img src="https://github.com/user-attachments/assets/1bd8ab15-604e-4ac9-a33e-dc753a07be23" alt="a white background with the text, GirlScript Summer of Code next to an orange flower"></td> 125 | <td> The coding period is from October 1st to October 30th, during which contributors make contributions and earn points on the platform. </td> 126 | </tr> 127 | <tr> 128 | <td>Hacktoberfest 2024 </td> 129 | <td><img src="https://github.com/user-attachments/assets/027eb349-43f2-4834-9343-1e8ba0bf54ed" alt="a black background with the official logo of Hacktoberfest 2024"></td> 130 | <td> Hacktoberfest is a month-long October event welcoming all skill levels to join the open source community, contribute quality pull requests on GitHub, and earn cool swag. </td> 131 | </tr> 132 | </table> 133 | 134 | 135 | <h1 align=center> 136 | 137 | ## Project Admin 138 | 139 | <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/People%20with%20professions/Man%20Technologist%20Medium%20Skin%20Tone.png" alt="man-techno" height=40 width=40> </h1> 140 | 141 | <p align="center"> 142 | <a href="https://github.com/Bhanu-code"><img src="https://avatars.githubusercontent.com/Bhanu-code" width="17%" /></a> 143 | </p> 144 | 145 | <div align="center"> 146 | <p margin-right="10px 30px 100px 30px"> 147 | 148 | <a href="https://www.linkedin.com/in/bhanu-chowhan-130816266/" target="blank"><img align="center" src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/linked-in-alt.svg" alt="https://https://www.linkedin.com/in/bhanu-chowhan-130816266/" height="30" width="40" /></a> 149 | </p> 150 | </div> 151 | 152 | ## 📑Code Of Conduct 153 | 154 | This project and everyone participating in it is governed by the [Code of Conduct](https://github.com/Bhanu-code/OpenLMS/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. 155 | 156 | 157 | <div align="center"> 158 | 159 | </div> 160 | 161 | ## 📚 Learn More 162 | 163 | To deepen your understanding of Next.js, check out these valuable resources: 164 | 165 | - **[Next.js Documentation](https://nextjs.org/docs)** - Explore Next.js features and API. 166 | - **[Learn Next.js](https://nextjs.org/learn)** - Engage with an interactive tutorial to enhance your skills. 167 | - **[Next.js GitHub Repository](https://github.com/vercel/next.js)** - Your feedback and contributions are always welcome! 168 | 169 | ## 🌐 Deploy on Vercel 170 | 171 | The simplest way to deploy your Next.js app is through the **Vercel Platform**, created by the team behind Next.js. For more deployment options, refer to our [Next.js deployment documentation](https://nextjs.org/docs/deployment). 172 | 173 | 174 | 175 | ## 📝License 176 | 177 | <img src="https://img.shields.io/badge/License-MIT-yellow.svg"/> <br> 178 | Gityzer is licensed under the terms of the MIT License. check out <a href="./LICENSE">LICENSE</a> for details. <img width=2300/> 179 | 180 | <a name="support"></a> 181 | 182 | ## ⭐Support 183 | 184 | - 💰 Become our [Sponsor](https://github.com/sponsors/OpenLMS)! 185 | - ⭐ Star our Repo 186 | 187 | ## Contributors 188 | 189 | # 🫱🏼‍🫲🏼Big thanks to all the contributors! 🫱🏼‍🫲🏼 190 | 191 | <a href="https://github.com/Bhanu-code/OpenLMS/graphs/contributors"> 192 | <img src="https://contrib.rocks/image?repo=Bhanu-code/OpenLMS" /> 193 | </a> 194 | 195 | <p align="right">(<a href="#top">Back to top⬆️</a>)</p> 196 | 197 | ## 🔗Design Links 198 | 1. https://www.figma.com/design/7WFQvDENPrc7fYdeOmx3yV/Login-Register?node-id=1669-162202&m=dev&t=APzuRtzGaWhOuRw9-1 199 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/app/globals.css", 9 | "baseColor": "zinc", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | } 20 | } -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | 3 | const nextConfig = { 4 | reactStrictMode: true, 5 | eslint: { 6 | ignoreDuringBuilds: true, 7 | }, 8 | }; 9 | 10 | 11 | export default nextConfig; 12 | 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openlms", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@radix-ui/react-checkbox": "^1.1.2", 13 | "@radix-ui/react-icons": "^1.3.0", 14 | "@radix-ui/react-slot": "^1.1.0", 15 | "class-variance-authority": "^0.7.0", 16 | "clsx": "^2.1.1", 17 | "lucide-react": "^0.452.0", 18 | "next": "14.2.14", 19 | "next-auth": "^5.0.0-beta.25", 20 | "react": "^18", 21 | "react-dom": "^18", 22 | "tailwind-merge": "^2.5.3", 23 | "tailwindcss-animate": "^1.0.7" 24 | }, 25 | "devDependencies": { 26 | "@types/node": "^20", 27 | "@types/react": "^18", 28 | "@types/react-dom": "^18", 29 | "eslint": "^8", 30 | "eslint-config-next": "14.2.14", 31 | "postcss": "^8", 32 | "tailwindcss": "^3.4.1", 33 | "typescript": "^5" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /src/app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- 1 | import { handlers } from "@/lib/auth"; // Referring to the auth.ts we just created 2 | export const { GET, POST } = handlers; 3 | -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bhanu-code/OpenLMS/58e73e7b8124f079f1c5da6037276943c8faed24/src/app/favicon.ico -------------------------------------------------------------------------------- /src/app/fonts/GeistMonoVF.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bhanu-code/OpenLMS/58e73e7b8124f079f1c5da6037276943c8faed24/src/app/fonts/GeistMonoVF.woff -------------------------------------------------------------------------------- /src/app/fonts/GeistVF.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bhanu-code/OpenLMS/58e73e7b8124f079f1c5da6037276943c8faed24/src/app/fonts/GeistVF.woff -------------------------------------------------------------------------------- /src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | body { 6 | font-family: Arial, Helvetica, sans-serif; 7 | } 8 | 9 | @layer utilities { 10 | .text-balance { 11 | text-wrap: balance; 12 | } 13 | } 14 | 15 | @layer base { 16 | :root { 17 | --background: 0 0% 100%; 18 | --foreground: 240 10% 3.9%; 19 | --card: 0 0% 100%; 20 | --card-foreground: 240 10% 3.9%; 21 | --popover: 0 0% 100%; 22 | --popover-foreground: 240 10% 3.9%; 23 | --primary: 240 5.9% 10%; 24 | --primary-foreground: 0 0% 98%; 25 | --secondary: 240 4.8% 95.9%; 26 | --secondary-foreground: 240 5.9% 10%; 27 | --muted: 240 4.8% 95.9%; 28 | --muted-foreground: 240 3.8% 46.1%; 29 | --accent: 240 4.8% 95.9%; 30 | --accent-foreground: 240 5.9% 10%; 31 | --destructive: 0 84.2% 60.2%; 32 | --destructive-foreground: 0 0% 98%; 33 | --border: 240 5.9% 90%; 34 | --input: 240 5.9% 90%; 35 | --ring: 240 10% 3.9%; 36 | --chart-1: 12 76% 61%; 37 | --chart-2: 173 58% 39%; 38 | --chart-3: 197 37% 24%; 39 | --chart-4: 43 74% 66%; 40 | --chart-5: 27 87% 67%; 41 | --radius: 0.5rem; 42 | } 43 | .dark { 44 | --background: 240 10% 3.9%; 45 | --foreground: 0 0% 98%; 46 | --card: 240 10% 3.9%; 47 | --card-foreground: 0 0% 98%; 48 | --popover: 240 10% 3.9%; 49 | --popover-foreground: 0 0% 98%; 50 | --primary: 0 0% 98%; 51 | --primary-foreground: 240 5.9% 10%; 52 | --secondary: 240 3.7% 15.9%; 53 | --secondary-foreground: 0 0% 98%; 54 | --muted: 240 3.7% 15.9%; 55 | --muted-foreground: 240 5% 64.9%; 56 | --accent: 240 3.7% 15.9%; 57 | --accent-foreground: 0 0% 98%; 58 | --destructive: 0 62.8% 30.6%; 59 | --destructive-foreground: 0 0% 98%; 60 | --border: 240 3.7% 15.9%; 61 | --input: 240 3.7% 15.9%; 62 | --ring: 240 4.9% 83.9%; 63 | --chart-1: 220 70% 50%; 64 | --chart-2: 160 60% 45%; 65 | --chart-3: 30 80% 55%; 66 | --chart-4: 280 65% 60%; 67 | --chart-5: 340 75% 55%; 68 | } 69 | } 70 | 71 | @layer base { 72 | * { 73 | @apply border-border; 74 | } 75 | body { 76 | @apply bg-background text-foreground; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import localFont from "next/font/local"; 3 | import "./globals.css"; 4 | import Navbar from "@/components/Navbar"; 5 | 6 | const geistSans = localFont({ 7 | src: "./fonts/GeistVF.woff", 8 | variable: "--font-geist-sans", 9 | weight: "100 900", 10 | }); 11 | const geistMono = localFont({ 12 | src: "./fonts/GeistMonoVF.woff", 13 | variable: "--font-geist-mono", 14 | weight: "100 900", 15 | }); 16 | 17 | export const metadata: Metadata = { 18 | title: "Create Next App", 19 | description: "Generated by create next app", 20 | }; 21 | 22 | export default function RootLayout({ 23 | children, 24 | }: Readonly<{ 25 | children: React.ReactNode; 26 | }>) { 27 | return ( 28 | <html lang="en"> 29 | <body 30 | className={`${geistSans.variable} ${geistMono.variable} antialiased`} 31 | > 32 | <Navbar/> 33 | {children} 34 | </body> 35 | </html> 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import AnimatedGradientText from "@/components/ui/animated-gradient-text"; 2 | import { Button } from "@/components/ui/button"; 3 | import { cn } from "@/lib/utils"; 4 | import { ChevronRight } from "lucide-react"; 5 | //uncomment these imports to perform 1. & 2. 6 | // import { auth } from "@/lib/auth"; 7 | //import { redirect } from "next/navigation"; 8 | 9 | export default async function Home() { 10 | //uncomment these lines to : 11 | // 1. get the user session 12 | // const session = await auth(); 13 | // 2. Redirect to the login page and don't let the user access homepage if not already logged in 14 | // if(!session) 15 | // { 16 | // redirect("/signin"); 17 | // } 18 | 19 | return ( 20 | <div className="flex flex-col items-center justify-center"> 21 | <div className="flex items-center justify-center w-full min-h-[calc(100vh-64px)]"> 22 | <div className="px-4 md:px-6"> 23 | <div className="flex flex-col items-center space-y-4 text-center"> 24 | <div className="space-y-2"> 25 | {/* add this component from magic ui (install shadcn ui first) */} 26 | <AnimatedGradientText> 27 | 🎉 <hr className="mx-2 h-4 w-px shrink-0 bg-gray-300" />{" "} 28 | <span 29 | className={cn( 30 | `inline animate-gradient bg-gradient-to-r from-[#ffaa40] via-[#9c40ff] to-[#ffaa40] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent`, 31 | )} 32 | > 33 | Introducing OpenLMS 34 | </span> 35 | <ChevronRight className="ml-1 size-3 transition-transform duration-300 ease-in-out group-hover:translate-x-0.5" /> 36 | </AnimatedGradientText> 37 | <h1 className="text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl lg:text-6xl/none bg-gradient-to-b from-[#000000] to-[#474747] bg-clip-text text-transparent"> 38 | Welcome to OpenSMP 39 | </h1> 40 | <p className="mx-auto max-w-[700px] text-gray-500 md:text-xl dark:text-gray-400 text-sm"> 41 | The mordern open-source learning management system that empowers educational institutions to streamline their operations and enhance student experiences. 42 | </p> 43 | </div> 44 | <div className="space-x-4"> 45 | <Button>Get Started</Button> 46 | <Button variant="outline">Learn More</Button> 47 | </div> 48 | </div> 49 | </div> 50 | </div> 51 | </div> 52 | ); 53 | } 54 | -------------------------------------------------------------------------------- /src/app/register/page.tsx: -------------------------------------------------------------------------------- 1 | import Image from 'next/image' 2 | import Link from 'next/link' 3 | import { Input } from "@/components/ui/input" 4 | import { Button } from "@/components/ui/button" 5 | // import { Checkbox } from "@/components/ui/checkbox" 6 | // import { Facebook, Apple } from 'lucide-react' 7 | import bgImage from '@/public/bg.jpg' 8 | 9 | export default function Register() { 10 | return ( 11 | <div className="flex min-h-[calc(100vh-64px)] bg-white"> 12 | <div className="flex-1 relative"> 13 | <Image 14 | src={bgImage} 15 | alt="Illustration" 16 | width={600} 17 | height={600} 18 | className="w-full h-full object-cover" 19 | /> 20 | </div> 21 | <div> 22 | <div className="flex-1 flex items-center justify-center p-8"> 23 | <div className="w-full"> 24 | <h2 className="text-3xl font-bold mb-6">Sign up</h2> 25 | <p className="mb-6 text-gray-600"> 26 | If you already have an account register{" "} 27 | <Link href="/signin" className="text-red-500 hover:underline"> 28 | Login here ! 29 | </Link> 30 | </p> 31 | <form className="space-y-4"> 32 | <div> 33 | <label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-1"> 34 | Email 35 | </label> 36 | <Input id="email" type="email" placeholder="Enter your email address" /> 37 | </div> 38 | <div> 39 | <label htmlFor="username" className="block text-sm font-medium text-gray-700 mb-1"> 40 | Username 41 | </label> 42 | <Input id="username" type="text" placeholder="Enter your User name" /> 43 | </div> 44 | <div> 45 | <label htmlFor="password" className="block text-sm font-medium text-gray-700 mb-1"> 46 | Password 47 | </label> 48 | <Input id="password" type="password" placeholder="Enter your Password" /> 49 | </div> 50 | <div> 51 | <label htmlFor="confirm-password" className="block text-sm font-medium text-gray-700 mb-1"> 52 | Confirm Password 53 | </label> 54 | <Input id="confirm-password" type="password" placeholder="Confirm your Password" /> 55 | </div> 56 | <Button type="submit" className="w-full bg-red-500 hover:bg-red-600 text-white"> 57 | Register 58 | </Button> 59 | </form> 60 | </div> 61 | </div> 62 | </div> 63 | </div> 64 | ) 65 | } -------------------------------------------------------------------------------- /src/app/signin/page.tsx: -------------------------------------------------------------------------------- 1 | import Image from "next/image"; 2 | import Link from "next/link"; 3 | import { Input } from "@/components/ui/input"; 4 | import { Button } from "@/components/ui/button"; 5 | import { Checkbox } from "@/components/ui/checkbox"; 6 | import { Facebook, Apple } from "lucide-react"; 7 | import bgImage from "@/public/bg.jpg"; 8 | import { signIn } from "@/lib/auth"; 9 | 10 | export default function SignIn() { 11 | return ( 12 | <div className="flex min-h-[calc(100vh-64px)] bg-white"> 13 | <div className="flex-1 relative"> 14 | <Image 15 | src={bgImage} 16 | alt="Illustration" 17 | width={600} 18 | height={600} 19 | className="w-full h-full object-cover" 20 | /> 21 | </div> 22 | <div className="flex-1 flex items-center justify-center"> 23 | <div className="w-full max-w-md space-y-8 px-4"> 24 | <div className="text-center"> 25 | <h2 className="text-3xl font-bold">Sign in</h2> 26 | <p className="mt-2 text-sm text-gray-600"> 27 | If you don't have an account register 28 | <Link 29 | href="/register" 30 | className="text-red-500 hover:underline ml-1" 31 | > 32 | You can Register here ! 33 | </Link> 34 | </p> 35 | </div> 36 | <form className="mt-8 space-y-6"> 37 | <div className="space-y-4"> 38 | <div> 39 | <label 40 | htmlFor="email" 41 | className="block text-sm font-medium text-gray-700" 42 | > 43 | Email 44 | </label> 45 | <Input 46 | id="email" 47 | name="email" 48 | type="email" 49 | autoComplete="email" 50 | required 51 | className="mt-1" 52 | placeholder="Enter your email address" 53 | /> 54 | </div> 55 | <div> 56 | <label 57 | htmlFor="password" 58 | className="block text-sm font-medium text-gray-700" 59 | > 60 | Password 61 | </label> 62 | <Input 63 | id="password" 64 | name="password" 65 | type="password" 66 | autoComplete="current-password" 67 | required 68 | className="mt-1" 69 | placeholder="Enter your Password" 70 | /> 71 | </div> 72 | </div> 73 | 74 | <div className="flex items-center justify-between"> 75 | <div className="flex items-center"> 76 | <Checkbox id="remember-me" /> 77 | <label 78 | htmlFor="remember-me" 79 | className="ml-2 block text-sm text-gray-900" 80 | > 81 | Remember me 82 | </label> 83 | </div> 84 | <div className="text-sm"> 85 | <Link 86 | href="/forgot-password" 87 | className="text-blue-600 hover:underline" 88 | > 89 | Forgot Password? 90 | </Link> 91 | </div> 92 | </div> 93 | 94 | <Button 95 | type="submit" 96 | className="w-full bg-red-500 hover:bg-red-600" 97 | > 98 | Login 99 | </Button> 100 | </form> 101 | <div className="mt-6"> 102 | <div className="relative"> 103 | <div className="absolute inset-0 flex items-center"> 104 | <div className="w-full border-t border-gray-300" /> 105 | </div> 106 | <div className="relative flex justify-center text-sm"> 107 | <span className="px-2 bg-[#FFFfff] text-gray-500"> 108 | or continue with 109 | </span> 110 | </div> 111 | </div> 112 | 113 | <div className="mt-6 grid grid-cols-3 gap-3"> 114 | <form 115 | action={async () => { 116 | "use server"; 117 | //at first, sign in with facebook & then redirect to the homepage after login 118 | await signIn("facebook", { redirectTo: "/" }); 119 | }} 120 | > 121 | <Button variant="outline" className="w-full"> 122 | <Facebook className="w-5 h-5 text-blue-600" /> 123 | </Button> 124 | </form> 125 | 126 | <Button variant="outline" className="w-full"> 127 | <Apple className="w-5 h-5" /> 128 | </Button> 129 | 130 | <form 131 | action={async () => { 132 | "use server"; 133 | //at first, sign in with google & then redirect to the homepage after login 134 | await signIn("google", { redirectTo: "/" }); 135 | }} 136 | > 137 | <Button variant="outline" className="w-full"> 138 | <Image 139 | src="https://upload.wikimedia.org/wikipedia/commons/c/c1/Google_%22G%22_logo.svg" 140 | alt="Google" 141 | width={20} 142 | height={20} 143 | /> 144 | </Button> 145 | </form> 146 | </div> 147 | </div> 148 | </div> 149 | </div> 150 | </div> 151 | ); 152 | } 153 | -------------------------------------------------------------------------------- /src/app/studentloginOpenLMS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bhanu-code/OpenLMS/58e73e7b8124f079f1c5da6037276943c8faed24/src/app/studentloginOpenLMS.jpg -------------------------------------------------------------------------------- /src/components/Navbar.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import { GraduationCap } from "lucide-react"; 3 | import { Button } from "./ui/button"; 4 | import Link from "next/link"; 5 | 6 | export default function Navbar() { 7 | return ( 8 | <div className="flex items-center justify-between px-10 py-3 backdrop-blur-sm sticky top-0 z-10 border-b-[0.5px] border-gray-300"> 9 | <Link href={"/"}> 10 | <div className="flex gap-2 items-center"> 11 | <GraduationCap size={30} /> 12 | <h2 className="font-bold text-2xl">OpenLMS</h2> 13 | </div> 14 | </Link> 15 | <div className="flex gap-2 items-center"> 16 | <Link href={"/signin"}> <Button>Sign In</Button></Link> 17 | </div> 18 | </div> 19 | ); 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/components/ui/animated-gradient-text.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from "react"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | 5 | export default function AnimatedGradientText({ 6 | children, 7 | className, 8 | }: { 9 | children: ReactNode; 10 | className?: string; 11 | }) { 12 | return ( 13 | <div 14 | className={cn( 15 | "group relative mx-auto flex max-w-fit flex-row items-center justify-center rounded-2xl bg-white/40 px-4 py-1.5 text-sm font-medium shadow-[inset_0_-8px_10px_#8fdfff1f] backdrop-blur-sm transition-shadow duration-500 ease-out [--bg-size:300%] hover:shadow-[inset_0_-5px_10px_#8fdfff3f] dark:bg-black/40", 16 | className, 17 | )} 18 | > 19 | <div 20 | className={`absolute inset-0 block h-full w-full animate-gradient bg-gradient-to-r from-[#ffaa40]/50 via-[#9c40ff]/50 to-[#ffaa40]/50 bg-[length:var(--bg-size)_100%] p-[1px] ![mask-composite:subtract] [border-radius:inherit] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]`} 21 | /> 22 | 23 | {children} 24 | </div> 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /src/components/ui/button.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import { Slot } from "@radix-ui/react-slot" 3 | import { cva, type VariantProps } from "class-variance-authority" 4 | 5 | import { cn } from "@/lib/utils" 6 | 7 | const buttonVariants = cva( 8 | "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", 9 | { 10 | variants: { 11 | variant: { 12 | default: 13 | "bg-primary text-primary-foreground shadow hover:bg-primary/90", 14 | destructive: 15 | "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90", 16 | outline: 17 | "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground", 18 | secondary: 19 | "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", 20 | ghost: "hover:bg-accent hover:text-accent-foreground", 21 | link: "text-primary underline-offset-4 hover:underline", 22 | }, 23 | size: { 24 | default: "h-9 px-4 py-2", 25 | sm: "h-8 rounded-md px-3 text-xs", 26 | lg: "h-10 rounded-md px-8", 27 | icon: "h-9 w-9", 28 | }, 29 | }, 30 | defaultVariants: { 31 | variant: "default", 32 | size: "default", 33 | }, 34 | } 35 | ) 36 | 37 | export interface ButtonProps 38 | extends React.ButtonHTMLAttributes<HTMLButtonElement>, 39 | VariantProps<typeof buttonVariants> { 40 | asChild?: boolean 41 | } 42 | 43 | const Button = React.forwardRef<HTMLButtonElement, ButtonProps>( 44 | ({ className, variant, size, asChild = false, ...props }, ref) => { 45 | const Comp = asChild ? Slot : "button" 46 | return ( 47 | <Comp 48 | className={cn(buttonVariants({ variant, size, className }))} 49 | ref={ref} 50 | {...props} 51 | /> 52 | ) 53 | } 54 | ) 55 | Button.displayName = "Button" 56 | 57 | export { Button, buttonVariants } 58 | -------------------------------------------------------------------------------- /src/components/ui/checkbox.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as CheckboxPrimitive from "@radix-ui/react-checkbox" 5 | import { CheckIcon } from "@radix-ui/react-icons" 6 | 7 | import { cn } from "@/lib/utils" 8 | 9 | const Checkbox = React.forwardRef< 10 | React.ElementRef<typeof CheckboxPrimitive.Root>, 11 | React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> 12 | >(({ className, ...props }, ref) => ( 13 | <CheckboxPrimitive.Root 14 | ref={ref} 15 | className={cn( 16 | "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", 17 | className 18 | )} 19 | {...props} 20 | > 21 | <CheckboxPrimitive.Indicator 22 | className={cn("flex items-center justify-center text-current")} 23 | > 24 | <CheckIcon className="h-4 w-4" /> 25 | </CheckboxPrimitive.Indicator> 26 | </CheckboxPrimitive.Root> 27 | )) 28 | Checkbox.displayName = CheckboxPrimitive.Root.displayName 29 | 30 | export { Checkbox } 31 | -------------------------------------------------------------------------------- /src/components/ui/input.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | export interface InputProps 6 | extends React.InputHTMLAttributes<HTMLInputElement> {} 7 | 8 | const Input = React.forwardRef<HTMLInputElement, InputProps>( 9 | ({ className, type, ...props }, ref) => { 10 | return ( 11 | <input 12 | type={type} 13 | className={cn( 14 | "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", 15 | className 16 | )} 17 | ref={ref} 18 | {...props} 19 | /> 20 | ) 21 | } 22 | ) 23 | Input.displayName = "Input" 24 | 25 | export { Input } 26 | -------------------------------------------------------------------------------- /src/lib/auth.ts: -------------------------------------------------------------------------------- 1 | import NextAuth from "next-auth"; 2 | 3 | import Google from "next-auth/providers/google"; 4 | import Facebook from "next-auth/providers/facebook"; 5 | /* 6 | We need AUTH_SECRET generated by `npx auth` command in .env.local file 7 | 8 | GOOGLE_CLIENT_ID , GOOGLE_CLIENT_SECRET for authentication with google 9 | and 10 | FACEBOOK_CLIENT_ID, FACEBOOK_CLIENT_SECRET for authentication with facebook 11 | 12 | */ 13 | export const { handlers, signIn, signOut, auth } = NextAuth({ 14 | providers: [ 15 | Google({ 16 | clientId: process.env.GOOGLE_CLIENT_ID as string, 17 | clientSecret: process.env.GOOGLE_CLIENT_SECRET as string, 18 | }), 19 | Facebook({ 20 | clientId: process.env.FACEBOOK_CLIENT_ID as string, 21 | clientSecret: process.env.FACEBOOK_CLIENT_SECRET as string, 22 | }), 23 | ], 24 | pages:{ 25 | signIn:"/signin" 26 | } 27 | }); 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /src/public/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bhanu-code/OpenLMS/58e73e7b8124f079f1c5da6037276943c8faed24/src/public/bg.jpg -------------------------------------------------------------------------------- /tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | const config: Config = { 4 | darkMode: ["class"], 5 | content: [ 6 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 8 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 9 | ], 10 | theme: { 11 | extend: { 12 | colors: { 13 | background: 'hsl(var(--background))', 14 | foreground: 'hsl(var(--foreground))', 15 | card: { 16 | DEFAULT: 'hsl(var(--card))', 17 | foreground: 'hsl(var(--card-foreground))' 18 | }, 19 | popover: { 20 | DEFAULT: 'hsl(var(--popover))', 21 | foreground: 'hsl(var(--popover-foreground))' 22 | }, 23 | primary: { 24 | DEFAULT: 'hsl(var(--primary))', 25 | foreground: 'hsl(var(--primary-foreground))' 26 | }, 27 | secondary: { 28 | DEFAULT: 'hsl(var(--secondary))', 29 | foreground: 'hsl(var(--secondary-foreground))' 30 | }, 31 | muted: { 32 | DEFAULT: 'hsl(var(--muted))', 33 | foreground: 'hsl(var(--muted-foreground))' 34 | }, 35 | accent: { 36 | DEFAULT: 'hsl(var(--accent))', 37 | foreground: 'hsl(var(--accent-foreground))' 38 | }, 39 | destructive: { 40 | DEFAULT: 'hsl(var(--destructive))', 41 | foreground: 'hsl(var(--destructive-foreground))' 42 | }, 43 | border: 'hsl(var(--border))', 44 | input: 'hsl(var(--input))', 45 | ring: 'hsl(var(--ring))', 46 | chart: { 47 | '1': 'hsl(var(--chart-1))', 48 | '2': 'hsl(var(--chart-2))', 49 | '3': 'hsl(var(--chart-3))', 50 | '4': 'hsl(var(--chart-4))', 51 | '5': 'hsl(var(--chart-5))' 52 | } 53 | }, 54 | borderRadius: { 55 | lg: 'var(--radius)', 56 | md: 'calc(var(--radius) - 2px)', 57 | sm: 'calc(var(--radius) - 4px)' 58 | }, 59 | animation: { 60 | gradient: 'gradient 8s linear infinite' 61 | }, 62 | keyframes: { 63 | gradient: { 64 | to: { 65 | backgroundPosition: 'var(--bg-size) 0' 66 | } 67 | } 68 | } 69 | } 70 | }, 71 | plugins: [require("tailwindcss-animate")], 72 | }; 73 | export default config; 74 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./src/*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | --------------------------------------------------------------------------------