diff --git a/docs/installation/_category_.json b/docs/installation/_category_.json new file mode 100644 index 0000000..2c1e228 --- /dev/null +++ b/docs/installation/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Installation", + "position": 2, + "link": { + "type": "generated-index", + "description": "Orion Installation Guide" + } +} diff --git a/docs/installation/prerequisites.md b/docs/installation/prerequisites.md new file mode 100644 index 0000000..0de44fe --- /dev/null +++ b/docs/installation/prerequisites.md @@ -0,0 +1,29 @@ +--- +sidebar_position: 1 +--- + +# Prerequisites + +Before diving into Orion, you’ll need a few things to get started. Don’t worry, it’s a quick checklist! + +## 1. **Node.js & Npm** +Orion is built on top of Node.js and Express, so having the latest stable version of Node.js installed is essential. You can download Node.js from [Node.js Official Website](https://nodejs.org). + +```bash +# Verify your Node.js installation. Ensure you have version v22.8.0 or higher. +>>> node -v + +# Verify your Npm installation. Ensure you have version v10.8.3 or higher. +>>> npm -v +``` + +## 2. Git +Git is necessary to clone the Orion starter project and push your awesome changes. If you don't already have Git installed, you can get it from [Git's Official Website](https://git-scm.com). + +```bash +# Verify your Git installation. +>>> git -v +``` + +## 3. Basics of JavaScript & Express +While Orion takes care of most of the heavy lifting, having a basic understanding of JavaScript and Express.js will help you customize and extend Orion with ease. Don’t worry, Orion keeps things friendly and simple! diff --git a/docs/installation/step-by-step-guide.md b/docs/installation/step-by-step-guide.md new file mode 100644 index 0000000..9348146 --- /dev/null +++ b/docs/installation/step-by-step-guide.md @@ -0,0 +1,61 @@ +--- +sidebar_position: 2 +--- + +# Initiation + +Let’s get Orion up and running! Now that you’ve completed the prerequisites, let’s install and configure Orion for your development environment. + +## 1. **Clone the Project** +Start by cloning the Orion's repository to your local machine. + +```bash +>>> git clone https://github.com/kartikmehta8/orion.git +>>> cd orion # Get into the folder. +``` + +## 2. Install Dependencies +Run the following command to install all necessary dependencies. + +```bash +>>> npm install +``` +This will install all the packages defined in the package.json file. + +## 3. Set Up Environment Variables +Orion uses environment variables to configure its settings. Create a `.env` file in the root of your project, or rename `.env.sample` to `.env`. + +```bash +>>> touch .env +``` + +Your `.env` file should be structured as follows: + +``` +PORT=3000 +ENVIRONMENT="development" +``` + +- **PORT:** Specifies the port on which the server should run. +- **ENVIRONMENT:** Indicates the environment mode, either `production` or `development`. + +## 4. Run the Application +After setting up the environment variables, start the server. + +```bash +>>> npm run dev # For Development +OR +>>> npm start # For Production +``` + +This will start the Orion server on the specified port (default is `3000`). If everything is set up correctly, you should see a success message in your console. + +```bash +[nodemon] starting `node index.js` +[INFO] Visit /visualize to see information about the routes. +[INFO] Server running on port 3000. +``` + +Congratulations! 🎉 + +You’ve built a fully-fledged server with everything set up, from controllers and routers to middleware and databases. Follow the console messages to explore what’s happening at `/visualize`, and then return to discuss the commands that Orion offers. diff --git a/docs/intro.md b/docs/intro.md deleted file mode 100644 index 45e8604..0000000 --- a/docs/intro.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Tutorial Intro - -Let's discover **Docusaurus in less than 5 minutes**. - -## Getting Started - -Get started by **creating a new site**. - -Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**. - -### What you'll need - -- [Node.js](https://nodejs.org/en/download/) version 18.0 or above: - - When installing Node.js, you are recommended to check all checkboxes related to dependencies. - -## Generate a new site - -Generate a new Docusaurus site using the **classic template**. - -The classic template will automatically be added to your project after you run the command: - -```bash -npm init docusaurus@latest my-website classic -``` - -You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor. - -The command also installs all necessary dependencies you need to run Docusaurus. - -## Start your site - -Run the development server: - -```bash -cd my-website -npm run start -``` - -The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there. - -The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. - -Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes. diff --git a/docs/introduction.md b/docs/introduction.md new file mode 100644 index 0000000..94f6dc4 --- /dev/null +++ b/docs/introduction.md @@ -0,0 +1,34 @@ +--- +sidebar_position: 1 +--- + +# Introduction + + +:::tip From the creator +ChatGPT helped you get started with the backend in hours instead of days. Orion will help you get started with the backend **in minutes** instead of hours. +::: + +Sounds intriguing, doesn't it? + +## Orion - Express on Steroids + +*What if we told you that all you need to do is run **npm install**, and your Express server is fully configured and ready to go?* + +Orion is a highly modular, scalable, and efficient backend framework that sits on top of Express.js. It aims to simplify backend development with its plug-and-play architecture, a customizable CLI, and an easy-to-extend infrastructure. + +- **No more complex setup rituals**. Orion’s CLI handles everything for you, so you don't need to chant `npm init` thrice under the moon. +- **No more reinventing the wheel**. Your wheel’s already turbocharged here! 🚀 + +## Why Choose Orion Over Other Frameworks? + +If you’re tired of manually managing routes, middlewares, and connections with existing backend frameworks, then Orion is here to save the day! + +### 1. CLI Commands +Most frameworks make you manually define everything and follow 21 different tutorial steps before you can say "Hello World." But Orion's CLI is like your coding assistant that generates everything you need with a simple command. Think of it as having a genie, but without the questionable wish limitations. + +### 2. Dynamic Imports +Orion supports modular definitions for routes, controllers, and middleware, making them **pluggable, reusable, and customizable**. You no longer have to deal with lines of unmanageable code stuffed inside `app.js`. Now you can say, "Separate my concerns, routes, controllers, and middleware," and it just works! + +### 3. Better than Just Being RESTful +While everyone else is busy trying to "REST" (pun intended), Orion aims to keep you **RESTed and ready**. You get a pre-configured, extendable, and structured system without the overhead. diff --git a/docs/tutorial-basics/_category_.json b/docs/tutorial-basics/_category_.json deleted file mode 100644 index 2e6db55..0000000 --- a/docs/tutorial-basics/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Tutorial - Basics", - "position": 2, - "link": { - "type": "generated-index", - "description": "5 minutes to learn the most important Docusaurus concepts." - } -} diff --git a/docs/tutorial-basics/congratulations.md b/docs/tutorial-basics/congratulations.md deleted file mode 100644 index 04771a0..0000000 --- a/docs/tutorial-basics/congratulations.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Congratulations! - -You have just learned the **basics of Docusaurus** and made some changes to the **initial template**. - -Docusaurus has **much more to offer**! - -Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**. - -Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610) - -## What's next? - -- Read the [official documentation](https://docusaurus.io/) -- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config) -- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration) -- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout) -- Add a [search bar](https://docusaurus.io/docs/search) -- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase) -- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support) diff --git a/docs/tutorial-basics/create-a-blog-post.md b/docs/tutorial-basics/create-a-blog-post.md deleted file mode 100644 index 550ae17..0000000 --- a/docs/tutorial-basics/create-a-blog-post.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Create a Blog Post - -Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed... - -## Create your first Post - -Create a file at `blog/2021-02-28-greetings.md`: - -```md title="blog/2021-02-28-greetings.md" ---- -slug: greetings -title: Greetings! -authors: - - name: Joel Marcey - title: Co-creator of Docusaurus 1 - url: https://github.com/JoelMarcey - image_url: https://github.com/JoelMarcey.png - - name: Sébastien Lorber - title: Docusaurus maintainer - url: https://sebastienlorber.com - image_url: https://github.com/slorber.png -tags: [greetings] ---- - -Congratulations, you have made your first post! - -Feel free to play around and edit this post as much as you like. -``` - -A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings). diff --git a/docs/tutorial-basics/create-a-document.md b/docs/tutorial-basics/create-a-document.md deleted file mode 100644 index c22fe29..0000000 --- a/docs/tutorial-basics/create-a-document.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Create a Document - -Documents are **groups of pages** connected through: - -- a **sidebar** -- **previous/next navigation** -- **versioning** - -## Create your first Doc - -Create a Markdown file at `docs/hello.md`: - -```md title="docs/hello.md" -# Hello - -This is my **first Docusaurus document**! -``` - -A new document is now available at [http://localhost:3000/docs/hello](http://localhost:3000/docs/hello). - -## Configure the Sidebar - -Docusaurus automatically **creates a sidebar** from the `docs` folder. - -Add metadata to customize the sidebar label and position: - -```md title="docs/hello.md" {1-4} ---- -sidebar_label: 'Hi!' -sidebar_position: 3 ---- - -# Hello - -This is my **first Docusaurus document**! -``` - -It is also possible to create your sidebar explicitly in `sidebars.js`: - -```js title="sidebars.js" -export default { - tutorialSidebar: [ - 'intro', - // highlight-next-line - 'hello', - { - type: 'category', - label: 'Tutorial', - items: ['tutorial-basics/create-a-document'], - }, - ], -}; -``` diff --git a/docs/tutorial-basics/create-a-page.md b/docs/tutorial-extras/create-a-page.md similarity index 97% rename from docs/tutorial-basics/create-a-page.md rename to docs/tutorial-extras/create-a-page.md index 20e2ac3..6e446a7 100644 --- a/docs/tutorial-basics/create-a-page.md +++ b/docs/tutorial-extras/create-a-page.md @@ -1,6 +1,4 @@ ---- -sidebar_position: 1 ---- + # Create a Page diff --git a/docs/tutorial-basics/deploy-your-site.md b/docs/tutorial-extras/deploy-your-site.md similarity index 100% rename from docs/tutorial-basics/deploy-your-site.md rename to docs/tutorial-extras/deploy-your-site.md diff --git a/docs/tutorial-basics/markdown-features.mdx b/docs/tutorial-extras/markdown-features.mdx similarity index 100% rename from docs/tutorial-basics/markdown-features.mdx rename to docs/tutorial-extras/markdown-features.mdx diff --git a/docusaurus.config.js b/docusaurus.config.js index 982baff..6c73200 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -90,7 +90,7 @@ const config = { items: [ { label: 'Tutorial', - to: '/docs/intro', + to: '/docs/introduction', }, { label: 'Blog',