repo
stringlengths
8
123
branch
stringclasses
178 values
readme
stringlengths
1
441k
description
stringlengths
1
350
topics
stringlengths
10
237
createdAt
stringlengths
20
20
lastCommitDate
stringlengths
20
20
lastReleaseDate
stringlengths
20
20
contributors
int64
0
10k
pulls
int64
0
3.84k
commits
int64
1
58.7k
issues
int64
0
826
forks
int64
0
13.1k
stars
int64
2
49.2k
diskUsage
float64
license
stringclasses
24 values
language
stringclasses
80 values
Im-Rises/nbody-simulator-docker
main
# nbody-simulator-docker <p align="center"> <img src="https://user-images.githubusercontent.com/59691442/183268126-b3d19e66-8f2d-463a-805e-ae6ef7cc6c01.png" alt="cmakeLogo" style="height:60px;"/> <img src="https://img.shields.io/badge/C%2B%2B-00599C?style=for-the-badge&logo=c%2B%2B&logoColor=white" alt="cppLogo" style="height:60px;"/> <img src="https://img.shields.io/badge/OpenGL-FFFFFF?style=for-the-badge&logo=opengl" alt="openglLogo" style="height:60px;"/> <img src="https://github.com/Im-Rises/nbody-simulator-docker/assets/59691442/b527fd70-f38f-4384-878d-3de6929e1e30" alt="imGuiLogo" style="height:60px;"/> <img src="https://user-images.githubusercontent.com/59691442/190315147-ec9dc33f-0090-4f0d-98ab-514eb1463e01.png" alt="glfwLogo" style="height:60px;"/> </p> [//]: # ( <img src="https://img.shields.io/badge/ImGui-FFFFFF?style=for-the-badge&logo=imGui" alt="imGuiLogo" style="height:60px;"/>) ## Description This is a simple n-body simulator made with OpenGL for the graphics part and C++ for the logic part. The project is running on a complete docker environment. > **Note** > The project is a test of paralleling the calculation of the particles on different docker containers and store them in > a redis database. > A docker is also used to generate the video from the redis database. ## Videos [//]: # (https://github.com/Im-Rises/nbody-simulator-docker/assets/59691442/59ef1c71-e2bb-4bd5-99f8-66eace4280b5) https://github.com/Im-Rises/nbody-simulator-docker/assets/59691442/622717a8-b508-4221-a79e-f00c07475979 Longer video 🚀🚀 [here](https://www.youtube.com/watch?v=OisxyKE_ioU) 🚀🚀 ## How to use To use the project, you need to have docker installed on your computer. You can download it here: <https://www.docker.com/> You also need to install the following linux lib: ```bash sudo apt-get install xvfb ``` You also need python3 installed on your computer. You can download it here: <https://www.python.org/downloads/> Once you have installed the requirements, you can install the python libs with the following command: ```bash pip install -r requirements.txt ``` This will install the required libs to generate the `docker-compose.yml` using the `docker-compose-generator.py` python script. ```bash python3 docker-compose-generator.py <total_particles> <number_of_calculators> <simulation_recording_time> ``` exemple: ```bash python3 docker-compose-generator.py 1000 4 10 ``` This will generate a `docker-compose.yml` file with 4 calculators and 1000 particles and a simulation recording time of 10 seconds. Once created you can run the `docker-compose.yml` with the following command: ```bash ./test.sh ``` An output video will be genereated in the `./src/NBodyGraphics/output_dir` folder. ## Dependencies - OpenGL version: 3.3 - GLSL version: 330 - GLFW version: 3.2.1 - Glad version: 0.1.36 - GLM version: 0.9.9 - OpenCV version: 4.7.0-dev - nlhomann/json version: 3.9.1 - libcurl version: 7.74.0 ## Architecture ```mermaid flowchart LR subgraph Host subgraph Docker-Calculators docker1 & docker2 & docker... end docker1 & docker2 & docker... <--> |GET/POST| api-redis subgraph Redis api-redis end api-redis --> |Send particles| NBodyGraphics NBodyGraphics --> |Request update| api-redis subgraph Video-Generator end subgraph Video-Generator NBodyGraphics end NBodyGraphics --> |Save video | Volume end ``` ## Logic Diagram ```mermaid graph TB A((Start)) B[NBodyGraphics] C[API-Redis] D[NBodycalculator1] E[NBodycalculator2] F[NBodycalculator3] G[NBodycalculator...] H[API-Redis] I[NBodyGraphics] J[Volume] A --> B B --> | Physic update | C C --> | Particle request update | D & E & F & G D & E & F & G --> | Send updated particles | H H --> | Send updated particles | I I --> | Do another cycle | B I --> | Save video | J ``` ## Libraries docker: <https://www.docker.com/> cmake: <https://cmake.org/> glfw: <https://www.glfw.org/docs/latest/> glm: <https://glm.g-truc.net/0.9.9/index.html> glad: <https://glad.dav1d.de/> OpenGL: <https://www.opengl.org/> Json: <https://github.com/nlohmann/json> libcurl: <https://curl.se/libcurl/> ## Contributors Axel COURMONT: - @Alshkor - <https://github.com/Alshkor> Quentin MOREL: - @Im-Rises - <https://github.com/Im-Rises> Alexis ROVILLE: - @Fromiel - <https://github.com/Fromiel> [![GitHub contributors](https://contrib.rocks/image?repo=Im-Rises/nbody-simulator-docker)](https://github.com/Im-Rises/nbody-simulator-docker/graphs/contributors)
N-body simulator using bruteforce method using docker for calculations
containers,cpp,docker,javascript,n-body,n-body-simulator,nbody-simulation,nodejs,simulator,simulation
2023-05-31T18:10:43Z
2023-06-25T18:34:53Z
null
3
11
178
0
0
3
null
MIT
C++
Good-First-Issue-FOSS/MAC_BOT_FOSS
master
# MAC_BOT MAC_BOT is a Discord bot designed to manage FOSS (Free and Open Source Software) projects in a smooth, simple, and efficient way. ## Installation To use MAC_BOT in your Discord server, follow these steps: 1. Clone the repository: `git clone https://github.com/20B81A05D1/MAC_BOT.git` 2. Install the dependencies: `npm install` 3. Configure the bot by copying the `sample.env` file to `.env` and filling in the values. 4. Run the bot: `npm start` Make sure you have Node.js and npm installed on your system before proceeding with the installation. ## Usage MAC_BOT offers the following commands and functionalities for managing FOSS projects: ### Auth The `auth` command utilizes OAuth 2.0 for authentication and verification of user profiles. It combines information from Discord and GitHub profiles and stores the user profile data in MongoDB. Command: `/auth` ### Profile The `profile` command is used to display the profile of the current user. It retrieves the user's profile information from the stored data in MongoDB. Command: `/profile` ### Projects The `projects` command provides access to different channels related to projects. Sub-channels: - General: A general channel for project discussions and updates. - Ticketing: A channel dedicated to managing project issues and features. #### Ticketing Channel In the ticketing channel, the following commands are available for managing project tickets: - `/r_issue`: Create a new issue for the project. - `/r_feature`: Propose a new feature for the project. - `/r_help`: Request assistance or support from the project admin. ### Channels The `channels` command provides access to different channels within the Discord server. Sub-channels: - Bot Command: A channel for interacting with the bot and executing bot-specific commands. - General: A general channel for non-project-related discussions. - Media: A channel for sharing media files. - Commands: A channel for executing general commands related to the server. Command: `!channels` Feel free to explore these commands and channels to effectively manage your FOSS projects using MAC_BOT. ## Configuration MAC_BOT requires the following configuration: 1.Discord API Token: Obtain a Discord API token by creating a new bot application on the Discord Developer Portal. Place the token in the `.env` file as `DISCORD_API_TOKEN`. ## Contributing Contributions to MAC_BOT are highly encouraged! You can contribute by: - Adding new features - Resolving issues - Enhancing documentation - Improving file structure - Enhancing the README file and comments Please refer to this [video tutorial](https://www.youtube.com/watch?v=nT8KGYVurIU) on how to fork the project and contribute. When contributing, make sure to: - Add comments to your code - Maintain the project structure - Update the `discord1.mdj` (StarUML) file when introducing new features (mandatory) Please open an issue on the GitHub repository if you encounter any problems or have suggestions for improvement. ## License This project is licensed under the [GNU GENERAL PUBLIC LICENSE](LICENSE). ## Documentation Additional documentation and resources can be found in the [Wiki](https://github.com/20B81A05D1/MAC_BOT/wiki) section of the repository. ## Contact If you have any questions or feedback, feel free to reach here: - A. Athithya Ithayan - Email: akilanathithyaithayan.com - Discord ID:ADIIS007#4032 ## Acknowledgments I would like to acknowledge the following individuals for their contributions to the project: - Person 1: @basic-programmer-python - Person 2: @anya-siri
Its a discord bot for managing Github projects in Discord over a very smooth simple and efficient way
discord,discord-js,express-js,github,githubapi,javascript,nodejs,open-source,simple,typescript
2023-06-06T04:52:57Z
2023-06-14T15:37:36Z
null
4
14
38
7
5
3
null
GPL-3.0
HTML
pooulad/ts-note-project
main
# ts-note-project ![Screenshot (26) - Copy](https://github.com/pooulad/ts-note-project/assets/86445458/50700c7e-d2bd-4688-a6ec-9a1241ce684f) A small project has been written about working with typescript <p align="center"> <a href="https://vitejs.dev" target="_blank" rel="noopener noreferrer"> <img width="180" src="https://vitejs.dev/logo.svg" alt="Vite logo"> </a> </p> <br/> <p align="center"> <a href="https://npmjs.com/package/vite"><img src="https://img.shields.io/npm/v/vite.svg" alt="npm package"></a> <a href="https://nodejs.org/en/about/releases/"><img src="https://img.shields.io/node/v/vite.svg" alt="node compatibility"></a> <a href="https://github.com/vitejs/vite/actions/workflows/ci.yml"><img src="https://github.com/vitejs/vite/actions/workflows/ci.yml/badge.svg?branch=main" alt="build status"></a> <a href="https://pr.new/vitejs/vite"><img src="https://developer.stackblitz.com/img/start_pr_dark_small.svg" alt="Start new PR in StackBlitz Codeflow"></a> <a href="https://chat.vitejs.dev"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord" alt="discord chat"></a> </p> <br/> # Vite ⚡ > Next Generation Frontend Tooling - 💡 Instant Server Start - ⚡️ Lightning Fast HMR - 🛠️ Rich Features - 📦 Optimized Build - 🔩 Universal Plugin Interface - 🔑 Fully Typed APIs Vite (French word for "quick", pronounced [`/vit/`](https://cdn.jsdelivr.net/gh/vitejs/vite@main/docs/public/vite.mp3), like "veet") is a new breed of frontend build tooling that significantly improves the frontend development experience. It consists of two major parts: - A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vitejs.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vitejs.dev/guide/features.html#hot-module-replacement). - A [build command](https://vitejs.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production. In addition, Vite is highly extensible via its [Plugin API](https://vitejs.dev/guide/api-plugin.html) and [JavaScript API](https://vitejs.dev/guide/api-javascript.html) with full typing support. [Read the Docs to Learn More](https://vitejs.dev). ## Packages | Package | Version (click for changelogs) | | ----------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------- | | [vite](packages/vite) | [![vite version](https://img.shields.io/npm/v/vite.svg?label=%20)](packages/vite/CHANGELOG.md) | | [@vitejs/plugin-legacy](packages/plugin-legacy) | [![plugin-legacy version](https://img.shields.io/npm/v/@vitejs/plugin-legacy.svg?label=%20)](packages/plugin-legacy/CHANGELOG.md) | | [create-vite](packages/create-vite) | [![create-vite version](https://img.shields.io/npm/v/create-vite.svg?label=%20)](packages/create-vite/CHANGELOG.md) | ## Contribution See [Contributing Guide](CONTRIBUTING.md). ## License [MIT](LICENSE). ## Sponsors <p align="center"> <a target="_blank" href="https://github.com/sponsors/yyx990803"> <img alt="sponsors" src="https://sponsors.vuejs.org/vite.svg"> </a> </p>
🚨A small project has been written about working with typescript
dropdown-menu,html-css-javascript,javascript,react,reactjs,typescript,vite
2023-06-04T22:48:38Z
2024-01-21T15:58:19Z
null
1
1
16
0
0
3
null
null
TypeScript
OmkarKamble1/uLink
main
# uLink 🔗 uLink is a simple URL shortening tool built with Next.js 13. ## Introduction uLink is a simple and easy-to-use URL shortening service that allows users to create shortened versions of long URLs. It is built with Next.js 13, a popular React framework, and provides a fast and responsive user interface. With uLink, users can create short links to share on social media platforms, in emails, or any other medium where long URLs are not desirable. The shortened links are much more manageable and aesthetically pleasing. ## Features - Shorten long URLs to concise and easy-to-share links. - Responsive design for optimal viewing on various devices. ## License The uLink project is licensed under the MIT License. _Made with ❤️_
A simple URL shortner.
expressjs,nodejs,postgresql,reactjs,url-shortener,javascript
2023-05-20T21:04:49Z
2023-06-26T17:18:12Z
null
1
0
16
3
0
3
null
MIT
JavaScript
wdhdev/embed
main
# Embed A simple embed generator. **Backend** ![Backend](https://skillicons.dev/icons?i=nodejs,ts,express,sentry) **Frontend** ![Frontend](https://skillicons.dev/icons?i=html,tailwind,js)
A simple embed generator.
discord,embed,html,html5,javascript,js,nodejs,tailwind,tailwindcss
2023-06-08T10:13:08Z
2024-05-17T04:10:06Z
null
1
90
180
0
0
3
null
MIT
EJS
datablock-dev/SwiftCSS
main
null
A CSS framework inspired by Tailwindcss with attribute styling to split styling and reduce dependency and size of classes in elements and components.
chokidar,css,css-framework,javascript,node,nodejs,sass,scss
2023-05-20T16:07:35Z
2024-05-20T12:39:48Z
null
1
16
203
0
0
3
null
MIT
CSS
Dorcas126/final-capstone-project-1
main
<a name="readme-top"></a> <div align="center"> <!-- You are encouraged to replace this logo with your own! Otherwise you can also remove it. --> <img src="https://dl.dropboxusercontent.com/s/36qn9s23n9mgsth/dorcaslogo.png" alt="logo" width="" height="auto" /> <br/> <h3><b></b></h3> </div> <!-- TABLE OF CONTENTS --> # 📗 Table of Contents - [📖 About the Project](#about-project) - [🛠 Built With](#built-with) - [Tech Stack](#tech-stack) - [Key Features](#key-features) - [🚀 Live Demo](#live-demo) - [💻 Getting Started](#getting-started) - [Setup](#setup) - [Prerequisites](#prerequisites) - [Install](#install) - [Usage](#usage) - [Run tests](#run-tests) - [Deployment](#deployment) - [👥 Authors](#authors) - [🔭 Future Features](#future-features) - [🤝 Contributing](#contributing) - [⭐️ Show your support](#support) - [🙏 Acknowledgements](#acknowledgements) - [📝 License](#license) <!-- PROJECT DESCRIPTION --> # 📖 [setup and mobile first project] This is my first project on Microverse I add a heading to my html file and styled it , by giving it a color. ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> <details> <summary>HTML</summary> <ul> <li><a href="https://reactjs.org/">React.js</a></li> </ul> </details> <details> <summary>CSS</summary> <ul> <li><a href="https://expressjs.com/">Express.js</a></li> </ul> </details> <details> <summary>JS</summary> <ul> <li><a href="https://expressjs.com/">Express.js</a></li> </ul> </details> <!-- Features --> ### Key Features - **[Add HTML]** - **[Add css]** - **[Add Desktop and Mobile screen responsiveness]** <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LIVE DEMO SECTION--> ## 🚀 Live Demo - [Live Demo Link](https://dorcas126.github.io/final-capstone-project-1/) - [Link to my video] (https://drive.google.com/file/d/1tXLM-2YoC6D4TVei7hZyoYBMZ34V9HiD/view) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- GETTING STARTED --> ## 💻 Getting Started To get a local copy up and running, follow these steps. just visit my repo folder (https://github.com/Dorcas126/final-capstone-project-1) ### Prerequisites In order to run this project you need: any code editor but mostly use Vs code ### Setup Clone this repository to your desired folder: https://github.com/Dorcas126/final-capstone-project-1.git ### Install Install this project with: Github Vs code to be able to access the code ### Usage To run the project, execute the following command: Linters git commands ### Run tests To run tests, run the following command: Linters <!-- AUTHORS --> ## 👥 Authors 👤 **Uwimbabazi Dorcas** - GitHub: [@Dorcas126](https://github.com/Dorcas126) - Twitter: [@Dorcasuw](https://twitter.com/Dorcasuwi) - LinkedIn: [Uwimbabazi Dorcas](https://www.linkedin.com/in/uwimbabazi-dorcas-956a5a226/) <!-- CONTRIBUTING --> ## 🤝 Contributing Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](../../issues/). <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- Future Features --> ### Future Features - **[Add functionality using JS]** - **[Add Boostrap to my html file]** <!-- SUPPORT --> ## ⭐️ Show your support If you like this project create an issue or comment on my project , i will be glad to hear from you . Thank you. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments I would like to thank [Cindy Shin](https://www.behance.net/adagio07) in Behance. Thank you <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE --> ## 📝 License <a name="license"></a> This project is [MIT](./LICENSE) licensed.
This is my first capstone project at Microverse which I implemented a conference page by using the following technologies: HTML CSS JavaScript
css,html,javascript
2023-05-27T15:17:30Z
2023-06-01T19:36:44Z
null
1
1
20
2
0
3
null
MIT
HTML
Josttin-Mendez/Hangman-game
main
# Hangman Game Challenge - ALURA LATAM - ORACLE ONE EDUCATION ### Index - [Project description](#Project-description) - [Technologies used](#Technologies-used) - [Features](#Features) ## Project description Game created to guess the secret word, without dying trying. **Features:** - Responsive Design - Mobile UI - Desktop UI - Light mode - Dark mode with localstorage - Gallows drawing made with canvas - Custom alert notifications ## Technologies used <img src="https://cdn-icons-png.flaticon.com/512/174/174854.png" width='30px' ><img src="https://cdn-icons-png.flaticon.com/512/732/732190.png" width='30px' ><img src="https://cdn-icons-png.flaticon.com/512/5968/5968292.png" width='30px' ><img src="https://cdn.icon-icons.com/icons2/1088/PNG/512/1485282157-adobe-photoshop-raster-graphics-editor-cc-creative-cloud_78285.png" width='33px' > --- ![pagg](https://github.com/Josttin-Mendez/Juego-del-Ahorcado/assets/112291940/1a865eef-22f3-4465-8a3e-d75851d4ac05) ### Installation: - First of all, **clone the repository** using: ``` https://github.com/Josttin-Mendez/Hangman-game.git ``` **OR** Download the Zip and extract it's contents. ### Usage: - After installation, just run the [`index.html`](https://github.com/Josttin-Mendez/Hangman-game/blob/main/index.html) using ``` index.html ```
Game created to guess the secret word, without dying trying.
css,game,hangman,html,javascript
2023-06-06T14:47:52Z
2023-06-08T17:37:07Z
null
1
0
9
0
0
3
null
null
CSS
BTS-CM/airdrop_tool
main
# Airdrop tool for Bitshares based blockchains An airdropping tool for Bitshares based blockchains. * Fetches tickets * Creates blockchain tickets * Upgrades accounts to lifetime-membership * Creates ticket leaderboards * Enables ticket & account analysis * Enables airdrop distribution calculation based on provably fair inputs * Create custom airdrops from uploaded JSON data * Begin airdropping blockchain tokens in custom sized batches This tool integrates with the [latest BEET wallet](https://github.com/bitshares/beet/releases). Perform the following terminal steps in this folder: * With yarn * `yarn install` * `yarn run build && yarn run dev` * With npm * `npm install` * `npm run build && npm run dev` Releases built via github actions: * [Windows, Linux & MacOS](https://github.com/BTS-CM/airdrop_tool/releases)
Fetch & analyse blockchain tickets. View leaderboards and user tickets. Calculate and perform provably fair airdrops.
airdrop,bitshares,bitsharesjs,blockchain,crypto,data-analysis,electron,etl,react,data-science
2023-05-26T13:53:09Z
2024-03-02T23:24:12Z
2024-03-02T23:24:20Z
1
2
93
0
1
3
null
MIT
JavaScript
bluedone/msnproduction.com
main
<h1 align ="center" >MULIA SEJATI NUSANTARA PRODUCTION <br/>(MSN PRODUCTION)</h1> <h5 align ="center"> PT. MULIA SEJATI NUSANTARA Established on June 24, 2019, a limited liability company engaged in supplier & contractor services. Then on 22 January 2022 PT. MULIA SEJATI NUSANTARA Opening a new business branch in the Technology Sector which includes Website Creation, Mobile Applications, Branding, Creative Content, Digital Marketing & Advertising. This branch is called "Mulia Sejati Nusantara Production" or abbreviated as MSN PRODUCTION.</h5> <br/> * [Configuration and Setup](#configuration-and-setup) * [Key Features](#key-features) * [Technologies used](#technologies-used) * [📸 Screenshots](#screenshots) * [Author](#author) * [License](#license) ## Configuration and Setup In order to run this project locally, simply fork and clone the repository or download as zip and unzip on your machine. - Open the project in your prefered code editor. In the first terminal ``` $ cd msnproduction.com $ npm install $ npm run start ``` ## Key Features - Home - About - Package - Contact - Blog - Responsive Design <br/> ## Technologies used This project was created using the following technologies. - [React js ](https://www.npmjs.com/package/react) - JavaScript library that is used for building user interfaces specifically for single-page applications - [React Hooks ](https://reactjs.org/docs/hooks-intro.html) - For managing and centralizing application state - [react-router-dom](https://www.npmjs.com/package/react-router-dom) - To handle routing - [Css](https://developer.mozilla.org/en-US/docs/Web/CSS) - For User Interface - [React icons](https://react-icons.github.io/react-icons/) - Small library that helps you add icons to your react apps. - [Tailwind CSS](https://tailwindcss.com/) - For User Interface - [daisyUI](https://daisyui.com/docs/changelog/) - For User Interface - [React Leafet](https://react-leaflet.js.org/) - For User Interface - [Email js](https://www.emailjs.com/) - For User Interface - [Framer Motion](https://www.framer.com/motion/) - For User Interface ## Screenshots ![img-1](https://github.com/berthutapea/msnproduction.com/assets/111676859/99fbd0c0-1f92-4bb7-9802-367e997ee2c3) ---- - ![img-2](https://github.com/berthutapea/msnproduction.com/assets/111676859/28601988-b305-47c4-a2d3-6de2f590bf07) --- - ![img-3](https://github.com/berthutapea/msnproduction.com/assets/111676859/e642ebeb-6090-4825-af78-0ca62ae2482e) --- - ![img-4](https://github.com/berthutapea/msnproduction.com/assets/111676859/7e3ef8cf-6127-41be-86de-66f465d6dc3d) --- - ![img-5](https://github.com/berthutapea/msnproduction.com/assets/111676859/e1301e3f-0dbb-44c6-a0b6-d973087f6140) ## Author - Portfolio: [berthutapea](https://berthutapea.vercel.app/) - Github: [berthutapea](https://github.com/berthutapea) - Sponsor: [berthutapea](https://saweria.co/berthutapea) - Linkedin: [gilberthutapea](https://www.linkedin.com/in/gilberthutapea/) - Email: [berthutapea@gmail.com](mailto:berthutapea@gmail.com) ## License MIT License Copyright (c) 2022 Gilbert Hutapea Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MSN PRODUCTION is a company that provides services for creating websites, mobile applications, branding & creative content, as well as internet marketing & advertising according to your business needs at low prices with luxurious quality
css,daisyui,emailjs,framer-motion,javascript,leaflet,react,react-icons,react-leaflet,react-slick
2023-05-23T07:38:56Z
2023-05-21T17:06:28Z
null
2
0
484
0
0
3
null
MIT
JavaScript
2sh/base-formatter
master
# Base Formatter A Javascript library for encoding numbers to any base with various formatting options. ## Features - Encode and decode to and from any radix/base. - Use specified symbols (digits, sign, radix character, padding, separators) to represent the encoded number. - Adjust integer and fractions lengths. - Adding "thousands" grouping separators, grouping at adjustable lengths. - A choice of various rounding modes. - Scientific and engineering notation. - Alternatively output as a numeral object, to represent numbers in bases without the use of digit symbols. - Encoding of decimal.js values for more precision. ## Documentation - The API reference can be found [here](https://2sh.github.io/base-formatter/modules.html). - [`BaseFormatter`](https://2sh.github.io/base-formatter/classes/BaseFormatter.html) - Makes use of specified symbols and formatting options to represent the numbers. - [`BaseConverter`](https://2sh.github.io/base-formatter/classes/BaseConverter.html) - Alternatively represents numbers as numberal objects. ## Installation Installing the [NPM package](https://www.npmjs.com/package/base-formatter): - Yarn ``` yarn add base-formatter ``` - NPM ``` npm install base-formatter ``` ## Usage ### Importing - ES module ```js import { BaseFormatter, BaseConverter } from 'base-formatter' // For just the BaseFormatter, simply: import BaseFormatter from 'base-formatter' ``` - CommonJS ```js const { BaseFormatter, BaseConverter } = require('base-formatter') ``` ### Examples ```js const base16Greek = new BaseFormatter('0123456789ΑΒΓΔΕΖ', {radixCharacter: ','}) // or for just the A-F characters, BaseFormatter.hexadecimal({...}) const dozenal = BaseFormatter.dozenal() dozenal.encode(142) // '↋↊' dozenal.encode(144) // '100' dozenal.encode(1/3, {minimumIntegerDigits: 3, minimumFractionDigits: 3}) // '000;400' dozenal.encode(1.6, {roundingMode: 'ceil', fractionDigits: 0}) // '2' dozenal.encode(-1.6, {roundingMode: 'floor', fractionDigits: 0}) // '-2' base16Greek.encode(13) // 'Δ' base16Greek.encode(5e-6, {notation: 'scientific', maximumFractionDigits: 3}) // '1,Β1e-5' dozenal.decode('↊;9429e↊') // 667430129664 dozenal.isNumber('↊;9429e↊') // true // Making use of numeral outputs: const base120 = new BaseConverter(120) base120.encode(-1440) // { isNegative: true, integer: [ 12, 0 ], fraction: [], exponent: 0 } base120.encode(6347544.3456, {notation: 'scientific', maximumFractionDigits: 5}) // { isNegative: false, integer: [ 3 ], fraction: [ 80, 96, 24, 41, 57 ], exponent: 3 } base120.decode({ isNegative: false, integer: [ 3 ], fraction: [ 80, 96, 24, 41, 57 ], exponent: 3 }) // 6347544.345625 ```
A Javascript library for encoding numbers to any base with various formatting options.
base,base57,base58,base62,dozenal,duodecimal,formatting,hexadecimal,radix,sexagesimal
2023-05-31T17:29:31Z
2023-06-07T12:48:21Z
null
1
2
120
0
0
3
null
MPL-2.0
TypeScript
ShahadatShuvo/FullStack-Ecommerce
main
# FullStack-Ecommerce # Frontend with React and Backend with Django This repository contains the code for the front-end and back-end components of a web application built with React and Django. ## Frontend ### frontend Live Server: [vmart-frontend.vercel.app](https://vmart-frontend.vercel.app/) This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## Getting Started First, run the development server: ```bash npm run dev # or yarn dev # or pnpm dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. ## Learn More To learn more about Next.js, take a look at the following resources: - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! ## Deploy on Vercel The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. ## Backend ### Backend Live server: [vmart-backend.up.railway.app](https://vmart-backend.up.railway.app/) The backend is built using Django, a high-level Python web framework. It handles the server-side logic and provides APIs for the front-end to interact with. ### Prerequisites Before running the backend, ensure that you have the following software installed: - Python (version > 3.10) - Django (version 4.2.1) ### Installation 1. Navigate to the `backend` directory: `cd backend`. 2. Create a virtual environment (recommended): `python -m venv venv` || `py -m venv venv`. [If not installed] 3. Activate the virtual environment: - On Windows: `venv\Scripts\activate.bat` - On macOS/Linux: `source venv/bin/activate` 4. Install the dependencies: `pip install -r requirements.txt`. [If not installed] 5. Apply the database migrations: `python manage.py migrate`. [If not installed] 6. Start the development server: `python manage.py runserver`. 7. Open your web browser and visit `http://localhost:8000` to view the backend API. ### Folder Structure The backend code is organized as follows: - `manage.py`: The entry point for Django commands. - `backend/`: The Django project directory. - `api/`: Contains the API views, serializers, and URLs. - `models/`: Contains the database models. - `views/`: Contains additional views or viewsets. ## Contributing If you would like to contribute to this project, feel free to open a pull request or submit an issue. Contributions are always welcome! ## License This project is licensed under the [MIT License](LICENSE).
This is a full functional Ecommerce App, built with NextJs and Django
django,django-rest-framework,javascript,mui,nextjs,reactjs,rest-api,tailwindcss
2023-05-28T16:54:10Z
2023-07-14T09:21:53Z
null
2
351
775
0
0
3
null
null
TypeScript
Rasulwebs/CRM_Postgress
master
null
System Server and Database part for educational centers. It includes system management and data exchange control.
express,javascript,nodejs,posgresql,jwt,nodemailer
2023-05-17T18:51:06Z
2023-05-17T18:50:47Z
null
1
0
1
0
0
3
null
null
JavaScript
iamAkashNad/ATOM
master
![ATOM Screenshot](https://i.imgur.com/MxE32Ff.png) # ATOM - A Code Editor x Compiler This project is a MERN Stack project.And it Supports C, C++, Java, JavaScript & Python. ## Tools & Dependencies - [React.js](https://react.dev/) is used for frontend. - [Node.js](https://nodejs.org/en/docs) is used for writing js in backend & along with [Express.js](https://expressjs.com/en/5x/api.html) framework is used. - [MongoDB](https://www.mongodb.com/docs/) is used for store jobs related to codes submitted by different users. - [Mongoose](https://mongoosejs.com/docs/guide.html) is used for establishing connection between node server and mongo server. - [Bull](https://github.com/OptimalBits/bull) is used for queue the jobs in a correct manner. - [uuid](https://www.npmjs.com/package/uuid) package is used for generating unique ids for giving name of the code file in backend. - [fs-extra](https://www.npmjs.com/package/fs-extra) package is used for deleting the code file after the execution is over in backend. ## Workflow - In frontend an user submit his/her written code alongside with the language to the ``/run`` endpoint. - For that endpoint in the corresponded controller action, backend first check the submitted data is valid or not. if not return a 400(bad request) response, But if the data is valid then I first create a file for the code content and give an unique name to that file and adds an extension as per the language of the code which comes with request. That code file will save in ``/codes`` folder. After that I create a job for the code file with its path and language & save it to the database with status pending. And after that push the ``_id`` field value of that job to the queue which is managed by **bull**. And after that I send the ``_id`` value of that job as response to the frontend. - In frontend, when I receive the jobId for the submitted code then in **react** I started to send rendom request to the ``/status`` endpoint with an query parameter ``id=\\jobId\\`` per 500ms until It doesn't get the job detail as response which has ``job.status !== "Pending"``. - In backend, for ``/status`` endpoint in the corresponding controller action I simply send back the job details as response for that job Id came with the request to this endpoint. And if the job is not pending after sending the response I delete the job from database. - The job ids are poped from the front of the queue and assign to any of the free worker by **bull** and the code file(which is led by the path which is store in that job for that corresponding job Id) is executes in the background and when the execution for that code file is over, the **output/error** is store in that job in database with a updated status **success/error**. And if the execution of that code file takes too long for an example more than 1 minute, I simply stop the execution and set the status for the job of that code file as **Timeout**. And when the execution of the code file is over, I delete the code file. ## Feature In Editor - As an user, You can change the theme of the editor as your preference. - You can change font size for the code in the editor. - For increasing your coding speed you can enable the **autocomplete** option. - You can use the editor both from your laptop and phone. ## Purpose This editor's main audience are the begginers who just start coding. I basically want to less the pain of installing this and that environment & software for coding. And also the pain of signup & login and then remember the credentials before start coding on any online editor. In **ATOM**, you just need a laptop or mobile and internet to start coding. ***Simple & Easy!***
An Online IDE project which supports 5 languages such C, C++, Java, JavaScript & Python👩‍💻🚀💻
css,javascript,mongodb,nodejs,reactjs,bootstrap,mongoose,bull,expressjs,ace-editor
2023-06-07T12:39:48Z
2023-06-09T07:00:20Z
null
1
0
26
0
0
3
null
null
JavaScript
mdmahfuzrp/tv-shows-app
main
# TV Show App - Internship Test ## Technology Used: Javascript, React JS, React Router ### Live Site Link: [Tv Show App - Live](https://tv-shows-app-react.netlify.app) ### Source Code Link: [Tv Show App - Code](https://github.com/mdmahfuzrp/tv-shows-app) **Dear Hiring Team,** <br> I have created a TV show app with separate cards for each show on the home page, including a banner. The cards display the show's name, picture, and a "Show Details" button. After Clicking on the button takes you to a details page where you can find specific details about the show. - On the show details page, you can view various details and "Book Movie Ticket" button. After clicking this button a form modal will open with some extra show details and asking for confirmation to book the show. - If confirmed, the show's data will be saved in local storage. - There is also a "My Bookings" page where you can view your booked shows. - Let me know if you have any questions! **Developer** <br> *Md Mahfuz RP*
Tv Show App Live Site
javascript,javascript-library,md-mahfuz-rp,react,react-hooks,react-router,reactjs,tv,tv-show-app
2023-06-02T13:17:13Z
2023-06-02T14:14:49Z
null
1
0
4
0
0
3
null
null
JavaScript
PHANTOMGOD2OP/Metaversus
master
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## Getting Started First, run the development server: ```bash npm run dev # or yarn dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. ## Learn More To learn more about Next.js, take a look at the following resources: - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! ## Deploy on Vercel The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
This is a UI/UX Website Inspired by the Metaverse Theory , my portflio website https://phantomgod-dev.netlify.app
react,tailwindcss,javascript
2023-05-21T08:51:42Z
2023-07-08T08:13:45Z
null
1
0
3
0
0
3
null
MIT
JavaScript
sonatipek/academi
main
# TECH STACK - Astro.js - Alpine.js - Vue.js - Bootstrap
null
astro,astrojs,bootstrap,bootstrap5,javascript,sonatipek,vue,vuejs
2023-06-07T21:28:46Z
2023-10-18T12:15:28Z
null
1
0
49
0
0
3
null
null
Astro
jofftiquez/fakerjsui.com
main
# Faker.js UI Website [App Demo](https://app.fakerjsui.com/#/) [App Repo](https://github.com/jofftiquez/faker-js-ui) ![Screen Shot 2023-05-25 at 12 41 31 AM](https://github.com/jofftiquez/fakerjsui.com/assets/8638243/785c2638-af34-4885-9b12-694545f611ed)
Faker.js UI Website
faker,fakerjs,fakerui,javascript
2023-05-24T09:23:14Z
2023-07-28T03:08:43Z
null
1
0
20
0
0
3
null
null
JavaScript
0trava/showcase-3d-effect
main
<h2>Showcase-3d</h2> <p> Done a small 3D scene with using HTML, CSS and JavaScript. Interesting layout techniques were used - an animated background, iridescent stage lighting, a 3D item rotation effect and a custom slide switching effect using cubic-bezier. </p> <p>Link to the lesson with materials - <a href="https://webdesign-master.ru/blog/html-css/showcase-3d-effect.html">here</a></p> ![image](https://github.com/0trava/showcase-3d-effect/assets/102797527/739cd9d9-f61e-41ff-b97f-a0a61e92a0ea)
PRACTICAL WORK A small 3D scene [ HTML, CSS and JS ]
css,html,javascript
2023-05-17T18:37:29Z
2023-05-20T09:45:17Z
null
1
0
29
0
0
3
null
null
CSS
proxygo/como-se-salvar-de-um-dragao
main
<div align="center"> <img src=".github/assets/badge.png" width="230px" /> </div> <br/> <div align="center"> <img src="https://img.shields.io/github/languages/count/vcwild/tcc-proxy?color=%23ff3cbe&style=flat-square" alt="languages" /> <img src="https://img.shields.io/github/license/vcwild/tcc-proxy?color=%23ff3cbe&style=flat-square" alt="license" /> <img src="https://img.shields.io/github/repo-size/vcwild/tcc-proxy?color=%23ff3cbe&style=flat-square" alt="repo size" /> <img src="https://img.shields.io/github/actions/workflow/status/vcwild/tcc-proxy/build.yml?branch=main&style=flat-square&color=%23ff3cbe" alt="build" /> </div> # tcc-proxy This Proxy Go's final project. It is an interactive e-book history. ## References - [Mental canvas](https://www.mentalcanvas.com/) ## License This project is licensed with an All Rights Reserved license - see the [LICENSE](LICENSE) file for details.
Projeto de Graduação Bacharelado em Design - livro digital interativo: Como se salvar de um dragão
html,css,design,e-book,javascript,mental-canvas
2023-06-03T00:04:57Z
2023-06-02T23:49:06Z
null
2
0
2
0
87
3
null
NOASSERTION
CSS
Kochou11/Zoro.to-landing-page-clone-kocho-version
main
# Zoro.to-landing-page-clone-kocho-version Zoro.to landing page clone with kocho version.
Zoro.to landing page clone with kocho version.
anime-website,css,html,html-css-javascript,javascript,landing-page,landingpage,website-template,zoro,zoro-clone
2023-05-24T08:18:40Z
2023-05-24T08:26:22Z
null
1
0
6
0
3
3
null
null
HTML
allysonkaye/password-generator
main
# password-generator Hello, so i made a password generator website using tailwind css and javascript. Any feedback would be greatly appreciated!! **Desktop view:** ![image](https://github.com/allysonkaye/password-generator/assets/108178946/e823b1d3-1219-44d0-87bb-415391caa6cb) **Mobile view:** ![image](https://github.com/allysonkaye/password-generator/assets/108178946/ce7bff43-578c-45c6-98a9-e4d62f13170f) **Contact Me** Facebook: https://www.facebook.com/allysonkayeT/ Instagram: https://www.instagram.com/ally.kyy/?hl=en
null
css,html,tailwind,tailwindcss,javascript,js
2023-06-02T14:57:47Z
2023-06-20T10:49:13Z
null
1
0
15
0
0
3
null
null
HTML
ViktorSvertoka/goit-react-hw-04-feedback
main
Використовуй цей [шаблон React-проекту](https://github.com/goitacademy/react-homework-template#readme) як стартову точку своєї програми. # Критерії приймання - При здачі домашньої роботи є посилання: на вихідні файли та робочу сторінку проекту на `GitHub Pages`. - Під час запуску коду завдання в консолі відсутні помилки та попередження. - Для кожного компонента є окрема папка з файлом React-компонента та файлом стилів - Для компонентів описані `propTypes`. - Імена компонентів зрозумілі та описові. ## Віджет відгуків - Створений репозиторій `goit-react-hw-04-feedback`. - Проведи рефакторинг коду завдання, використовуючи React-хуки.
Home task for React course📘
css3,goit,html5,javascript,react,goit-react-hw-04-feedback
2023-06-01T19:39:39Z
2023-06-04T21:02:32Z
null
1
9
19
0
0
3
null
null
JavaScript
yunusparvezkhan/adprava
master
<!-- ![Adprava Logo](./src//media/logos/AA-in-hindi-trans.png) --> <div align="center"><img src="./src/media/logos/AA-in-Hindi-in-blue-with-techboy.png" width="300" ></div> <h1 align="center" >A&nbsp d&nbsp p&nbsp r&nbsp a&nbsp v&nbsp a</h1> <h3 align="center" > A beginner's ReactJS project containing 6 pages and navigation. </h3> ## Introduction **Adprava** is a practice project that deals with some concepts of ReactJS and NodeJS. This project is built solely with the purpose of learning Web Development, and is being shared with other developers in github for reviews, practice, help to begginers etc reasons. ### Naming The name is made with mixing two sanskrit words, "Adya" and "Prava" respectively. "Adya" means "Begginer/Beggining Phase" and "Prava" means "Skill". Hence, ***Adprava***. ### Pages This App would have 7 pages. All the pages requires very different concepts and has their own set of problems to be solved. Those pages are -- 1. Dropdown 1. Accordion 1. Buttons 1. Modal 1. Flex 1. Tables 1. Search ### Concepts covered This App covers many basic and intermediet level concepts of ReactJS, some of the termed concepts are given below -- 1. State system 1. Hook system * useState() * useEffect() * useRef() 1. Props system 1. Code structuring 1. Tailwind CSS Styling library --- # About the Project ## The Landing Page (Dropdown Page) ### Diagram #### CLose ![Dropdown](./src/media/diagrams/dropdown-mock.png) #### Open ![Dropdown Open](./src/media/diagrams/dropdown-open-mock.png) The Dropdown page is simply a Dropdown element rendered in screen. When ever use clicks on it, this dropdown opens and lets the user select from one of the options. The only catch here is that this dropdown element is not rendered using any markup Dropdown elements, rather all the logics are written in javascript and rendered using JSX of ReactJS. ### Data Loading ![Dropdown Data Loading](./src/media/diagrams/dropdown-data-loading-mock.png) The App invokes a page named `DropdownPage` in it's `return()` function. The `DropdownPage` contains one heading and the `Dropdown` component. The `Dropdown` component is provided with one prop named `DropDownOptions`, and the data for that prop is imported from `./src/data/qnadata.js`. The the `Dropdown` component maps over the data and returns some jsx. ## Accordion Page ### Diagram #### Close ![Accordion](./src/media/diagrams/accordion-mock.png) #### Open ![Accordion](./src/media/diagrams/accordion-open-mock.png) ### About The `AccordionPage` is a basic list of questions, and if clicked, some extended text appears below the clicked question. Only one of these ***Accordions*** can be extented at a time. ### Data Loading Data loading of `AccordionPage` and `Accordion` component is exactly the same with the `DropdownPage` and `Dropdown` component. The same data is used in a the logics of `Dropdown` component. ## Buttons Page ### Diagram ![Accordion](./src/media/diagrams/buttons-mock.png) ### About The `ButtonsPage` is essentially a showcase of the button theory in React JS. Here we have a component created as `Button` and that can be used as a normal button. The plus point of this `Button` component is that just by passing some simple prop names we can use button configurations from our 20 presets. ### Data Loading The `App` calls the `ButtonsPage` and the `ButtonsPage` calls the `Button` component with either of `primary`, `secondary`, `success`, `warning`, `danger` prop passed to define button's color. Then the `Button` component can be passed with two optional props `outlined` and `rounded`, and those applies exactly the same style that their name suggests. After that if any other prop, default to a `button` element is passed, those are passed to the actuall `button` element in the `Button` component for data related operations. ## Modal Page ### Diagram #### Close ![Modal Page](./src/media/diagrams/modal-mock.png) #### Open ![Modal Page](./src/media/diagrams/modal-open-mock.png) ### About `ModalPage` is a demostration of a component `Modal`. `Modal` is basically a popup box component. The `Modal` popup box has a bold centered title, a text for giving some message to the user and two buttons, one for conformaiton, called `Proceed` and another for cancelation, called `Cancel`. ### Data Loading Read [Modal Page Release Notes](https://github.com/yunusparvezkhan/adprava/blob/3a15947cda92ca14af18a2b4b8dfb7777c5bb4cf/Release_Notes/Version_2_Release_Notes.md) --- # User Instructions ## Installation Guide ### Windows #### Prerequisits 1. nodejs 1. npm 1. create-react-app 1. git 1. terminal 1. chocolaty 1. any text editor #### **Once you have all the preerequisits installed, you can move forward to clone the repository.** 1. Open powershell 1. Go to your desired directory where you want to clone this repository 1. Type the following in your powershell ```bash git clone git@github.com:yunusparvezkhan/adprava.git ``` 1. Now if cloning is successful, you have one directory named `adprava` in the directory you cloned the repository. To open this local repository type, ```bash cd adprava ``` And hit enter. 1. Now you need to install all the dependencies of this project. To do so, type the following command and hit enter, ```bash npm install ``` 1. Now to start the app in your browser type, ```bash npm run start ``` And hit enter. 1. Now if you don't see a browser tab opening automatic, open up a browser and type ```url localhost:3000 ``` in the url bar and hit enter. >**Note** > > In this last step the url sometimes might not be `localhost:3000`, it can be `localhost:3001` or `localhost:3002` and so on, depending upon if any other server is running on your machine on the `3000` port. So to avoid any problems, try to see what your terminal is telling you after running the command `npm run start`. --- # Developer's Instructions ### Commit conventions This project uses the `Delta Commits Convention`. This convention is under development, and this repository is one of the pioneer projects to use this convention. A detailed documentation about this convention would be live on [YPK Org](https://github.com/ypkorg/Delta-Commits-Convention). ### How to report issue * Whenever reporting an issue related to a commit, always make sure to mention the rsa and also the the delta versioning of that commit. * Keep your descriptions clear and to the point. * Mention coding terminologies inside \` \` backticks. ### How to Contribute If you have fixed any problem in this project or created some new features to make this project more beutiful, make sure to create a issue, describing the need for your changes, then wait for the author(s) to make a new branch for your changes, then create pull request to that branch. Pull requests to `master` branch will be mostly ignored. # Credits * The आ in the logo of Adprava is made with ❤️ by [Yunus Parvez Khan](https://instagram.com/yunusparvezkhan) * The TechBoy using laptop on the curve of आ in the Adprava logo, is made with ❤️ by [Jishu Das](https://instagram.com/jishudas25)
A beginner's ReactJS project containing 6 pages and navigation.
code-structure,hooks,javascript,node,nodejs,props,react,reactjs,reducer,state-management
2023-05-26T09:39:53Z
2024-01-06T18:10:30Z
2023-06-24T11:21:01Z
1
0
224
0
0
3
null
null
JavaScript
harsh661/midjourney-clone
main
# Midjourney AI Image Generation Web App ## Introduction This is a MERN (MongoDB, Express.js, React.js, Node.js) stack web application that leverages artificial intelligence to generate unique and creative images. Users can generate images using advanced AI algorithms and share them with the community. ## Features - AI Image Generation: Utilizes advanced AI algorithms to generate unique and creative images. - Image Sharing: Users can share their generated images with the community. - Image Gallery: Browse and discover a wide range of images generated by the community. - Download Images: Allow users to donwload any image they like. - Responsive Design: Ensures a seamless experience across different devices. ## Technologies Used - MongoDB: NoSQL database for storing user data and image information. - Express.js: Backend framework for handling HTTP requests and API endpoints. - React.js: Frontend library for building user interfaces and handling UI components. - Node.js: JavaScript runtime environment for server-side scripting. - Cloudinary: Cloud-based image management platform for storing and serving images. - Tailwind-css: Frontend framework for responsive design and UI. ## Contributing Contributions are welcome! If you find any bugs or have suggestions for improvement, please open an issue or submit a pull request. ## Acknowledgements - The project was inspired by Midjourney. - Special thanks to the developers and contributors of the open-source libraries and frameworks used in this project. ## Contact If you have any questions or feedback, feel free to reach out to us at [plasmaharsh@outlook.com](mailto:plasmaharsh@outlook.com).
This is a MERN stack web application that leverages artificial intelligence to generate unique and creative images. Users can generate images using advanced AI algorithms and share them with the community.
ai,javascript,mern-stack,midjourney,mongodb,nodejs,open-source,react
2023-06-02T11:22:06Z
2023-09-07T13:20:57Z
null
1
0
16
0
4
3
null
null
JavaScript
kobe-koto/Coriander
main
# Coriander ## Yet another Random Gradients Picker TODO: docs
🌟 Yet another Random Gradients Picker
astrojs,easy-to-use,easytouse,gradient-generator,javascript,picker,random-generation,scss
2023-05-26T04:42:21Z
2023-09-26T03:57:40Z
null
1
1
31
0
0
3
null
AGPL-3.0
Astro
ivao-js/ivao.js
master
# IVAO.js Ivao.js is a module that incorporates the entire [IVAO api](https://api.ivao.aero). This module can be used with an api key and with the new oauth2 system. ```text NOTE: Versions below 1.9.0 do not work! ``` ## Installation Install my-project with npm ```bash npm install ivao.js cd my-project ``` ## OAuth 2.0 To obtain access to the new oauth system, please follow the [HQ documentation](https://wiki.ivao.aero/en/home/devops/api/oauth-request). ## Usage/Examples With APIKey: ```typescript import { Client } from 'ivao.js/lib'; const client = new Client({ type: 'apiKey', apiKey: 'YOUR_API_KEY' }); ``` With OAuth2.0: ```typescript import { Client } from 'ivao.js/lib'; const client = new Client({ type: 'oauth2', client_id: 'YOUR_CLIENT_ID', secret_id: 'YOUR_SECRET_ID' }); ``` ## Roadmap - Add more routes ## Contributing Contributions are always welcome! See `contributing.md` for ways to get started. Please adhere to this project's `code of conduct`. ## License [GPL-2.0](https://github.com/ivao-js/ivao.js/blob/master/LICENSE) ## Authors - [@jules010209](https://www.github.com/jules010209) - [@Zathiel](https://github.com/Zathiel)
Ivao.js is a module that incorporates the entire IVAO api. This module can be used with an api key and with the new oauth2 system.
ivao,javascript,library,nodejs,typescript,ivaojs
2023-05-24T09:42:02Z
2023-08-06T15:01:06Z
2023-08-06T14:14:53Z
2
6
52
0
1
3
null
GPL-2.0
JavaScript
BaseMax/MovieTSGraphQL
main
# MovieTSGraphQL MovieTSGraphQL is a GraphQL web service built using NestJS, Prisma ORM, PostgreSQL, and Minio. The project provides functionality to manage movies, categories, actors, directors, comments, and more. It aims to create a web service with various features similar to Netflix. ## Demo ## Features - Manage movies, categories, actors, directors, comments, and more. - Secure authentication and authorization system. - GraphQL API for easy integration with any frontend framework. - Optimized for high performance and scalability. ## Authentication Authentication is done through an Authorization Header using a Bearer token. The token can be obtained by calling the login and register mutations. Once the token is obtained, it needs to be included in the Authorization Header of all subsequent GraphQL requests. The app validates the token and restricts access to certain mutations and queries based on the token's permissions. Some mutations and queries require higher privileges, such as a specific role, to be executed. These operations can only be performed by users with the required privileges. example Header : ``` Authorization: Bearer <token> ``` ## File upload This app supports file upload through a dedicated endpoint at `/upload/<type>/<name-prefix>`. The uploaded file will be resized to a specific size based on the chosen type. Currently, the supported types and sizes are: - `avatar`: { width: 512, height: 512 } - `gallery`: { width: 1920, height: 1080 } - `backdrop`: { width: 1920, height: 1080 } - `poster`: { width: 600, height: 900 } To upload a file, you should make a POST request to the `/upload/<type>/<name-prefix>` endpoint with the file contents as the request body. The request body should be a binary file, not multipart form data. The `<type>` parameter specifies the type of the uploaded file, while the `<name-prefix>` parameter is used to generate a unique filename for the uploaded file. The uploaded file will be resized and saved to the server, and the response will contain a JSON object with the URL of the uploaded file. For example: ``` {"url":"/poster/testtt-cliiy9tkb000015ln9byqftw4.jpeg"} ``` You can use the returned URL wherever a file is required in your application. ## Stack - **NestJS:** A Node.js framework for building efficient and scalable server-side applications. It provides a modular architecture that allows developers to easily organize their code and use a wide range of plugins. - **Prisma ORM:** A modern database toolkit that provides a type-safe and intuitive way to access databases. It supports multiple databases and provides features like migrations, schema generation, and query building. - **PostgreSQL:** A powerful open-source relational database management system that provides features like triggers, transactions, and foreign key constraints. It is widely used in enterprise applications. - **Minio:** A high-performance distributed object storage server that provides features like versioning, lifecycle management, and access control. It is compatible with Amazon S3 API and provides a scalable and cost-effective solution for storing and retrieving large amounts of data. ## Usage To use this project, follow these steps: 1. Clone this repository: ```bash git clone https://github.com/BaseMax/MovieTSGraphQL ``` 2. Install dependencies: ```bash npm install ``` 3. Run the app using Docker Compose: ```bash sudo docker-compose -f docker-compose.dev.yml up ``` This will start the app in development mode, with hot-reloading enabled. The GraphQL playground will be available at http://localhost:3000/graphql. 4. Attach to the container: ```bash sudo docker exec -it movietsgraphql-app-1 bash ``` 5. Create an admin account: ```bash dsconfig npx nest start --entryFile create-admin.js ``` It will prompt you for an email, password, and name to create the superuser account. ## Examples Here are some example GraphQL queries and mutations that can be used with this project: 1. Get all genres: ```graphql query { genres { id name } } ``` 2. Get a specific genre: ```graphql query { genre(id: "1") { id name } } ``` 3. Search for artists: ```graphql query { searchArtists(input: {text: "Tom"}) { total artists { id name } } } ``` 4. Get a specific movie: ```graphql query { movie(id: "1") { id name plot description imdbScore imdbRef duration releaseDate backdrop poster gallery genres { id name } artists { artist { id name } contribution } downloadableAssets { title link type } languages { tag for } } } ``` 5. Create a new movie: ```graphql mutation { createMovie(input: { name: "Movie Name" plot: "Movie Plot" description: "Movie Description" imdbScore: 8.5 imdbRef: "https://www.imdb.com/title/tt1375666/" duration: 120 releaseDate: "2022-01-01T00:00:00Z" backdrop: "/backdrop/backdrop.jpeg" poster: "/poster/poster.jpeg" gallery: ["/gallery/gallery1.jpeg", "/gallery/gallery2.jpeg"] genreIds: ["1", "2"] artists: [{ artistId: "1" contribution: director }] downloadableAssets: [{ title: "Subtitle" link: "/subtitle/subtitle.vtt" type: subtitle }] languages: [{ tag: "en-US" for: original }] }) { id name } } ``` 6. Update a movie: ```graphql mutation { updateMovie(input: { id: "1" name: "New Movie Name" plot: "New Movie Plot" description: "New Movie Description" imdbScore: 9.0 imdbRef: "https://www.imdb.com/title/tt1375667/" duration: 150 releaseDate: "2022-02-02T00:00:00Z" backdrop: "/backdrop/newbackdrop.jpeg" poster: "/poster/newposter.jpeg" gallery: ["/gallery/newgallery1.jpeg", "/gallery/newgallery2.jpeg"] genreIds: ["2", "3"] artists: [{ artistId: "2" contribution: actor }] downloadableAssets: [{ title: "Sound" link: "/sound/sound.mp3" type: sound }] languages: [{ tag: "fr-FR" for: dub }] }) { id name } } ``` ## API Documentation Here is a table describing all mutations and queries available in this project: | Type | Name | Arguments | Return Type | Description | | --- | --- | --- | --- | --- | | Query | user | | User! | Returns the currently logged in user | | Query | genres | | [Genre!]! | Returns a list of all genres | | Query | genre | id: String! | Genre | Returns the genre with the specified ID | | Query | artist | id: String! | Artist | Returns the artist with the specified ID | | Query | searchArtists | input: SearchArtistInput! | PaginatedArtist! | Returns a list of artists that match the search criteria | | Query | movie | id: String! | Movie | Returns the movie with the specified ID | | Query | searchMovie | input: SearchMovieInput! | PaginatedMovies! | Returns a list of movies that match the search criteria | | Query | unapprovedComments | pagination: CursorBasedPagination! | [Comment!]! | Returns a list of unapproved comments, with pagination | | Mutation | register | input: RegisterUserInput! | AuthPayload! | Registers a new user | | Mutation | login | input: LoginUserInput! | AuthPayload! | Logs in a user | | Mutation | changeRole | userId: String!, role: Role! | User! | Changes the role of a user | | Mutation | createGenre | input: CreateGenreInput! | Genre! | Creates a new genre | | Mutation | updateGenre | input: UpdateGenreInput! | Genre! | Updates an existing genre | | Mutation | deleteArtist | id: String! | Boolean! | Deletes an artist with the specified ID | | Mutation | createArtist | input: CreateArtistInput! | Artist! | Creates a new artist | | Mutation | updateArtist | input: UpdateArtistInput! | Artist! | Updates an existing artist | | Mutation | createMovie | input: CreateMovieInput! | Movie! | Creates a new movie | | Mutation | updateMovie | input: UpdateMovieInput! | Movie! | Updates an existing movie | | Mutation | deleteMovie | id: String! | Boolean! | Deletes a movie with the specified ID | | Mutation | createComment | input: CreateCommentInput! | Comment! | Creates a new comment | | Mutation | updateComment | input: UpdateCommentInput! | Comment! | Updates an existing comment | | Mutation | deleteComment | id: String! | Boolean! | Deletes a comment with the specified ID | | Mutation | approveComment | id: String! | Comment! | Approves a comment with the specified ID | ## License This project is licensed under the GPL-3 license. Contributions are welcome! Please submit any issues or pull requests to the GitHub repository.
This is a movie project that aims to create a GraphQL web service with various features similar to Netflix. It is built using GraphQL, TypeScript, and Prisma ORM. The project provides functionality to manage movies, categories, actors, directors, comments, and more.
graphql,graphql-ts,graphql-typescript,javascript,js,ts,typescript,typescript-graphql
2023-05-30T12:54:00Z
2023-11-17T16:18:58Z
null
1
8
31
0
0
3
null
GPL-3.0
TypeScript
morroid/Morroid
main
# Morroid ## Warning This project is still in development so somethings might not work as intended. ### Setup 1. Clone the repository. 2. rename `enviroment.example.ts` to `enviroment.ts` 3. run `npm run setup` to setup and run the server. ### Credits Skies <br /> Krowe moh <br /> Kiko
A reverse-engineered discord server written in typescript
discord,fosscord,morroid,morroiddiscord,javascript,typescript,api
2023-06-03T04:16:59Z
2023-06-19T10:26:47Z
null
3
0
64
0
1
3
null
MIT
TypeScript
promethiumjs/promethium
main
# PromethiumJS > [Docs](https://promethium.js.org/)
Building complex web apps has never been easier
frontend,javascript,lit,typescript,ui,web
2023-05-24T00:03:08Z
2024-05-22T20:55:05Z
null
1
0
36
0
1
3
null
null
TypeScript
rbhomale17/rbhomale17.github.io
main
# Student Portfolio Analyser ## Maximum Marks - 34 ``` ✅ Submitted link is a github.io link - 1 mark ✅ Basic components (navbar, about, skills, projects, contact) present with respective IDs - 1 mark ✅ Navbar contains required elements with respective IDs - 1 mark ✅ Elements of the navbar are linked to the respective sections - 5 marks ✅ Name is present - 1 mark ✅ Formal introduction is present - 1 mark ✅ About section is titled - 1 marks ✅ Professional photo is present - 1 marks ✅ Minimum of 4 samples of projects are present - 2 marks ✅ All project cards have an image, title, deployed link, repository link - 4 marks ✅ Each skills card has the corresponding image and name - 1 mark ✅ Links to GitHub and LinkedIn profiles are present - 2 marks ✅ Phone number is present - 1 mark ✅ Email address is present - 1 mark ✅ Resume buttons are present in the Resume section and the Home/About section - 2 marks ✅ Clicking on the resume button in the Resume section opens the link in a new tab and downloads the resume in PDF format - 2 marks ✅ Clicking on the resume button in the Home/About section section opens the link in a new tab and downloads the resume in PDF format - 2 marks ✅ GitHub calendar heatmap is present - 1 mark ✅ GitHub streak stats are present - 1 mark ✅ GitHub top languages card is present - 1 mark ✅ GitHub stats card is present - 1 mark ✅ Checked tech words in user about section - 1 mark ``` #### You haven't been taught cypress to run the test cases locally, you can see the passed/ failed test cases and test errors on CP itself. #### CP will attempt to take screenshots of each component in your portfolio. You can view these screenshots in the "Screenshots" dropdown in the logs page. The marks allotted to you are independent of these. ## Some Rules to follow:- - Before writing a single line of code please read the problem statement very carefully. - If you don't follow these rules you might not get any marks even if you do everything correctly. - Have a look at the TestErrors on the logs page and Google them if any of your test cases have failed to figure out what might have gone wrong. ## Problem Statement and Instructions:- - Create a portfolio with the following components using the following attributes: - Navbar : id="nav-menu" - Home section : id="home" - About section : id="about" class="about section" - Skills section : id="skills" - Projects section : id="projects" - Contact section : id="contact" - The elements within the navbar linked to the above 4 sections should have the following. - Element linked to Home section : class="nav-link home" - Element linked to About section : class="nav-link about" - Element linked to Skills section : class="nav-link skills" - Element linked to Projects section : class="nav-link projects" - Element linked to Contact section : class="nav-link contact" - Element linked to Resume : class="nav-link resume" - The following must be present within elements with the respective IDs: - Name : id="user-detail-name" - Formal introduction : id="user-detail-intro" - Contact elements must have the following IDs: - GitHub profile link : id="contact-github" - LinkedIn profile link : id="contact-linkedin" - Phone number : id="contact-phone" - Email address : id="contact-email" - The image linking your professional photo must have class="home-img" - Each project card in the Projects section should have class="project-card" and the following: - Image of the project - Title : class="project-title" - Description : class="project-description" - Tech stack used : class="project-tech-stack" - Link to GitHub repository : class="project-github-link" - Deployed link or video link : class="project-deployed-link" - Each skills card in the Skills section should have class="skills-card" and the following: - Image : class="skills-card-img" - Name : class="skills-card-name" - There must be two buttons for resume. Clicking on them should open the resume in a new tab and download it as a PDF. They must have the following IDs: - For the button in the Resume section : id="resume-button-1" - For the button in the Home/About section : id="resume-button-2" - If you're using anchor elements for the resume buttons, they must have the following IDs: - For the button in the Resume section : id="resume-link-1" - For the button in the Home/About section : id="resume-link-2" - For the GitHub calendar: class="react-activity-calendar" (the class is automatically included if you're using the react-github-calendar npm package) - The GitHub statistics images must have the following IDs: - GitHub streak stats : id="github-streak-stats" [Link to refer : https://github-readme-streak-stats.herokuapp.com/demo/] - GitHub top languages : id="github-top-langs" [Link to refer : https://github.com/anuraghazra/github-readme-stats] - GitHub stats card : id="github-stats-card" [Link to refer : https://github.com/anuraghazra/github-readme-stats] - Do not repeat any of the above class names and ID names for any other element. #### General guidelines - The system on cp.masaischool.com may take between 1-20 minutes for responding, - so we request you to read the problem carefully and debug it before itself - we also request you not just submit it last minute - try to keep one submission at a time
This is my portfolio https://rbhomale17.github.io/
css,github-pages,html,javascript
2023-05-19T13:08:18Z
2023-10-28T11:59:38Z
null
1
16
77
0
0
3
null
null
HTML
EllianAbe/capyture.ai
main
null
A website that allows you to discover if you are a capybara
css,flask,html,javascript,python,teachable-machine
2023-05-27T01:11:07Z
2023-05-31T23:10:13Z
null
2
1
7
0
0
3
null
MIT
HTML
SurajjBhardwaj/Online-compiler
master
null
It is an online compiler which has capacity to execute c,c++ and python codes ,it's created using node js.
backend,compiler,javascript,nodejs
2023-05-19T13:45:33Z
2023-05-19T13:56:11Z
null
1
0
4
0
0
3
null
null
JavaScript
MaorBemdoo/CNN-Clone
main
# CNN Clone The CNN Clone is a web application that replicates the look and feel of the Cable News Network [(CNN)](https://edition.cnn.com) website. It serves as a practice project for improving web development and design skills, including HTML, CSS, and JavaScript. ## Features - **Homepage:** Mimics the CNN homepage layout with sections for top news stories, latest updates, and featured articles. - **Responsive Design:** Ensures that the website is accessible and user-friendly on various screen sizes, from desktop to mobile devices. - **Article Pages:** Displays full articles with images, text, and links to related stories. ## Languages Used - HTML5 - CSS3 (including Flexbox and media queries) - JavaScript (for interactive features) ## Challenges Encountered and Known Challenges - The design was hard to replicate - The responsive design isn't perfect - The news are not up to date and they don't use a news api to keep them updated ## How to install and Run the project - Fork the repository and clone to your local machine ```bash git clone <repo> ``` - Redirect to the cloned project folder - On your browser locate the index.html file or use live server ## Demo ![Desktop Screenshot](Img/laptopScreenshot.png)<br> ![Mobile Screenshot](Img/mobileScreenshot.png) **[Live Demo](https://bemdoom-cnn-clone.vercel.app)** ## 👨‍💻Author **[Bemdoo Maor](https://github.com/MaorBemdoo)** ## Contributing Future Pull request and issues are welcome ## Support Give this repo a ⭐ if you liked it ## LICENSE This repository is licensed under [MIT](LICENSE) License
A clone of the official CNN Website @ https://edition.cnn.com
css,html,javascript,scss
2023-06-08T18:50:20Z
2023-09-08T09:09:23Z
null
1
1
148
0
2
3
null
MIT
HTML
JoshuaDoes/libremedia
dev
# libremedia ## How to configure for testing * WARNING: Spotify playback is broken with the Go port of librespot right now. The catalogue functions still work, but don't expect playback until the plugin system is finished and we switch to using the Rust version of librespot. * Check back here with any `git pull` attempts, just in case a configuration format change has been made. Place the following JSON in a file named `config.json` directly next to your compiled `libremedia` binary (`libremedia.exe` on Windows): ```JSON { "httpAddr": ":80", "baseURL": "http://example.com", "handlers": { "tidal": { "active": true, "username": "zU4XHVVkc2tDPo4t", "password": "VJKhDFqJPqvsPVNBV6ukXTJmwlvbttP7wlMlrc72se4=", "deviceName": "Android Auto (Normal, High, HiFi, Master)", "blobPath": ".tidal.blob" }, "spotify": { "active": true, "username": "changeme", "password": "changeme", "deviceName": "librespot", "blobPath": ".spotify.blob" } }, } ``` - Change the port in `httpAddr` to something else if you have an HTTP website using port 80 on your host. HTTPS is not supported at this time, use an HTTPS reverse proxy with Apache2 or similar. - Change `baseURL` to either your IP address or the domain you'll be using to test libremedia. - If the example Tidal API key stops working, find your own or wait for this README to update with a new one. - Change the `username` and `password` fields under the Spotify handler to match your account. - If desired, change the `blobPath` in your handlers to point to where you want your authentication tokens to be saved. The defaults will normally hide them on Linux. - If you don't have an account for a given handler, set the `active` field to false. ### Progress tracker before release # User interface - Fetch artwork for an object using `:artwork` URI extension instead of re-fetching the entire source object, use `:1280` to smartly limit size to 1280px or next size up for max quality - Add visibility toggle buttons to both the search bar and the audio player - Increase size of controls in tables to maximize room for touch screens, OR migrate all controls to drop-down list, whichever works out better (or condense controls to it if table entry is squished?) ## Pages - Display top 100 streams and top 100 downloads on home page - Add "download album" control on album page, generates and saves single-folder ZIP of all streams client-side with per-stream progress bar - Add "download discography" control on creator page, generates and saves multi-folder ZIP of all albums, EPs and singles client-side with per-album and per-stream progress bars - Add playlists section on search and creator pages, uses same handler for album objects - Display entry numbers and total X of each table section - Create queue management using /queue with no params * Generic streams table, only shows either the regular queue or the shuffled queue * Add reorder control, injects clickable dividers in-between streams that will move selected stream to that location * Add unqueue control, removes stream from queue * Allow saving current queue as a libremedia playlist - Rewrite logic for transcript page * Fetch transcript with timings using `:transcript` URI extension instead of re-fetching entire stream object * Start audio position 0 with empty line (unless first line begins at pos 0) using timings index 0 instead of fake -1 like before (invalid index) * Signal unplayed/restarted auto-scroller position tracker using -1 instead of -2 like before * Always load now playing transcript into timings buffer when stream changes, automaticlly scroll back to top * Add fixed resume auto-scroll button to bottom right when user scrolls to disable auto-scroll ## Audio player - Add vertical volume slider - Add horizontal audio position seeker directly above audio player, show regardless of audio player visibility - Change transcript button to specify no params instead of pointing to now playing stream URI, no params will sync transcript with now playing - Display smaller album art somewhere, use either same size or next size up for max quality - Add shuffled queue support * Place shuffle button somewhere * Generate new shuffled queue using existing queue on every enable, and use it for next/prev handling until disable * On disable, return to original queue regardless of what was next prior to enable # Backend - Start anonymously tracking listen and download counts - At end of object expansion goroutine, spawn new goroutine to search other providers for matching object to fill in missing metadata (such as credited creators, biographies, artwork, albums, streams, etc) - Migrate all client-side player controls to the server, simulating client actions based on client requests - Require clients to request to start playback (automatically acting as "I'm ready" for shared sessions to minimize latency), so they always load from `/v1/stream` with no params afterward - Add `/v1/providers` endpoint to return all upstream providers and a path to retrieve their icons, which can follow upstream to the source provider - Add providers array param to `/v1/search` endpoint, allows client-side filtering of providers via request (useful to minimize processing and deduplicate responses when a provider is shared across upstream instances) - Convert transcript handler to be separated transcript providers, also available as plugins - Allow catalogue and database providers to be implemented as multimedia providers, without the streams - Implement support for ffmpeg (for custom format, codec, and quality params, plus metadata injection with `/v1/download` endpoint) - Implement support for ffprobe (pointing to internal `/v1/stream` API) to identify format details if not available on provider, but direct stream is available - Find a reliable and free way to identify audio streams with no metadata ## Plugins - Finish writing new plugin system, simple concept but a lot to explain, later - Implement the Rust librespot client as a binary plugin to provide Spotify, and add podcast support - Remove hardcoded Spotify provider - Migrate hardcoded Tidal provider to a binary plugin, and add music video support - Create plugins for many other things, like local content, disc drive / ISO support, torrent support, YouTube, Bandcamp, SoundCloud, Apple Music, Deezer, etc ## User accounts - Provide a default guest user using server config - Provide a default admin user with permission to manage additional users and control the quality settings, globally and of each user - Cache now playing stream to disk as it buffers (can be random access too) * Hold lock on file until all sessions holding lock either timeout or all choose new streams * Avoid repeated reads with session sharing by using the same buffer, as all sessions are synced - Add session sharing support * Generate an invite link to share with any user * Sync queue, now playing, and audio position in real time (with both a low-latency and data saver mode client-side) * If sharer toggles it, users may vote to skip with >50% majority * If sharer toggles it, users may append to queue (with a rotational selection mode in client join order, and a free for all mode)
Object-oriented deduplicating multimedia protocol made for custom clients to consume, and a stock web app to go with it
android,audio,caching,go,golang,javascript,json,linux,media,metadata
2023-05-26T23:59:51Z
2024-05-12T11:26:23Z
null
3
0
37
0
0
3
null
null
Go
VlMv/architecture
main
null
website, pet project / 3d-scroll, JS, draggable
pet-project,website-design,3d-scroll,adaptive-layouts,css-mask,draggable,javascript,js,responsive-layout,scss
2023-05-18T17:43:17Z
2024-05-12T16:42:28Z
null
1
2
24
1
0
3
null
null
HTML
Shubham-Bhoite/My-Portfolio
main
# My Portfolio - See Website [View Now](https://portfolio-shubhu.netlify.app/)
This is my personal Portfolio Website.
css3,html5,javascript,php,vendor,portfolio-website
2023-05-22T14:17:51Z
2024-05-23T04:28:42Z
null
1
0
4
0
0
3
null
null
HTML
RileyManda/awesome-books
main
<a name="readme-top"></a> <div align="center"> <img src="books-logo.svg" alt="logo" width="140" height="auto" /> <br/> <h3><b>Awesome Books</b></h3> </div> <!-- TABLE OF CONTENTS --> # <b>Table of Contents 📋 - [📖 About the Project](#about-project) - [🛠 Built With](#built-with) - [Tech Stack](#tech-stack) - [Key Features](#key-features) - [🚀 Live Demo](#live-demo) - [💻 Getting Started](#getting-started) - [Setup](#setup) - [Prerequisites](#prerequisites) - [Install](#install) - [Usage](#usage) - [Run tests](#run-tests) - [Deployment](#deployment) - [👥 Authors](#authors) - [👥 Attribution](#attribution) - [🔭 Future Features](#future-features) - [🤝 Contributing](#contributing) - [⭐️ Show your support](#support) - [🙏 Acknowledgements](#acknowledgements) - [❓ FAQ (OPTIONAL)](#faq) - [📝 License](#license) </b> <hr><hr> <!-- PROJECT DESCRIPTION --> # <b>Awesome Books 📖</b><a name="about-project"></a> **Awesome Books** is a simple website that displays a list of books and allows you to add and remove books from that list. <br><hr> <!-- BUILT WITH --> ## <b>Built With 🛠</b><a name="built-with"></a><br> <!-- TECH STACK --> ### <b>Tech Stack 🗜️</b><a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML">HTML5</a> markup to build raw structure of this web page</li><br> <li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS3</a> custom properties, <a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">FlexBox</a>, <a href="">Grid</a> to make the website visually attractive</li><br> <li><a href="https://reactjs.org/">Javascript</a></li><br> <li><a href="https://mozilla.github.io/addons-linter/">Linters</a> for coding convention and coding formating</li> </ul> </details> <details> <summary>Javascript runtime environment</summary> <ul> <li><a href="https://nodejs.org">Node JS</a> as a javascript runtime machine [git], a free and open source distributed version control system</li> </ul> </details> <details> <summary>Deployement</summary> <ul> <li><a href="#deployment">GitHub Pages</a></li> </ul> </details> <br><hr> <!-- KEY FEATURES --> ### <b>Key Features 🏷️</b> <a name="key-features"></a> - **Manage books collection** - **Remove Books** - **Add Books** <p align="right">(<a href="#readme-top">back to top</a>)</p> <br><hr> <!-- LIVE DEMO --> ## <b>Live Demo 🚀</b><a name="live-demo"></a> This project is hosted on [GitHub pages](#deployment), so if you want to check it online, please 😊 [here](https://rileymanda.github.io/awesome-books/). <p align="right">(<a href="#readme-top">back to top</a>)</p> <hr> <!-- GET STARTED --> ## <b>Getting Started 💻</b><a name="getting-started"></a> To get a local copy up and running, follow these steps. <!-- PREREQUISITIES --> ### <b>Prerequisites 🧱</b><a name="prerequisites"></a> In order to run this project you need: - A Github account - Node JS - A web browser to view output e.g [Microsoft Edge](https://www.microsoft.com/en-us/edge). - An IDE e.g [Visual studio code](https://code.visualstudio.com/). - [A terminal](https://code.visualstudio.com/docs/terminal/basics). <br><hr> <!-- SETUP --> ### <b>Setup ⚙️</b><a name="setup"></a> Clone this repository to your desired folder:<br> ```sh cd my-folder git clone https://github.com/RileyManda/awesome-books.git ``` - Navigate to the folder ``` cd my-folder cd awesome-books ``` - Checkout the branch ``` git checkout main ``` <br><hr> <!-- INSTALL --> ### <b>Install 🏗️</b><a name="install"></a> Install all dependencies: ```sh npm install ``` <br><hr> <!-- USAGE --> ### <b>Usage 📂</b><a name="usage"></a> To run the project, open index.html to your preferred browser. <!-- TESTS --> <br><hr> ### <b>Run tests 🧪</b><a name="run-tests"></a> How should it be tested? To run tests, run the following command: - CSS linter errors run: ``` npx stylelint "**/*.{css,scss}" --fix ``` - JavaScript linter errors run: ``` npx eslint . --fix ``` <br><hr> <!-- DEPLOYEMENT --> ### <b>Deployment</b> <a name="deployment"></a> You can deploy this project using: GitHub Pages, [Vercel](https://vercel.com/) or [Netlify](https://www.netlify.com/). This project was deployed using GitHub Pages. For more information about how to use GitHub pages [read here](https://www.w3schools.com/git/git_remote_pages.asp?remote=github) 🤩. If you want to watch a video about how to use GitHub pages instead of reading [click here](https://www.youtube.com/watch?v=QyFcl_Fba-k&t=251s) ☺️. <p align="right">(<a href="#readme-top">back to top</a>)</p> <br><hr> <!-- AUTHORS --> ## 👥 Authors <a name="authors"></a> 👤 **Nelly Telli** - GitHub: [@lily4178993](https://github.com/lily4178993/) - Twitter: [@nelly_telli](https://twitter.com/nelly_telli) - LinkedIn: [Nelly T.](https://www.linkedin.com/in/nelly-t-330414266/) 👤 **Riley Manda** - GitHub: [@RileyManda](https://github.com/RileyManda) - Twitter: [@rilecodez](https://twitter.com/rilecodez) - LinkedIn: [rileymanda](https://www.linkedin.com/in/rileymanda/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <br><hr> <!-- FUTURE FEATURES --> ## <b>Future Features 🔭</b><a name="future-features"></a> - [ ] **Make the app responsive** - [ ] **Implement editing a book** <p align="right">(<a href="#readme-top">back to top</a>)</p> <br><hr> <!-- ATTRIBUTION --> ## 👥 Attribution <a name="attribution"></a> - ProjectIcon: [Svgrepo](https://www.svgrepo.com/svg/249120/books-book) <!-- CONTRIBUTING --> ## <b>Contributing 🤝</b><a name="contributing"></a> If you have suggestions 📝, ideas 🤔, or bug reports 🐛, please feel free to open an [issue](https://github.com/RileyManda/awesome-books/issues) on GitHub. Remember, every contribution, no matter how big or small, makes a difference. <p align="right">(<a href="#readme-top">back to top</a>)</p> <br><hr> <!-- SUPPORT --> ## <b>Show your support 🌟</b><a name="support"></a> Thank you for taking the time to explore our GitHub project! Your support means a lot to us. If you find our project valuable and would like to contribute, here are a few ways you can support us: - <b>Star the project ⭐️</b>: Show your appreciation by starring this GitHub repository. It helps increase visibility and lets others know that the project is well-received. - <b>Fork the project 🍴 🎣</b>: If you're interested in making improvements or adding new features, feel free to fork the project. You can work on your own version and even submit pull requests to suggest changes. - <b>Share with others 🗺️</b>: Spread the word about this project. Share it on social media, mention it in relevant forums or communities, or recommend it to colleagues and friends who might find it useful. <p align="right">(<a href="#readme-top">back to top</a>)</p> <br><hr> <!-- ACKNOWLEDGEMENTS --> ## <b>Acknowledgments 🙏</b><a name="acknowledgements"></a> We would like to express our sincere gratitude to [Microverse](https://github.com/microverseinc), the dedicated reviewers, and collaborarors. Your unwavering support, feedbacks, and collaborative efforts have played an immense role in making this journey a resounding success. Thank you for being an integral part of our achievements. <p align="right">(<a href="#readme-top">back to top</a>)</p> <br><hr> <!-- FAQ (optional) --> ## <b>FAQ ❓</b><a name="faq"></a> - **Question_1** Do I have to use the vs code specifically? - Answer_1 You can use any code editor of your choice. <br> - **Question_2** Where can I download node JS for installation? - Answer_2 Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. It can be downloaded here: https://nodejs.org/en/download/Node.jsNode.js <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENCE --> ## <b>License 📝</b><a name="license"></a> This project is [MIT](./LICENSE) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
Awesome books is a simple website that displays a list of books and allows you to add and remove books from that list.
css3,git,githubpages,html5,javascript,linters,nodejs
2023-06-04T19:28:22Z
2023-06-08T08:08:20Z
null
2
18
117
0
1
3
null
null
JavaScript
rubydevi/book-collection-es6
main
<!-- TABLE OF CONTENTS --> # 📗 Table of Contents - [📖 About the Project](#about-project) - [Tech Stack](#tech-stack) - [Key Features](#key-features) - [🚀 Live Demo](#live-demo) - [💻 Getting Started](#getting-started) - [Setup](#setup) - [Prerequisites](#prerequisites) - [Install](#install) - [Usage](#usage) - [Run tests](#run-tests) - [👥 Authors](#authors) - [🔭 Future Features](#future-features) - [🤝 Contributing](#contributing) - [⭐️ Show your support](#support) - [🙏 Acknowledgements](#acknowledgements) - [📝 License](#license) # 📖 Book Collection <a name="about-project"></a> **Book Collection** In this project, I will restructure my [Awesome books](https://github.com/rubydevi/book-collection) app code. The goal is to make it more organized by using modules. I will also practice the ES6 syntax that I have learned. ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li>HTML and CSS</li> <li>JavaScript</li> </ul> </details> <!-- Features --> ### Key Features <a name="key-features"></a> - **Book Management** - **Modules Directory** - **Single Page App** <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LIVE DEMO --> ## 🚀 Live Demo <a name="live-demo"></a> - [Live Demo Link](https://rubydevi.github.io/book-collection-es6/) <!-- - N/A --> <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- GETTING STARTED --> ## 💻 Getting Started <a name="getting-started"></a> ### Prerequisites In order to run this project you need: 1. git 2. VS Code or any code editor 3. npm intalled ### Setup Clone this repository to your desired folder: ```sh cd my-folder git clone git@github.com:rubydevi/book-collection-es6.git cd book-collection-es6 ``` ### Install Install this project with: **Weblint** 1. Run this code: ```sh npm install --save-dev hint@7.x ``` 2. Don't forget to copy [.hintrc](.hintrc) to the root directory of your project. **Stylelint** 1. Run this code: ```sh npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x ``` 2. Don't forget to copy [.stylelintrc.json](./.stylelintrc.json) to the root directory of your project. **ESLint** 1. Run this code: ```sh npm install --save-dev eslint@7.x eslint-config-airbnb-base@14.x eslint-plugin-import@2.x babel-eslint@10.x ``` 2. Don't forget to copy [.eslintrc.json](./.eslintrc.json) to the root directory of your project. ### Usage To run this project in the browser, simply open the index.html file in your preferred browser. ### Run tests To run tests, run the following command: ```sh npm hint . ``` ```sh npx stylelint "**/*.{css,scss}" ``` ```sh npx eslint . ``` <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 👥 Authors <a name="authors"></a> 👤 **Chongtham Ruby Devi** - GitHub: [@rubydevi](https://github.com/rubydevi) - Twitter: [@arieabyss](https://twitter.com/ariesabyss) - LinkedIn: [Chongtham Ruby Devi](https://www.linkedin.com/in/chongtham-bhoomika/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - User Management System - Database Connection - More Forms <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- CONTRIBUTING --> ## 🤝 Contributing <a name="contributing"></a> Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](../../issues/). <!-- SUPPORT --> ## ⭐️ Show your support <a name="support"></a> If you like this project please leave a star, I'd really appreciate it. <p align="right">(<a href="#readme-top">back to top</a>)</p> ## Acknowledgments <a name="acknowledgements"></a> - I'd like to thank Microverse for this wonderful README template. <!-- LICENSE --> ## 📝 License <a name="license"></a> This project is [MIT](./LICENSE) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
In this project, I restructured my Awesome books app code. The goal is to make it more organized by using modules. I also practiced the ES6 syntax that I have learned.
css,html,javascript,linters,modules
2023-06-08T13:14:06Z
2023-06-23T11:10:45Z
null
1
1
52
0
0
3
null
MIT
JavaScript
savanesoff/overdrag
main
[![by Protosus](https://raw.githubusercontent.com/savanesoff/protosus/main/public/icons/by-protosus.svg)](https://github.com/savanesoff/overdrag) # overdrag [![Github](https://badgen.net/badge/Protosus/overdrag?color=purple&icon=github)](https://github.com/savanesoff/overdrag) [![Build Status](https://github.com/savanesoff/overdrag/actions/workflows/test.yaml/badge.svg?branch=main&event=push)](https://github.com/savanesoff/overdrag/actions/workflows/test.yaml) [![npm version](https://badge.fury.io/js/overdrag.svg)](https://badge.fury.io/js/overdrag) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Li](https://badgen.net/badge/savanesoff/LI?color=blue)](https://www.linkedin.com/in/samvel-avanesov) Overdrag is a JavaScript utility for adding `draggable` and resizable `behavior` to DOM elements respecting an offset parent boundaries. ## Demo You can view a live demo [here](https://savanesoff.github.io/overdrag) [![Validator](https://raw.githubusercontent.com/savanesoff/overdrag/main/public/overdrag-demo.gif)](https://savanesoff.github.io/overdrag) ## Installation [![NPM](https://nodei.co/npm/overdrag.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/overdrag/) To install Overdrag: - using `npm` ```shell npm install overdrag ``` - using `yarn` ```shell yarn add overdrag ``` - using `pnpm` ```shell pnpm add overdrag ``` ## React Want a `React` component? Checkout `React` version of this utility [NPM](https://www.npmjs.com/package/overdrag-react), and [GH](https://github.com/savanesoff/overdrag-react) [![NPM](https://nodei.co/npm/overdrag-react.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/overdrag-react/) ## Usage > **_NOTE_** > Yes, `TS` is fully supported out of the box! No need for installing `@types`. To use Overdrag, import the Overdrag class from the package: ```JS import Overdrag from "overdrag"; ``` ## Constructor The Overdrag class constructor accepts an object with the following properties: - **`element`** (required): The DOM element to control. - **`minContentHeight`** (default: `Overdrag.DEFAULTS.minContentHeight`): The minimum height of the DOM element (CSS height) in pixels. This prevents resizing smaller than the specified value. - **`minContentWidth`** (default: `Overdrag.DEFAULTS.minContentWidth`): The minimum width of the DOM element (CSS width) in pixels. This prevents resizing smaller than the specified value. - **`maxContentHeight`** (default: `Overdrag.DEFAULTS.maxContentHeight: Infinity`): The max height of the DOM element (CSS height) in pixels. This prevents resizing bigger than the specified value. - **`maxContentWidth`** (default: `Overdrag.DEFAULTS.maxContentWidth: Infinity`): The max width of the DOM element (CSS width) in pixels. This prevents resizing bigger than the specified value. - **`snapThreshold`** (default: `Overdrag.DEFAULTS.snapThreshold`): The distance to the edge of the relative parent element (top, left, bottom, right) when the element should snap to it. - **`controlsThreshold`** (default: `Overdrag.DEFAULTS.controlsThreshold`): The distance to the edge of the element (top, left, bottom, right) when the element should show resize cursor and activate control points. - **`clickDetectionThreshold`** (default: `Overdrag.DEFAULTS.clickDetectionThreshold`): The threshold distance to detect a click event. If you've started dragging the element, mouse up event will not trigger `click` event. - **`stack`** (default: `false`): If true, an `Overdrag` parent element that has a recursively embedded `Overdrag` elements as a child will retain `over` state while the child is active. Else, the parent element will be set to `out` state (inactive) ## Example ```TS const element = document.getElementById("myElement"); const overdrag = new Overdrag({ element: element, minContentHeight: 100, // optional minContentWidth: 100, // optional maxContentHeight: 400, // optional maxContentWidth: 400, // optional snapThreshold: 20, // optional controlsThreshold: 10, // optional clickDetectionThreshold: 5, // optional stack: true, // optional }); overdrag.on(Overdrag.EVENTS.OVER, (instance) => console.log('mouse over the: ', instance)) overdrag.on(Overdrag.EVENTS.CONTROLS_ACTIVE, (instance) => console.log('active senors: ', instance.controls)) // all available events defined here: Overdrag.EVENTS ``` ## Description Controlled element is bound by its parent bounds and requires parent element to have `position:relative` CSS property for the controlled element absolute position be relative to its `offsetParent`. > **_NOTE_** > Absolute position of the target element is enforced during construction of class instance, so don't feel bad if you've forgotten to assign it. ### Resizing While hovering near and/or over the edge of controlled element (left, right, top, bottom), that includes border sizes, a corresponding sensor will be activated. Pressing mouse down and initiating a drag will move corresponding edge of the element, thereby resizing it. > **_NOTE_** > Two adjacent sensors can be activated at once, ex: top-right, in which case dragging mouse around will resize both: width and height of controlled element. Maximum size is determined by the size of the offset parent, however, a margin values of controlled element are respected, so if controlled element has a right-margin value of `10` the max width of the element will be no larger than `offsetParent.width - 10px` > **_NOTE_** > See `maxContentWidth/Height` values ### Dragging While hovering over the element content (passed the control sensors), pressing mouse `down` and proceeding to move it will engage `drag` motion and element will follow the motion of a mouse while respecting its initial offset. Max top/bottom/right/left position of the element will be constrained by its offsetParent bounds. ### Snapping In both cases, `drag` and `resize` the edge of controlled element will snap to the edge of `offsetParent` if controlled element distance to `offsetParent` edge (including margins) is equal to or less than `snapThreshold` value. ### Sensors Sensitivity of control points is determined by the `controlsThreshold` value, where control point is activated if mouse cursor distance to the control point of element is equal to of less than `controlsThreshold` value. > **_NOTE_** > This allows for a better control precision of when control points become active, preventing edge hunting to activate controls ## Events 📻 Overdrag extends the `eventemitter3` class and emits various events during the interaction. You can listen to these events using the `on` method or by attaching event listeners. ### Example ```JS overdrag.on(Overdrag.EVENTS.DOWN, (instance) => { console.log("Down event:", instance); }); ``` ### Available Events The available events are: - **`down`**: Triggered when the mouse button is pressed down on the element. - **`up`**: Triggered when the mouse button is released if pressed while element was "engaged". - **`click`**: Triggered when a click action is detected. - **`drag`**: Triggered during dragging, on every drag motion with a mouse move. - **`over`**: Triggered when the mouse is over the element passed the control point sensors. - **`out`**: Triggered when the mouse moves out of the visible box of element excluding control point sensors. - ... <details> <summary>click to see more events...</summary> - **`dragStart`**: Triggered when the mouse button is pressed down on the element, but not control points. - **`dragEnd`**: Triggered when the mouse button is released after dragging. - **`controlsActive`**: Triggered when any control point is activated (edge of element) within control sensor area. - **`controlsInactive`**: Triggered when the control points are deactivated. - **`controlRightUpdate`**: Triggered when the right control point position is updated. - **`controlLeftUpdate`**: Triggered when the left control point position is updated. - **`controlTopUpdate`**: Triggered when the top control point position is updated. - **`controlBottomUpdate`**: Triggered when the bottom control point position is updated. - **`resize`**: Triggered during resizing on every mouse move (if size change detected). - **`resizeStart`**: Triggered when resizing starts on mouse down. - **`resizeEnd`**: Triggered when resizing ends on mouse up. - **`update`**: Triggered before any other event is dispatched. </details> ## Element Action Attributes ⚙️ During interaction with element, its attributes are set according to the current mode and user actions. Use this to set various CSS properties accordingly to reflect type of interaction. ### Example Say you want your element to change background color while its engaged, here is how you do it: ```CSS #element-id[data-overdrag-over]{ /* change style while element is engaged */ background-color: red; } ``` ### Available Action attributes - **`data-overdrag-controls`**: Set while any control point is active with a value of active control type (`left`, `right`, `top`, `bottom`), Ex: `data-overdrag-controls="right-left"` - **`data-overdrag-over`**: Set while mouse is over the element pass the control sensors - **`data-overdrag-down`**: Set while mouse is down (preceded by `over` conditions). - **`data-overdrag-dragging`**: Set while element is dragged. - **`data-overdrag-drag-mode`**: Set when entering drag mode. - **`data-overdrag-resizing`**: Set while element is being resized, if resizing is detected - **`data-overdrag-resize-mode`**: Set when entering resize mode ## Cursor 👆 At every point of interaction with a controlled element, mouse cursor style is set according to the mouse position relative to element control points and being over the content area. > **_NOTE_** > Mouse cursor is set as an element pointer style which should not interfere with a global cursor state. Moreover, the child DOM overrides are performed by default. <details> <summary>click to see all cursor states</summary> - <span style="cursor:w-resize">**`w-resize`**</span>: Set while LEFT control sensor is activated (including sensitivity area) - <span style="cursor:e-resize">**`e-resize`**:</span> Set while RIGHT control sensor is activated (including sensitivity area). - <span style="cursor:n-resize">**`n-resize`**</span>: Set while TOP control sensor is activated (including sensitivity area). - <span style="cursor:s-resize">**`s-resize`**:</span> Set while BOTTOM control sensor is activated (including sensitivity area). - <span style="cursor:nw-resize">**`nw-resize`**:</span> Set while TOP and LEFT control sensors are activated (including sensitivity area). - <span style="cursor:ne-resize">**`ne-resize`**</span>: Set while TOP and RIGHT control sensors are activated (including sensitivity area). - <span style="cursor:sw-resize">**`sw-resize`**</span>: Set while BOTTOM and LEFT control sensors are activated (including sensitivity area). - <span style="cursor:se-resize">**`se-resize`**</span>: Set while BOTTOM and RIGHT control sensors are activated (including sensitivity area). - <span style="cursor:grab">**`grab`**</span>: Set while mouse is over the element pass the control sensors. - <span style="cursor:pointer">**`default`**:</span> Set while no interactions are detected. </details> ## Future plans - Angular support # PS [![Li](https://badgen.net/badge/Hit%20me%20up%20on/LI?color=blue)](https://www.linkedin.com/in/samvel-avanesov) Enjoy! 🎉🎉🎉
Overdrag is a library for adding draggable and resizable behavior to DOM elements that respects its parent and is recursive.
drag,javascript,mouse,resize,snap,dom,dom-manipulation
2023-06-03T17:06:40Z
2023-07-18T14:44:16Z
2023-07-18T14:45:26Z
1
9
185
0
0
3
null
MIT
TypeScript
PHANTOMGOD2OP/HOOBANK
master
# HooBank - Modern UI/UX website using React.js & Tailwind CSS ![HooBank](https://i.ibb.co/BK1Hn0x/Screenshot-2022-08-08-at-4-05-48-PM.png) 📙 Get the Ultimate Frontend & Backend Development Roadmaps, a Complete JavaScript Cheatsheet, Portfolio Tips, and more - by messaging me on discord (phantomgod_vedant)
Modern UI/UX website using React.js & Tailwind CSS
javascript,reactjs,tailwindcss,vitejs
2023-05-21T10:36:16Z
2023-07-29T19:06:18Z
null
1
0
4
0
0
3
null
MIT
JavaScript
kamranasif506/Awesom-books-withES6
main
<a name="readme-top"></a> <div align="center"> <!-- You are encouraged to replace this logo with your own! Otherwise you can also remove it. --> <img src="logo.png" alt="logo" width="140" height="auto" /> <br/> <h3><b>Awesome Books</b></h3> </div> <!-- TABLE OF CONTENTS --> # 📗 Table of Contents - [📖 About the Project](#about-project) - [🛠 Built With](#built-with) - [Tech Stack](#tech-stack) - [Key Features](#key-features) - [🚀 Live Demo](#live-demo) - [💻 Getting Started](#getting-started) - [Setup](#setup) - [Prerequisites](#prerequisites) - [Install](#install) - [Usage](#usage) - [Run tests](#run-tests) - [Deployment](#deployment) - [👥 Authors](#authors) - [🔭 Future Features](#future-features) - [🤝 Contributing](#contributing) - [⭐️ Show your support](#support) - [🙏 Acknowledgements](#acknowledgements) - [📝 License](#license) <!-- PROJECT DESCRIPTION --> # 📖 Setup Awesome Books <a name="about-project"></a> > Awesome Books is a basic website that allows users to add/remove books from a list using JavaScript modules. ## 🛠 Built With <a name="built-with"></a> 1- HTML. 2- CSS. 3- javascript 4- linters. ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li><a href="https://www.w3schools.com/html/">HTML</a></li> <li><a href="https://www.w3schools.com/css/">CSS</a></li> <li><a href="https://www.w3schools.com/js/">Javascript</a></li> </ul> </details> <!-- Features --> ### Key Features <a name="key-features"></a> - function to add a new book to the collection, with title and author. - function to remove a book from the collection - Displayed all books saved in the collection at the top part of the page - Data preserved in localStorage. - Navigation Bar - Javascript Modules with ES6 syntax <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LIVE DEMO --> ## 🚀 Live Demo <a name="live-demo"></a> - [Live Demo Link](https://kamranasif506.github.io/Awesom-books-withES6/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- GETTING STARTED --> ## 💻 Getting Started <a name="getting-started"></a> To get a local copy up and running, follow these steps. ### Prerequisites 1- Web browser. 2- Code editor 3- Git-smc ### Setup Clone this repository to your desired folder: Run this command: ```sh cd my-folder git clone https://github.com/kamranasif506/Portfolio.git ``` ### Install Install this project with: Run this command: ```sh cd awesome-books npm install ``` ### Usage To run the project, execute the following command: Open index.html file on live server extention. ### Run tests You can run the tests using the following commands: ``` npx hint . npx stylelint "**/*.{css,scss}" run: npx eslint . ``` ### Deployment You can deploy this project using github pages. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ## 👥 Authors <a name="authors"></a> 👤 Kamran Asif - GitHub: [@githubhandle](https://github.com/kamranasif506) - Twitter: [@twitterhandle](https://twitter.com/kamiasif55) - LinkedIn: [LinkedIn](https://www.linkedin.com/in/kamran-asif-76160926b/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - [ ] Add Design animations - [ ] Enhance the styling for all screens. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- CONTRIBUTING --> ## 🤝 Contributing <a name="contributing"></a> 👤 Cristhian Castilo - GitHub: [@githubhandle](https://github.com/App-Developer8866) Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](../../issues/). <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- SUPPORT --> ## ⭐️ Show your support <a name="support"></a> If you like this project just give it a star ⭐️. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> I would like to thank Microverse. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE --> ## 📝 License <a name="license"></a> This project is [MIT](./LICENSE) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
Awesome Books is a basic website that allows users to add/remove books from a list using JavaScript modules.
css,html,javascript,linters
2023-06-05T05:47:35Z
2023-06-05T11:53:06Z
null
1
3
13
0
0
3
null
MIT
HTML
Yulianav09/Portfolio
main
<a name="readme-top"></a> <!-- HOW TO USE: This is an example of how you may give instructions on setting up your project locally. Modify this file to match your project and remove sections that don't apply. REQUIRED SECTIONS: - Table of Contents - About the Project - Built With - Live Demo - Getting Started - Authors - Future Features - Contributing - Show your support - Acknowledgements - License OPTIONAL SECTIONS: - FAQ After you're finished please remove all the comments and instructions! --> <!-- TABLE OF CONTENTS --> # 📗 Table of Contents - [📖 About the Project](#about-project) - [🛠 Built With](#built-with) - [Tech Stack](#tech-stack) - [Key Features](#key-features) - [🚀 Live Demo](#live-demo) - [💻 Getting Started](#getting-started) - [Setup](#setup) - [Prerequisites](#prerequisites) - [Install](#install) - [👥 Authors](#authors) - [🔭 Future Features](#future-features) - [🤝 Contributing](#contributing) - [⭐️ Show your support](#support) - [🙏 Acknowledgements](#acknowledgements) - [📝 License](#license) <!-- PROJECT DESCRIPTION --> # 📖 Portfolio <a name="about-project"></a> **Portfolio** is a project to showcase my most relevant projects ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li>HTML</li> <li>CSS</li> </ul> </details> ### Key Features <a name="key-features"></a> - **Resposive web page** - **Used GitHub Flow** - **Implemented Linters** <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LIVE DEMO --> ## 🚀 Live Demo <a name="live-demo"></a> - [Live Demo Link](https://yulianav09.github.io/Portfolio/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- GETTING STARTED --> ## 💻 Getting Started <a name="getting-started"></a> To get a local copy up and running, follow these steps. ### Prerequisites In order to run this project you need: * Git ### Setup Clone this repository to your desired folder: ```sh git clone https://github.com/Yulianav09/Portfolio.git ``` ### Install Install this project with: ```sh npm i ``` <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ## 👥 Authors <a name="authors"></a> 👤 **Author1** - GitHub: [@Yuliana09](https://github.com/Yulianav09) - LinkedIn: [Yuliana Velez Rodriguez](https://www.linkedin.com/in/yuliana-velez-rodriguez/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - [ ] **Add Desktop version** - [ ] **Add list of projects** - [ ] **Add interactivity with JavaScript** <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- CONTRIBUTING --> ## 🤝 Contributing <a name="contributing"></a> Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](../../issues/). <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- SUPPORT --> ## ⭐️ Show your support <a name="support"></a> If you like this project please consider watch and give it a star. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> I would like to thank my parthers of this week that help me with basic topics. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE --> ## 📝 License <a name="license"></a> This project is [MIT](./LICENSE) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
This project It's a Portfolio created dynamically with JavaScript where you can put your most outstanding projects. Built with JavaScript, HTML, and CSS
css,html,javascript
2023-05-31T22:41:01Z
2023-07-19T02:28:12Z
null
5
14
83
1
0
3
null
MIT
CSS
MohamedHNoor/portfolio-v1
main
<a name="readme-top"></a> <div align="center"> <!-- You are encouraged to replace this logo with your own! Otherwise you can also remove it. --> <img src="./assets/images/logo.png" alt="logo" width="140" height="auto" /> <br/> <h3><b>Portfolio</b></h3> </div> <!-- TABLE OF CONTENTS --> # 📗 Table of Contents - [📗 Table of Contents](#-table-of-contents) - [📖 Portfolio ](#-portfolio-) - [🛠 Built With ](#-built-with-) - [Tech Stack ](#tech-stack-) - [🚀 Live Demo ](#-live-demo-) - [💻 Getting Started ](#-getting-started-) - [Prerequisites](#prerequisites) - [Setup](#setup) - [Install](#install) - [👥 Authors ](#-authors-) - [🤝 Contributing ](#-contributing-) - [⭐️ Show your support ](#️-show-your-support-) - [🙏 Acknowledgments ](#-acknowledgments-) - [📝 License ](#-license-) <!-- PROJECT DESCRIPTION --> # 📖 Portfolio <a name="about-project"></a> > This is a web application that I built to showcase my projects and skills. ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> This project was built using these technologies. - JavaScript - CSS3 - HTML5 <!-- LIVE DEMO --> ## 🚀 Live Demo <a name="live-demo"></a> - [Live Demo Link]() <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- GETTING STARTED --> ## 💻 Getting Started <a name="getting-started"></a> To get a local copy up and running, follow these steps. ### Prerequisites In order to run this project you need: ```sh vs code pc or laptop ``` ### Setup Clone this repository to your desired folder: Example commands: ```sh cd my-folder git clone https://github.com/MohamedHNoor/porfolio-v1.git ``` - ### Install Install this project with: Example command: ```sh cd my-project npm install ``` <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ## 👥 Authors <a name="authors"></a> > Mention all of the collaborators of this project. 👤 **Mohamed Hassan Noor** - GitHub: [@MohamedHNoor](https://github.com/MohamedHNoor) - Twitter: [@MohamedHNoor](https://twitter.com/MohamedHNoor) - LinkedIn: [@MohamedHNoor](https://www.linkedin.com/in/mohamedhnoor/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- CONTRIBUTING --> ## 🤝 Contributing <a name="contributing"></a> Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/MohamedHNoor/porfolio-v1/issues). <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- SUPPORT --> ## ⭐️ Show your support <a name="support"></a> If you like this project please give it a ⭐️! <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> I would like to thank Microverse for assigning me this project. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE --> ## 📝 License <a name="license"></a> This project is [MIT](./LICENSE) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p> # portfolio-v1
This is a web application that I built to showcase my projects and skills.
css3,eslint,github-actions,grid,html5,javascript,stylelint
2023-05-23T15:03:09Z
2023-07-18T13:57:54Z
null
1
12
67
0
0
3
null
MIT
CSS
ctokoli/Conference-Capstone-Project
main
<a name="readme-top"></a> # 📗 Table of Contents - [� Table of Contents](#-table-of-contents) - [📖 Conference Project ](#-Conference-Project-) - [🛠 Built With ](#-built-with-) - [Tech Stack ](#tech-stack-) - [Key Features ](#key-features-) - [💻 Getting Started ](#-getting-started-) - [Prerequisites](#prerequisites) - [Setup](#setup) - [Install](#install) - [Usage](#usage) - [Run tests](#run-tests) - [Deployment ](#deployment-) - [👤 Author ](#-author-) - [🔭 Future Features ](#-future-features-) - [🤝 Contributing ](#-contributing-) - [⭐️ Show your support ](#️-show-your-support-) - [🙏 Acknowledgments ](#-acknowledgments-) - [❓ FAQ ](#-faq-) - [📝 License ](#-license-) # 📖 A Pan-African Leadership Enhancement Conference Project<a name="about-project"></a> **A Pan-African Leadership Enhancement Conference** The conference gathers like-minded leaders, innovators, and entrepreneurs to spark new ideas, forge new partnerships and catalyse social, financial and a mind shift change for leaders in Africa. This year, we are gathering 300+ leaders in Accra, Ghana and several others online for the 5th edition of MLC. <div align="center"> <h3><b>A Pan-African Leadership Enhancement Conference Project</b></h3> </div> <!-- PROJECT DESCRIPTION --> ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li><a href="https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/HTML_basics">HTML5</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/CSS_basics">CSS3</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics">JavaScript</a></li> </ul> </details> ### Key Features <a name="key-features"></a> - **Responsive Design.** - **Pixel Perfect design.** - **Multiple pages app.** - **Mobile Menu** <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 💻 Getting Started <a name="getting-started"></a> To get a local copy up and running, follow these steps. ### Prerequisites In order to run this project you need: - A web browser to view output e.g [Google Chrome](https://www.google.com/chrome/). - An IDE e.g [Visual studio code](https://code.visualstudio.com/). - `node` should be installed in your local machine, [node website](https://nodejs.org/en/download/). - Install the `npm` package manager use this [to install both node and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). - [A terminal](https://code.visualstudio.com/docs/terminal/basics). ### Setup Clone this repository to your desired folder or download the Zip folder: ``` git clone https://github.com/ctokoli/Conference-Capstone-Project.git ``` - Navigate to the location of the folder in your machine: **``you@your-Pc-name:~$ cd Hello Microverse``** ### Install To install all dependencies, run: ``` npm install ``` ### Usage To run the project, follow these instructions: - After Cloning this repo to your local machine. - Open the `index.html` in your browser. ### Run tests To run tests, run the following command: - Track HTML linter errors run: ``` npx hint . ``` - Track CSS linter errors run: ``` npx stylelint "**/*.{css,scss}" ``` ### Deployment <a name="deployment"></a> You can deploy this project using: GitHub Pages, - I used GitHub Pages to deploy my website. - For more information about publishing sources, see "[About GitHub pages](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#publishing-sources-for-github-pages-sites)". ## 🚀 Demo <a name="live-demo"></a> https://ctokoli.github.io/Conference-Capstone-Project/ > | | Mobile version | Desktop version | | > | --- | ----------------------------------- | ------------------------------------ | --- | > | | ![Screenshot1](./images/mobile.png) | ![Screenshot2](./images/desktop.png) | <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 👤 Author <a name="author"></a> 👤 **Cephas, Tokoli** - GitHub: [@Ctokoli](https://github.com/ctokoli/) - Twitter: [@Ctokoli](https://twitter.com/ctokoli) - LinkedIn: [Cephas Tokoli](https://www.linkedin.com/in/cephas-tokoli-a25204123/) <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🔭 Future Features <a name="future-features"></a> - [ ] **Link other pages** - [ ] **Add a contact page** <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🤝 Contributing <a name="contributing"></a> Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](../../issues/). <p align="right">(<a href="#readme-top">back to top</a>)</p> ## ⭐️ Show your support <a name="support"></a> Give a ⭐️ if you like this project and how I managed to build it! <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🙏 Acknowledgments <a name="acknowledgements"></a> - Project from [Microverse](https://www.microverse.org/) html & css module. - Many thanks to <a href="https://www.behance.net/adagio07">Cindy Shin</a> for the UI design - Thanks to the Microverse team for the great curriculum. - Thanks to the Code Reviewer(s) for the insightful feedbacks. - A great thanks to My coding partner(s), morning session team, and standup team for their contributions. - Hat tip to anyone whose code was used. <p align="right">(<a href="#readme-top">back to top</a>)</p> ## ❓ FAQ <a name="faq"></a> - **Can I fork and reuse the repository** - Yes please, feel free. - **Can I improve the repository, and my changes will be accepted if they are good?** - Yes please, nice ideas are welcome, please. <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 📝 License <a name="license"></a> This project is [MIT](./LICENSE) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
The conference gathers like-minded leaders, innovators, and entrepreneurs to spark new ideas, forge new partnerships and catalyse social, financial and a mind shift change for leaders in Africa. This year, we are gathering 300+ leaders in Accra, Ghana and several others online for the 5th edition of MLC.
css,html,javascript
2023-05-27T14:32:11Z
2023-06-01T23:18:39Z
null
1
3
42
0
0
3
null
MIT
CSS
Gustavonn07/OtavioMiranda-JS-TS
main
# Otavio Miranda curso <span style="color: cyan">Udemy</span> Nesse repositório irei guardar meus estudos do curso de Javascript e Typescript (da <span style="color: cyan">udemy</span>) do professor Otavio Miranda. ### Link: <a href="https://www.udemy.com/course/curso-de-javascript-moderno-do-basico-ao-avancado/" target="_blank" style="text-decoration: none; color: cyan;">Ir para udemy.</a> <hr> <div width = '100%' align='center'> <img alt="Gustavo-JAVASCRIPT" height="50" width="70" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-plain.svg"> <img alt="Gustavo-TYPESCRIPT" height="50" width="70" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/typescript/typescript-plain.svg"> </div> <hr> ## Objetivo: - Finalizar o curso dentro do periodo de 1 ano e 6 meses (Curso iniciado em 03/06/2023). - Conseguir entender desde o basico de <strong>Javascript</strong> e seus frameworks até o avançado de <strong>Typescript</strong>. - Completar todas as aulas e exercícios. - <strong>Não</strong> desistir no processo. - Unidades concluidas <strong>(9/37)</strong>. <hr> <table align='center'> <tr align='center'> <th colspan="2"><h2>Unidade 01 (03/06/2023)</h2> <tr> <td><h3 align='center'>Resumo:</h3> <td> Foi explicado como funcionará o curso e toda sua estrutura, desde a primeira unidade até a ultima. </tr> <tr> <td><h3 align='center'>Tecnologias Estudadas:</h3> <td align='center'> <img alt="Gustavo-VSCODE" height="30" width="30" src="https://cdn.icon-icons.com/icons2/2107/PNG/512/file_type_vscode_icon_130084.png"> <img alt="Gustavo-NODEJS" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/nodejs/nodejs-plain.svg"> <img alt="Gustavo-JAVASCRIPT" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-plain.svg"> </tr> </tr> <tr align='center'> <th colspan="2"><h2>Unidade 02 (06/06/2023)</h2> <tr> <td><h3 align='center'>Resumo:</h3> <td> Foi introduzido o javascript, valores e constantes, tipos primitivos e o básico de tipos de referência. Foi utilizado também as funções de Alert, aprofundado os conceitos de string e numbers e o uso do Objeto Math. </tr> <tr> <td><h3 align='center'>Tecnologias Estudadas:</h3> <td align='center'> <img alt="Gustavo-JAVASCRIPT" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-plain.svg"> <img alt="Gustavo-HTML" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/html5/html5-plain.svg"> </tr> </tr> <tr align='center'> <th colspan="2"><h2>Unidade 03 (10/06/2023)</h2> <tr> <td><h3 align='center'>Resumo:</h3> <td> Foi ensinado logica de programação com Javascript e o básico da linguagem (de Operadores até Tratamento de erros). Foi feito também exercícios como Calculadora de IMC, Timer e Lista de Tarefas. </tr> <tr> <td><h3 align='center'>Tecnologias Estudadas:</h3> <td align='center'> <img alt="Gustavo-JAVASCRIPT" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-plain.svg"> <img alt="Gustavo-HTML" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/html5/html5-plain.svg"> </tr> </tr> <tr align='center'> <th colspan="2"><h2>Unidade 04 (04/07/2023)</h2> <tr> <td><h3 align='center'>Resumo:</h3> <td> Foi finalizado o conteudo de funções avançadas em javascript, começando com uma recaptulação sobre o assunto até aprofundar sobre o mesmo. </tr> <tr> <td><h3 align='center'>Tecnologias Estudadas:</h3> <td align='center'> <img alt="Gustavo-JAVASCRIPT" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-plain.svg"> </tr> </tr> <tr align='center'> <th colspan="2"><h2>Unidade 05 (20/07/2023)</h2> <tr> <td><h3 align='center'>Resumo:</h3> <td> Foi finalizado o conteudo de arrays avançadas em javascript, começando com uma recaptulação sobre o assunto até aprofundar sobre o mesmo. </tr> <tr> <td><h3 align='center'>Tecnologias Estudadas:</h3> <td align='center'> <img alt="Gustavo-JAVASCRIPT" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-plain.svg"> </tr> </tr> <tr align='center'> <th colspan="2"><h2>Unidade 06 (06/08/2023)</h2> <tr> <td><h3 align='center'>Resumo:</h3> <td> Foi finalizado o conteudo de objetos avançados em javascript, começando com uma recaptulação sobre o assunto até aprofundar sobre o mesmo. Foi feito um execício usando arrays e objetos com um intuito de validar CPFs. </tr> <tr> <td><h3 align='center'>Tecnologias Estudadas:</h3> <td align='center'> <img alt="Gustavo-JAVASCRIPT" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-plain.svg"> </tr> </tr> <tr align='center'> <th colspan="2"><h2>Unidade 07 (08/09/2023)</h2> <tr> <td><h3 align='center'>Resumo:</h3> <td> Foi ensinado POO usando classes, getters, setters, heranças e métodos estáticos em javascript. </tr> <tr> <td><h3 align='center'>Tecnologias Estudadas:</h3> <td align='center'> <img alt="Gustavo-JAVASCRIPT" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-plain.svg"> </tr> </tr> <tr align='center'> <th colspan="2"><h2>Unidade 08 (24/09/2023)</h2> <tr> <td><h3 align='center'>Resumo:</h3> <td> Foi ensinado o conceito de Promises e seus métodos, AJAX, Fetch API e Axios utilizando JSON. </tr> <tr> <td><h3 align='center'>Tecnologias Estudadas:</h3> <td align='center'> <img alt="Gustavo-JAVASCRIPT" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-plain.svg"> <img alt="Gustavo-HTML" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/html5/html5-plain.svg"> </tr> </tr> <tr align='center'> <th colspan="2"><h2>Unidade 09 (02/10/2023)</h2> <tr> <td><h3 align='center'>Resumo:</h3> <td> Foi ensinado Webpack com Babel para compilar codigos complexos em sistemas antigos e o uso de Import e Export. </tr> <tr> <td><h3 align='center'>Tecnologias Estudadas:</h3> <td align='center'> <img alt="Gustavo-JAVASCRIPT" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-plain.svg"> <img alt="Gustavo-HTML" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/html5/html5-plain.svg"> <img alt="Gustavo-BABEL" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/babel/babel-original.svg"> <img alt="Gustavo-WEBPACK" height="30" width="40" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/webpack/webpack-original.svg"> </tr> </tr> <!-- <tr align='center'> <th colspan="2"><h2>Unidade </h2> <tr> <td><h3 align='center'>Resumo:</h3> <td> </tr> <tr> <td><h3 align='center'>Tecnologias Estudadas:</h3> <td align='center'> </tr> </tr> --> </table>
My studies at Otavio Miranda Javascript and Typescript course at udemy
frameworks,javascript,otaviomiranda,typescript,udemy,expressjs,mern-stack,mongodb,nodejs,poo
2023-06-04T01:41:00Z
2023-10-02T15:32:14Z
null
2
1
154
0
0
2
null
MIT
JavaScript
nsinorov/Web-Development-Bootcamp-
main
<h1 align="center">Web Development Bootcamp</h2> <p align="centre"> <img src="https://github.com/nsinorov/Web-Development-Bootcamp-/assets/45227327/63adee94-a218-4721-b51c-fda2ea3a5678" alt="Udemy"/> </p> Description for the Cource The Complete Front-End Development 2023: Welcome to the Complete Web Development Bootcamp, the only course you need to learn to code and become a full-stack web developer. With 150,000+ ratings and a 4.8 average, my Web Development course is one of the HIGHEST RATED courses in the history of Udemy! ## Throughout this comprehensive course, we cover a massive amount of tools and technologies, including: Front-End Web Development HTML 5 CSS 3 Flexbox Grid Bootstrap 5 Javascript ES6 DOM Manipulation jQuery Bash Command Line Git, GitHub and Version Control Backend Web Development Node.js NPM Express.js EJS REST APIs Databases SQL MongoDB Mongoose Authentication Firebase React.js React Hooks Web Design Deployment with GitHub Pages, Heroku and MongoDB Atlas Web3 Development on the Internet Computer Blockchain technology Token contract development NFT minting, buying and selling logic By the end of this course, you will be fluently programming and be ready to make any website you can dream of.
Instructor: Dr. Angela Yu
css3,html5,javascript,react,mogoose,mongodb
2023-05-17T13:41:31Z
2023-10-22T09:53:23Z
null
1
0
110
0
0
2
null
MIT
HTML
Aniket-Kajal/A-Simple-Dice-Game
main
# A-Simple-Dice-Game It is just a simple game where two dice are rolled simultaneously and assigned to two different players and the player with the higher number wins the round and can be played again just by refreshing it. ** The main Objective of building the game was to practice beginner-level JavaScript like generating random numbers which can have further use in high-level websites like (refer: <a href="https://css-tricks.com/lots-of-ways-to-use-math-random-in-javascript/"> Math.randon function</a>) as well as getting some practice in DOM manipulation like setAttributes and innerHTML. ** Changes can be made in the HTML, CSS and JavaScript file here to change the page according to your need.
A simple dice rolling game for 2 players.
css,html,javascript
2023-05-19T15:28:26Z
2023-06-03T19:35:34Z
null
1
0
9
0
0
2
null
null
JavaScript
Im-Rises/nbody-simulator-react-p5-website
main
# nbody-simulator-react-p5 <p align="center"> <img src="https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB" alt="reactLogo" style="height:50px;"> <img src="https://img.shields.io/badge/JavaScript-323330?style=for-the-badge&logo=javascript&logoColor=F7DF1E" alt="javascriptLogo" style="height:50px;"> <img src="https://img.shields.io/badge/Sass-CC6699?style=for-the-badge&logo=sass&logoColor=white" alt="scssLogo" style="height:50px;"> <img src="https://img.shields.io/badge/CSS-239120?&style=for-the-badge&logo=css3&logoColor=white" alt="cssLogo" style="height:50px;"> <img src="https://img.shields.io/badge/p5%20js-ED225D?style=for-the-badge&logo=p5dotjs&logoColor=white" alt="cssLogo" style="height:50px;"> </p> ## Description This is a simple demo of the `nbody-simulator-react-p5` package. It is a nbody simulator made with React and p5.js. The bodies are attracted to each other and by the mouse cursor on click. ## 🚀🚀[You can try it online from your browser](https://im-rises.github.io/nbody-simulator-react-p5-website/) 🚀🚀 ## 🚀🚀 [The package is available on npm](https://www.npmjs.com/package/nbody-simulator-react-p5) 🚀🚀 > **Note** > I also made a C++ version for WebGL2 using OpenGL ES 3.0. You can check it > out [here](https://github.com/Im-Rises/nbody-simulator-webgl). > **Note** > I also made a version using Barnes-Hut algorithm. You can check it > out [here](https://github.com/Im-Rises/nbody-simulator-barnes-hut-react-p5). ## Screenshots | Screenshot 1 | Screenshot 2 | |---------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| | ![Screenshot1](https://github.com/Im-Rises/nbody-simulator-react-p5/assets/59691442/59dbae4f-bfe8-4923-ad06-cc6abf07db13) | ![Screenshot2](https://github.com/Im-Rises/nbody-simulator-react-p5/assets/59691442/ec62857c-fb48-4049-8a8c-32a0ccc5fa91) | ## Demo video https://github.com/Im-Rises/nbody-simulator-react-p5/assets/59691442/20bc593e-7bd0-4d60-9470-a8caed1a45bd ## GitHub Actions [![Node.js CI](https://github.com/Im-Rises/nbody-simulator-react-p5-website/actions/workflows/node.js.yml/badge.svg?branch=main)](https://github.com/Im-Rises/nbody-simulator-react-p5-website/actions/workflows/node.js.yml) [![ESLint](https://github.com/Im-Rises/nbody-simulator-react-p5-website/actions/workflows/eslint.yml/badge.svg?branch=main)](https://github.com/Im-Rises/nbody-simulator-react-p5-website/actions/workflows/eslint.yml) [![CodeQL](https://github.com/Im-Rises/nbody-simulator-react-p5-website/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/Im-Rises/nbody-simulator-react-p5-website/actions/workflows/codeql.yml) [![pages-build-deployment](https://github.com/Im-Rises/nbody-simulator-react-p5-website/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/Im-Rises/nbody-simulator-react-p5-website/actions/workflows/pages/pages-build-deployment) The project is set up to run the following actions: [//]: # (- pages-build-deployment : Builds the website and deploys it to GitHub Pages.) - node.js.yml : Runs the tests for the Node.js project. - eslint.yml : Runs the ESLint linter on the project. - codeql.yml : Runs the CodeQL linter on the project. - pages-build-deployment : Publish the website ## Libraries React: <https://reactjs.org/docs/getting-started.html> Xo: <https://github.com/xojs/xo> <https://github.com/xojs/eslint-config-xo-react> <https://github.com/xojs/eslint-config-xo-typescript> ESLint: <https://eslint.org/docs/latest/user-guide/getting-started> GitHub gh-pages: <https://github.com/gitname/react-gh-pages> P5.js: <https://p5js.org/> <https://www.npmjs.com/package/react-p5> react-device-detect: <https://www.npmjs.com/package/react-device-detect> ## Documentation The Coding Challenge (math and physics): <https://www.youtube.com/watch?v=OAcXnzRNiCY> P5.js: <https://p5js.org/> P5.js React: <https://www.npmjs.com/package/react-p5> ## Links Check the source code on [![github](https://user-images.githubusercontent.com/59691442/223556058-6244e346-8117-43cd-97c6-bf68611bf286.svg)](https://github.com/im-rises/nbody-simulator-react-p5) Check the demo on [![github](https://user-images.githubusercontent.com/59691442/223556058-6244e346-8117-43cd-97c6-bf68611bf286.svg)](https://github.com/im-rises/nbody-simulator-react-p5-website) Check the package on [![npm](https://user-images.githubusercontent.com/59691442/223556055-4e9ef014-79d4-4136-ac07-b837b49066c8.svg)](https://www.npmjs.com/package/nbody-simulator-react-p5) ## Contributors Quentin MOREL : - @Im-Rises - <https://github.com/Im-Rises> [![GitHub contributors](https://contrib.rocks/image?repo=Im-Rises/nbody-simulator-react-p5-website)](https://github.com/Im-Rises/nbody-simulator-react-p5-website/graphs/contributors)
N-Body simulation package demo made in React (bruteforce)
gravity,javascript,n-body,nbody,nbody-simulation,package,react,simulation,typescript
2023-05-17T06:21:04Z
2023-09-28T02:28:56Z
null
1
11
19
0
0
2
null
MIT
JavaScript
Shiyang-Zhao/EmploVerse-Frontend
main
<h1 align="center"> <br> EmploVerse (Frontend) <br> <a href="https://github.com/Shiyang-Zhao/EmploVerse-Backend"> Emploverse (Backend) </a> <br> </h1> <h3 align="center">(Project is under development and maintenance, more features are coming)</h3> <p align="center"> <a href="http://emploverse-frontend.herokuapp.com/"> <img src="https://img.shields.io/badge/Visit-Website-blue" alt="Website"> </a> <a href="https://github.com/Shiyang-Zhao/EmploVerse-Frontend/blob/main/LICENSE"> <img src="https://img.shields.io/badge/License-MIT-green" alt="License"> </a> </p> <p align="center"> <strong>🔒 A comprehensive employee management web application</strong> </p> <p align="center"> • <a href="#-Features">Features</a> • <a href="#-Technologies">Technologies</a> • <a href="#-Usage">Usage</a> • <a href="#-Contributing">Contributing</a> • <a href="#-License">License</a> • <a href="#-Status">Status</a> • <a href="#-Social-Media">Social Media</a> • <a href="#-Contact">Contact</a> </p> --- # 🚀 Features - User authentication: Secure user registration and login system. - Employee management: Add, update, and delete employee records. - Employee directory: Browse and search for employees. - Roles and permissions: Assign different roles to users with specific permissions. - Reports and analytics: Generate reports and gain insights into employee data. - Leave management: Track employee leaves and manage leave requests. # 💻 Technologies - Front-end: HTML, CSS, JavaScript, React.js - Back-end: Java, Spring Boot - Database: MySQL - Authentication: JWT (JSON Web Tokens), RBAC - UI Framework: Bootstrap - Deployment: Heroku, AWS EC2, AWS RDS # 📝 Usage ### Live Demo: <a href="http://emploverse-frontend.herokuapp.com/">here</a> - Register a new user account or log in with existing credentials. - Explore the employee management features, such as adding new employees, updating their information, and managing leaves. - Utilize the employee directory to search and view employee details. - Generate reports and analyze employee data using the provided analytics tools. ### UI <img src="https://github.com/Shiyang-Zhao/Shiyang-Zhao/blob/main/static/EmploVerse1.gif" alt="EmploVerse"> ### Sign in as User <img src="https://github.com/Shiyang-Zhao/Shiyang-Zhao/blob/main/static/EmploVerse2.gif" alt="EmploVerse"> ### Sign in as Admin (Manager and Admin have the same privileges so far) <img src="https://github.com/Shiyang-Zhao/Shiyang-Zhao/blob/main/static/EmploVerse3.gif" alt="EmploVerse"> # 🤝 Contributing Contributions are welcome! If you'd like to contribute to EmploVerse, please follow these steps: 1. Fork the repository. 2. Create a new branch for your feature or bug fix. 3. Commit your changes. 4. Push the branch to your forked repository. 5. Submit a pull request with a detailed description of your changes. # 📄 License This project is licensed under the [MIT License](https://github.com/Shiyang-Zhao/EmploVerse-Frontend/blob/main/LICENSE). # 📈 Status ![Status](https://img.shields.io/badge/Status-In%20Progress-orange) # 📱 Social Media Connect with us on social media: <a>[![GitHub](https://img.shields.io/github/followers/Shiyang-Zhao?label=Follow%20%40Shiyang-Zhao&style=social)](https://github.com/Shiyang-Zhao) <a>[![Instagram](https://img.shields.io/badge/Connect%20with%20me%20on-Instagram-orange)](https://www.instagram.com/shawn_zhao0/) <a>[![LinkedIn](https://img.shields.io/badge/Connect%20with%20me%20on-LinkedIn-blue)](https://www.linkedin.com/in/shiyang-zhao-0a3a411a0/) <a>[![Portfolio](https://img.shields.io/badge/Check%20out%20my-Portfolio-yellow)](https://shiyang-zhao.github.io/) # 📞 Contact For any inquiries or feedback, please contact the project maintainer: Shiyang Zhao: [shiyang2575326696@gmail.com](shiyang2575326696@gmail.com)
Employee Management System: EmploVerse (Frontend)
boottrap,employeemanagementsystem,frontend,reactjs,css,html,javascript,heroku
2023-05-31T18:00:02Z
2023-10-11T05:22:31Z
null
1
0
79
0
0
2
null
MIT
JavaScript
VaheStepanyan100/javascript-capstone
dev
# Javascript-Capstone 🎥 Javascript-Capstone project is a web application that we created using our knowledge on HTML, CSS and JavaScript. The project focuses on TV shows, which relies on an external API for data retrieval. It retrieves information from the API and presents a list of TV shows, accompanied by features for liking and commenting on them. ## Table of Contents 📑 - [Features](#features-)🚀 - [Built With](#built-with-)🛠 - [Live Demo](#Live-Demo-) 💻 - [Video Walkthrough](#Video-Walkthrough-) 📹🚶 - [Getting Started](#getting-started-)🏁 - [Authors](#authors-)👥 - [Future Features](#future-features-)🔭 - [Contributing](#contributing-)🤝 - [Show your support](#show-your-support-)⭐️ - [Acknowledgments](#acknowledgments-)🙏 - [FAQ](#faq-)❓ - [License](#license-)📝 ## Features 🚀 This web app has the following features: - Use of best practices for HTML/CSS and JavaScript - Use callbacks and promises - modular JavaScript - Use of Webpack configuration - Use Gitflow - Connect to TVmaze API ## Built With 🛠 This web app was built with: - HTML - CSS - JavaScript - Webpack - Jest ## Live Demo 💻 - [Live-Demo] https://vahestepanyan100.github.io/javascript-capstone/dist/ ## Video Walkthrough 📹🚶 - [Video-Walkthrough] https://drive.google.com/file/d/1g-hOXgTrNV2rWi0W9lX415SAbTfPr-R3/view?usp=share_link ## Getting Started 🏁 To run this web app locally, follow these steps: ### Prerequisites 📋 You need to have: - A web browser - A terminal - Git ### Setup 🔧 Clone this repository to your desired folder: ```bash cd my-desired-folder git clone https://github.com/VaheStepanyan100/javascript-capstone.git ``` For more information on how to clone or fork a repository, check these links: - [How to clone a repo](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) - [How to fork a repo](https://docs.github.com/en/get-started/quickstart/fork-a-repo) ### Usage 💻 To use this web app, open index.html from dist folder with your web browser. ## Authors 👥 👤 Aklilu Mekonnen - GitHub: [@akezeth](https://github.com/akezeth) - Twitter: [@akezeth](https://twitter.com/akezeth) - LinkedIn: [Aklilu Mekonnen](https://www.linkedin.com/in/aklilu-mekonnen-a8287b74) 👤 Vahe Stepanyan - GitHub: [@VaheStepanyan100](https://github.com/VaheStepanyan100) - LinkedIn: [Vahe Stepanyan](https://www.linkedin.com/in/vahestepanyan/) ## Future Features 🔭 We plan to add these features in the future: - Set up the reservation section - Complete Genre and Rating pages ## Contributing 🤝 We welcome any contributions, issues, and feature requests! Feel free to check the [issues page](https://github.com/VaheStepanyan100/javascript-capstone/issues). ## Show your support ⭐️ If you like this project, please give it a star and share it with your friends. ## Acknowledgments 🙏 We would like to thank [Microverse](https://www.microverse.org/) for providing us with the knowldege to build this project. ## FAQ ❓ Do I need an IDE or a special text editor to make changes? - No, you don't. You can use any text editor you like. ## License 📝 This project is licensed under the [MIT License](https://github.com/VaheStepanyan100/javascript-capstone/blob/main/LICENSE).
This JavaScript project is about building your web application based on an external API.
css,html,javascript
2023-05-26T12:12:57Z
2023-06-01T08:51:28Z
null
2
12
66
0
0
2
null
MIT
JavaScript
pedrop-dev/personal-projects
master
# Personal projects > Projects made for practice and learn new features 🎯 ### Simple Notes <br> **Tools** * HTML5 * CSS3 * JavaScript <br> 🔗: https://pedrop-dev.github.io/personal-projects/simple-notes/ ### Pokedex Page <br> **Tools** * HTML5 * CSS3 * JavaScript <br> 🔗: https://pedrop-dev.github.io/personal-projects/pokedex/ <br> [ Youtube tutorial video ]( https://m.youtube.com/watch?v=SjtdH3dWLa8 ) ### Jokes Generator <br> **Tools** * HTML5 * CSS3 * JavaScript <br> 🔗: https://pedrop-dev.github.io/personal-projects/jokes-generator/ ### Sass Landing Page <br> **Tools** * HTML5 * CSS3 * Sass 🔗: https://pedrop-dev.github.io/personal-projects/sass-landing-page/ ### Task List <br> **Tools** * HTML5 * CSS3 * Sass * JavaScript * React JS 🔗: [personal-projects-alpha.vercel.app](https://personal-projects-alpha.vercel.app) ### Pomodoro <br> **Tools** * HTML5 * CSS3 * JavaScript * React JS * TailwindCSS 🔗: [personal-projects-oboy-oyaw7i4oo-pedrop-dev.vercel.app](https://personal-projects-oboy-oyaw7i4oo-pedrop-dev.vercel.app/)
Projects made for practice and learn new features
css,html,javascript,react,sass,tailwindcss
2023-05-30T22:42:43Z
2023-10-18T18:56:49Z
null
1
0
36
0
0
2
null
MIT
TypeScript
kokoro-hart/Paginize
main
# Paginize [![ci](https://github.com/kokoro-hart/Paginize/actions/workflows/ci.yml/badge.svg)](https://github.com/kokoro-hart/Paginize/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![License: MIT](https://img.shields.io/badge/vresion-1.1.0-blue)](https://www.npmjs.com/package/@kokorotobita/paginize?activeTab=readme) **Paginize** is a library for easily applying pagination to the existing DOM, implemented in **TypeScrip**t. Furthermore, it can reliably create pagination UI that complies with [WAI-ARIA guidelines](https://design-system.w3.org/components/pagination.html "タイトル") with minimal configuration. <br> You can also get this with just a little CSS writing: note: you will need to write your own CSS to get this UI. This package does not provide CSS. ![vue-awesome-pagination-k](https://github.com/kokoro-hart/Paginize/assets/84849551/f38a36d3-e61e-4dd8-995c-4786758ce12b) Following are some of the interactions handled by the library:- - Apply paging to already existing DOM elements - Toggle each aria attribute - Save each page to browser history ※Asynchronous paging is not supported ## Installation Paginize is provided by npm and can be installed from the command line. ``` npm i @kokorotobita/paginize ``` ## Quick Start ### 1. Add the pagination markup ```html <!-- [1] Wrapper--> <div class="paginize"> <!-- [2] Contents--> <ul class="paginize-contents"> <li class="paginize-content">item-1</li> <li class="paginize-content">item-2</li> <li class="paginize-content">item-3</li> ...Repeat below </ul> <!-- [3] Paginaiton--> <nav aria-label="pagination" class="paginize-wrapper"> <button type="button" class="paginize-prev" aria-label="Back to Previous Page"> &lt;</button> <ol class="paginize-counter-list" aria-busy="true"> <!-- [4] The page numbers will be inserted here--> </ol> <button type="button" class="paginize-next" aria-label="Go to next page">&gt;</button> </nav> </div> ``` **[ 1 ] Wrapper<br>** This is the outermost container for pagination and the content to which it switches. The role of this container is to limit the scope. **[ 2 ] Contents<br>** Add contents. **[ 3 ] Paginaiton<br>** Wrapper element for pagination.The aria-label attribute adds to the `<nav>` element. This is because the main site navigation also uses the `<nav>` element. If there are multiple `<nav> `elements on a single page, they must all be given unique, accessible names with `aria-label`. **[ 4 ] PageNumbers<br>** A page number list is output here. The `aria-busy` attribute is added to explicitly indicate that the contents are updated each time. ### 2. Add Paginize Instance Import modules to instantiate Paginize ```js import { Paginize } from "@kokorotobita/paginize" const pagination = new Paginize(".paginize") ``` ## [WIP] Using Options Frequently used options Accepts an optional configuration object as the second argument. ```ts const pagination = new Paginize(".paginize", { perPage: 10, // Number of contents to be displayed on one page pageRangeDisplayed: 2, // This determines how many "before and after" numbers are displayed on the page you are on. // A11y nextMassage: "Go to next page", prevMassage: "Go to prev page", bulletMessage: "Go to page {{count}}", firstPageMessage: "This is first page", lastPageMessage: "This is last page", // Function onPageChange: (current: number) => { console.log("current page is", current) }, onClickNext: () => { // next page button clicked }, onClickPrev: () => { // prev page button clicked }, onBeforeMount: () => { // before mount }, onMounted: () => { // after mount }, }) ``` ## License Released under the MIT license. MIT: [http://rem.mit-license.org](http://rem.mit-license.org/), See [LICENSE](/LICENSE)
JavaScript (TypeScript) Pagination
javascript,pagination,typescript,paginate,paginator
2023-06-03T08:27:52Z
2023-06-04T13:15:19Z
2023-06-04T09:37:43Z
1
1
30
2
0
2
null
MIT
TypeScript
ChoaibMouhrach/codebuddy
main
# CodeBuddy CodeBuddy is an online platform built with TypeScript, Next.js, and Tailwind CSS that allows users to share links, images, and code snippets with ease. ## Features - **User Authentication:** Users can sign up and log in to CodeBuddy using their email and password, ensuring secure access to the platform. - **Link Sharing:** Users can share links with the community by submitting the URL along with a title and optional description. Other users can then view and interact with the shared links. - **Image Sharing:** Users can upload and share images by selecting the file from their device. Shared images are displayed along with their associated metadata. - **Code Snippet Sharing:** Users can post code snippets by specifying the programming language and pasting the code. Code snippets are highlighted for easy reading and can be copied by other users. ## Technologies Used CodeBuddy utilizes the following technologies: - **TypeScript:** The entire project is written in TypeScript, providing static typing and enhanced code readability. - **Next.js:** Next.js is used as the framework for building the web application. It provides server-side rendering, static site generation, and other powerful features out of the box. - **Tailwind CSS:** Tailwind CSS is used as the styling framework, allowing for rapid development and easy customization through utility classes. - **Other Dependencies:** The project incorporates various additional dependencies such as Axios for API calls, react hook form for form handling, and React Query for managing data fetching and caching. ## Getting Started To run CodeBuddy locally on your machine, follow these steps: 1. Clone the repository: `git clone https://github.com/pacy2/codebuddy.git` 2. Navigate to the project directory: `cd codebuddy` 3. Install the dependencies: `npm install` / `yarn install` / `pnpm install` 4. Start the development server: `npm run dev` / `yarn run dev` / `pnpm run dev` 5. Open your browser and visit `http://localhost:3000` ## Configuration CodeBuddy requires some configuration to connect to external services or APIs. Make sure to set the following environment variables located in the .env.example file ## Contributing Contributions to CodeBuddy are welcome! If you'd like to contribute, please follow these steps: 1. Fork the repository. 2. Create a new branch: `git checkout -b my-new-branch` 3. Make your changes and commit them: `git commit -am 'Add some feature'` 4. Push the changes to your branch: `git push origin my-new-branch` 5. Submit a pull request detailing your changes. Please ensure that your code adheres to the project's coding conventions and is well-documented. ## License The CodeBuddy project is licensed under the [MIT License](LICENSE).
CodeBuddy is an online platform for sharing links ,images and,code snippets with ease
codesharing,filesharing,nextjs,prisma,typescript,javascript,nodejs,postgresql,react
2023-05-21T21:50:16Z
2023-07-22T17:25:05Z
null
2
11
23
1
1
2
null
null
TypeScript
seanpm2001/AutoPeer
AutoPeer_Main-dev
*** <img src="/AutoPeer_Logo_1024px_V1_HighCompression.png" alt="AutoPeer logo failed to load" width="200" height="200"> # AutoPeer `🔼️📃️🔽️💾️ AutoPeer is a browser extension and software library for automatically seeding files as you download/upload them from your browser or P2P client.` ## Ask before peering For safety and privacy reasons, the program will always ask before sharing each individual file. ## Platforms AutoPeer works with: **Browsers** - Mozilla Firefox - More browsers coming in the future. **BitTorrent clients** - Transmission - More bt clients coming in the future. ## Technologies AutoPeer makes use of the following technologies: - [`WebTorrent`](https://webtorrent.io/) - More to be listed in the future. ## Languages AutoPeer is written in 5 programming languages: ### Web extensions - JavaScript (for WebTorrent functionality, and other functions) - CSS (for styling the extensions) ### Desktop componentsd - C (For the core) - Python (For the application, and parts of the core) - Shell (For scripting) ## Documentation Additional documentation for AutoPeer is located in a [:octocat: separate repository `(AutoPeer_Docs)`](https://github.com/seanpm2001/AutoPeer_Docs/) *** # File info **File version:** `1 (2023, Saturday, June 3rd at 8:52 pm PST)` ***
🔼️📃️🔽️💾️ AutoPeer is a browser extension and software library for automatically seeding files as you download/upload them from your browser or P2P client.
autopeer,autopeer-project,browser-extension,c-lang,c-language,css,firefox,gpl3,gplv3,javascript
2023-06-03T23:22:36Z
2023-06-04T04:19:44Z
null
1
0
31
0
1
2
null
GPL-3.0
Python
IsaacEf/RetroLog
main
# RetroLog ## Team: Niels Mandrus, Kulindu Cooray, Isaac Efrosman, Michael Meng, Colin Langella ## Zip File Right-click on the RetroLog zip file and press unzip to retrieve the RetroLog folder Open a command line terminal and change the directory to the unzipped folder ## Frontend Setup Install the latest Node.js version `https://nodejs.org/en` Then install the latest version of npm by opening a command line terminal and entering `$ npm install -g npm` Check the version and ensure it matches `$ node -v $ npm -v` Now navigate to `RetroLog/frontend/src` on the terminal and run `$ npm run build` This will create the build folder and now the backend has to be run ## Backend Setup Download the most recent version of Golang Be sure to install the proper installer for your architecture `https://go.dev/dl/` To start the webserver navigate to the `RetroLog/backend/` folder in a terminal and run `$ go run main.go` ## Backend API Our backend implements a REST API which has been documented [here](https://github.com/IsaacEf/RetroLog/blob/main/docs/backend-api.md) ## Website The website will run on port 8000 so navigate to `localhost:8000` on any browser and the website will be visible.
Backwork server for students at Rensselaer Polytechnic Institute
go,react,sql,javascript
2023-06-06T20:17:49Z
2023-08-19T03:43:41Z
null
5
35
36
0
1
2
null
MIT
JavaScript
ishukhan/admin-pannel
adminPannel
# Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). ## Available Scripts In the project directory, you can run: ### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in your browser. The page will reload when you make changes.\ You may also see any lint errors in the console. ### `npm test` Launches the test runner in the interactive watch mode.\ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. ### `npm run build` Builds the app for production to the `build` folder.\ It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.\ Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. ### `npm run eject` **Note: this is a one-way operation. Once you `eject`, you can't go back!** If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
Developed a React admin panel utilizing JavaScript, React, HTML, and Material-UI Icons. Streamlined interface for efficient data management. Leverages cutting-edge web technologies for enhanced user experience. Repository showcases clean code and intuitive design.
admin-dashboard,html,javascript,matrial-ui,rectjs
2023-05-30T10:51:39Z
2023-06-21T07:12:29Z
null
2
0
56
0
0
2
null
null
JavaScript
joshuajyoh/linkedin-jobs-extended
main
# linkedin-jobs-extended A Google Chrome extension that searches LinkedIn job post descriptions for phrases associated with key categories that are not normally provided in the post's highlights section and includes them as additional highlights. | Before | After | | ------------------- | ------------------ | | ![alt text][before] | ![alt text][after] | ## Categories The extension searches for additional highlights based on the following categories. Such categories can be toggled on/off in options. - **Years of Experience**: e.g. "5 years of experience in Java" - **Education**: e.g. "Must have a Bachelor's degree in Computer Science or equivalent" - **Certifications**: e.g. "Must be a certified AWS Solutions Architect" - **Driver's license**: e.g. "A valid driver's license is required" [before]: https://github.com/joshuajyoh/linkedin-jobs-extended/blob/main/README/before.png [after]: https://github.com/joshuajyoh/linkedin-jobs-extended/blob/main/README/after.png
A Google Chrome extension that includes additional information in the highlights section of LinkedIn job postings, using the content of the job description.
bootstrap,chrome-extension,javascript,linkedin
2023-05-29T16:48:22Z
2023-06-04T23:57:02Z
null
1
0
50
0
0
2
null
null
JavaScript
tregubartemofficial/EventsApp
main
# Events App Welcome to the Events App repository! This app allows users to create, discover, and attend events, fostering a community of like-minded individuals who share common interests. ## Table of Contents - [Introduction](#introduction) - [Features](#features) - [Installation](#installation) - [Usage](#usage) - [Technologies](#technologies) - [Contributing](#contributing) - [License](#license) ## Introduction The Events App is designed to simplify event management and participation. Users can create and promote their events, while also discovering exciting gatherings organized by others. The app promotes community engagement and enhances event experiences. **Official site:** [Event App](https://events-liard-eta.vercel.app/) ## Features - **User Authentication**: Users can sign up and log in using their email or Google accounts, ensuring a secure and personalized experience. - **Event Creation**: Organizers can easily create and publish their events, providing details such as date, time, location, and event description. - **Event Discovery**: Users can browse a wide range of events, filtering by categories, locations, and dates to find activities that match their interests. - **Event Registration**: Attendees can register for events they wish to participate in, helping organizers manage attendance. - **User Profiles**: Each user has a dedicated profile page where they can showcase their attended events and interactions with the community. - **Interactive Interface**: The app features a modern and intuitive user interface that enhances user experience and encourages engagement. ## Installation To set up and run the Events App locally, follow these steps: 1. Clone this repository: `git clone https://github.com/your-username/events-app.git` 2. Navigate to the project directory: `cd events-app` 3. Install dependencies: `npm install` 4. Set up environment variables: Create a `.env` file based on `.env.example` and provide necessary configuration. 5. Start the development server: `npm start` ## Usage Once the development server is up and running, open your browser and navigate to `http://localhost:3000` to explore the app. Sign up, create events, follow other users, and engage with the event community. ## Technologies This project is built using the following technologies: - [React](https://reactjs.org/): A JavaScript library for building user interfaces. - [Firebase](https://firebase.google.com/): A cloud-based platform that provides authentication, real-time database, and hosting services. - [React Router](https://reactrouter.com/): A routing library for React applications, enabling seamless navigation. - [Material-UI](https://mui.com/): A popular React UI framework for designing modern and responsive user interfaces. - [Formik](https://formik.org/): A form library for React applications that simplifies form management and validation. ## Contributing We welcome contributions from the open-source community! If you'd like to contribute to the Events App, follow these steps: 1. Fork this repository. 2. Create a new branch: `git checkout -b feature/your-feature-name` 3. Make your changes and commit them: `git commit -m "Add your commit message"` 4. Push your changes to your fork: `git push origin feature/your-feature-name` 5. Submit a pull request to the main repository. ## License This project is open-source and available under the [MIT License](LICENSE). The MIT License is a permissive open-source license that allows you to freely use, modify, and distribute the code. It's a great choice for open collaboration. You can find the full text of the MIT License in the [LICENSE](LICENSE) file. --- Best regards, Artem Trehub
My pet-project to help managing events
firebase,javascript,react,mui,typescript
2023-05-30T10:16:04Z
2023-09-30T10:05:12Z
null
1
12
60
0
0
2
null
MIT
TypeScript
hozlucas28/Pokemon-Cards
Master
<h1 align="center"> Pokémon's Cards </h1> <h4 align="center"> Repository of an app which generate random Pokémon's cards. </h4> <p align="center"> <a href="#----summary">Summary</a> • <a href="#----key-features">Key Features</a> • <a href="#----installation">Installation</a> • <a href="#----available-scripts">Available Scripts</a> • <a href="#----related">Related</a> • <a href="#----license">License</a> • <a href="#----contact">Contact</a> </p> <p align="center"> <a href="https://pokemon-cards-ochre.vercel.app/" target="_blank"> <img src="./.github/preview.png" width="800"> </a> </p> <p align="center"> <strong>(watch a <a href="https://pokemon-cards-ochre.vercel.app/" target="_blank">live test</a> or a <a href="https://www.youtube.com/watch?v=w4GR0nch1cg" target="_blank">video preview</a>)</strong> </p> <h2> Summary </h2> <p> This is a project where you can generate random pokémons cards made with <a href="https://vitejs.dev/" target="_blank">Vite</a>, <a href="https://reactjs.org/" target="_blank">React</a>, <a href="https://www.typescriptlang.org/" target="_blank">TypeScript</a>, and <a href="https://tailwindcss.com/" target="_blank">Tailwind CSS</a>. You can save these cards in your local storage. I used npm packages like: <a href="https://eslint.org/" target="_blank">ESLint</a>, <a href="https://prettier.io/" target="_blank">Prettier</a>, <a href="https://github.com/typicode/husky" target="_blank">Husky</a>, and others to make my code be more 'prettier'. </p> <h2> Key Features </h2> <p> <ul> <li> Hooks </li> <li> API Fetch </li> <li> React Router </li> <li> Local Storage </li> <li> Live Notifications </li> <li> State Management </li> <li> Responsive Design </li> </ul> </p> <h2> Installation </h2> <p> Clone the repository, install <a href="https://nodejs.org/es/" target="_blank">Node.js</a> (runtime environment) and use <a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code</a> (code editor). Then run command <code>npm install</code> to install all packages, necessary for a Vite app with React, and run command <code>npm run dev</code>. Done, now you can see it in a development server. </p> <h2> Available Scripts </h2> <p> <ul> <li> <code>npm run dev</code>: Runs the app in the development mode. Open <a href="http://localhost:5173" target="_blank">http://localhost:5173</a> to view it in your browser. The page will reload when you make changes. You may also see any lint errors in the console. </li> </ul> </p> <h2> Related </h2> <p> <ul> <li> <a href="https://github.com/hozlucas28/Codo-Codo-React-Project-02-2023" target="_blank">Repository of a to-do lists project</a> </li> <li> <a href="https://github.com/hozlucas28/React-Image-Search-Practice-2023" target="_blank">Repository of an image search project</a> </li> <li> <a href="https://github.com/hozlucas28/React-Interest-Calculator-Practice-2023" target="_blank">Repository of an interest calculator project</a> </li> <li> <a href="https://github.com/hozlucas28/Codo-Codo-React-Project-01-2023" target="_blank">Repository of rock, paper, and scissors project</a> </li> <li> <a href="https://github.com/hozlucas28/Codo-Codo-Front-end-Project-2022" target="_blank">Repository of 'Codo a Codo' Front-end project</a> </li> <li> <a href="https://github.com/hozlucas28/Codo-Codo-Back-end-Project-2022" target="_blank">Repository of 'Codo a Codo' Back-end project</a> </li> </ul> </p> <h2> License </h2> <p> This repository is under <a href="./LICENSE" target="_blank">MIT License</a>, if you want to see what you are allowed to do with the content of this repository, please visit <a href="https://choosealicense.com/licenses/" target="_blank">choosealicense</a> for more information. </p> <h2> Contact </h1> <p> If you want to contact me, please see my <a href="https://github.com/hozlucas28" target="_blank">socials medias</a> in my GitHub profile. </p>
Repository of a personal project about an app which shows Pokémon's cards.
eslint,husky,personal-project,pokemon-api,prettier,reactjs,tailwindcss,typescript,vitejs,css3
2023-05-20T03:26:19Z
2024-01-01T18:14:35Z
null
1
2
44
0
1
2
null
MIT
TypeScript
MuhdHanish/Data-Structure-Js
main
null
This is learning the simple concept of data-structures using javascript.
array,data-structures,javascript,linked-list,queue,stack
2023-06-07T06:30:04Z
2023-06-14T15:04:08Z
null
1
0
36
0
0
2
null
null
JavaScript
theuppercaseguy/GIKI-FD
main
# GIKI-FD Welcome to GIKI-FD! This is a mobile application designed specifically for food delivery services at Ghulam Ishaq Khan Institute of Engineering Sciences and Technology (GIKI), located in Pakistan. The app is built using React Native and Expo, providing a seamless and interactive user experience. ## Description GIKI-FD is a powerful mobile application designed to enhance the food delivery experience for students at GIKI. With its intuitive interface and robust functionality, users can easily order their favorite food items from various food joints like KFC, MCdonalds etc, track their orders, and enjoy a hassle-free dining experience right from their mobile devices. ## Overview GIKI-FD offers a comprehensive set of features to meet the needs of both customers and administrators. Here's an overview of how the app works: ### Customer Side 1. **Login Screen**: Upon launching the app, users are prompted to log in using their credentials. If they don't have an account, they can proceed to the registration screen. 2. **Registration Screen**: New users can create an account by providing the necessary information, including their name, email address, and password. 3. **Menu Screen**: Once logged in, customers are presented with a menu screen where they can browse and select their favorite food items from different food joints available on campus. 4. **Cart Screen**: Customers can review the items they have added to their cart, make modifications such as removing or adding more items, and proceed to place their order. 5. **Placed Orders Screen**: In this screen, customers can view the status of their orders. They can see if their order has been confirmed, track its progress, and view their order history. Customers also have the option to delete past orders. <p float="left"> <img src="/Demo-Pictures/login.jpg" width="250" /> <img src="/Demo-Pictures/registration.jpg" width="250" /> <img src="/Demo-Pictures/menu.jpg" width="250" /> <img src="/Demo-Pictures/cart.jpg" width="250" /> <img src="/Demo-Pictures/placedorders.jpg" width="250" /> </p> ### Admin Side 1. **Upload Food Item**: Admin users have access to an exclusive tab where they can add new food items to the database. This feature enables admins to keep the menu up to date. 2. **Food Items**: Admins can view all the food items available in the database. They can review the existing items and ensure the accuracy of the menu. 3. **Edit Food Item**: Admins have the authority to edit or update any food item in the database. This functionality allows them to make changes to item details such as price, description, or availability etc. 4. **Order Details**: Admins can access a comprehensive list of confirmed orders categorized by each food joint. This feature assists admins in managing inventory and coordinating with food joints to fulfill orders efficiently. 5. **Placed Orders**: Admins can view all placed orders, update their status to "Confirmed" and then to "delivered" if confirmed already , and delete orders from the system if required. <p float="left"> <img src="/Demo-Pictures/adminUploadFoodItem.jpg" width="250" /> <img src="/Demo-Pictures/foodItems.jpg" width="250" /> <img src="/Demo-Pictures/editFoodItem.jpg" width="250" /> <img src="/Demo-Pictures/adminplacedorders.jpg" width="250" /> <img src="/Demo-Pictures/orders.jpg" width="250" /> </p> ## Getting Started To run the app locally, follow these steps: 1. Install Node.js (https://nodejs.org) if you haven't already. 2. Install Expo CLI globally by running `npm install -g expo-cli`. 3. Clone this repository and navigate to the project directory. 4. Change directories: `cd FD`. 5. Install dependencies by running `npm install`. 6. Start the app with `npx expo start`. 7. Use Expo Go (Android/iOS) or scan the QR code with the Expo app to open the app on your device. ## Dependencies The app relies on the following dependencies (check `package.json` for the full list): please make sure to view tha packages.json file, some of these dependencies may have been updated. - "@react-native-picker/picker": "^2.4.10" - "@react-navigation/core": "^6.4.8" - "@react-navigation/native": "^6.1.6" - "@react-navigation/native-stack": "^6.9.12" - "expo": "^46.0.21" - "expo-image-picker": "~13.3.1" - "expo-status-bar": "~1.4.4" - "firebase": "^9.22.1" - "react": "^18.2.0" - "react-google-drive-picker": "^1.2.2" - "react-native": "^0.71.8" ## Contributing Contributions are welcome! If you encounter any issues or have suggestions for improvement, please open an issue or submit a pull request. ## Testing To test the admin side of the app, email me at `saadan06@gmail.com` with the subject: "Request for GIKI-FD admin privileges." If your email is already registered in the GIKI-FD database, you will be granted admin privileges. ## APK Conversion i Havent been able or succesfull at converting this app into an apk file or an ios app file, so if anyones is able to, ill be much obliged. ## License This project is licensed under the [MIT License](LICENSE).
A Food delivery app for my university, using React Native
javascript,react,react-native
2023-06-07T09:17:36Z
2023-06-23T06:21:46Z
null
1
0
25
0
0
2
null
null
JavaScript
uni-helper/galanga
main
<p align="center"> <a href="https://galanga.censujiang.com" target="_blank" rel="noopener noreferrer"> <img width="180" src="https://galanga.censujiang.com/logo.svg" alt="Galanga logo"> </a> </p> <br/> <p align="center"> <a href="https://npmjs.com/package/@uni-helper/galanga"><img src="https://badgen.net/npm/v/@uni-helper/galanga" alt="npm package"></a> </p> <br/> # [@uni-helper/galanga](https://github.com/uni-helper/galanga) 开源好用的 `JS|TS` 常用函数库山奈/Galanga的UNI-APP版本 [官方文档](https://galanga.censujiang.com) | [中国镜像](https://galanga.censujiang.cn) ## :star: 简介 山奈/Galanga(以下简称山奈)是川菜中常用的调味品,也可以用作腌制成为单独的菜品,而这一辅料被人们俗称为姜。 在Web的世界里,它是一个开源的实用的JS函数库,它的目标是提供一些常用的函数,让你的代码更简洁更易读。我们希望利用姜来让您的代码更加美味,让您更加专注于业务逻辑的实现。 - 使用ES6+和TypeScript编写源码,编译生成生产代码 - 此版本为UNI-APP版本,支持小程序、H5、APP等多端 - 无其他依赖,体积小巧 ## :pill: 兼容性 单元测试保证支持如下环境: | IE | CH | FF | SF | OP | IOS | Android | Node | | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- | | 6+ | 29+ | 55+ | 9+ | 50+ | 9+ | 4+ | 4+ | ## :open_file_folder: 目录介绍 ``` . ├── config 打包配置文件 ├── demo 使用demo ├── dist 编译产出代码 ├── docs 项目文档站点 ├── scripts 打包脚本 ├── src 源代码目录 ├── test 单元测试 ├── wiki 项目文档源代码 ``` ## :rocket: 使用者指南 通过npm下载安装代码 ```bash npm install --save @uni-helper/galanga #or yarn add @uni-helper/galanga ``` ## :kissing_heart: 贡献者指南 [CONTRIBUTING.md](https://github.com/censujiang/galanga/blob/master/wiki/guide/contribute.md) ### 主仓贡献者名单 [![贡献者名单](https://contrib.rocks/image?repo=censujiang/galanga)](https://github.com/censujiang/galanga/graphs/contributors) ### UNI-APP版本贡献者名单 [![贡献者名单](https://contrib.rocks/image?repo=uni-helper/galanga)](https://github.com/uni-helper/galanga/graphs/contributors) ## :gear: 更新日志 [CHANGELOG.md](https://github.com/censujiang/galanga/blob/master/wiki/guide/changelog.md) ## :airplane: 计划列表 [TODO.md](https://github.com/censujiang/galanga/blob/master/wiki/guide/changelog.md)
Galanga uni-app ver.
js-lib,uniapp,javascript,uni-app,galanga,uni-helper
2023-05-26T16:56:45Z
2023-11-02T16:13:22Z
null
13
18
68
1
0
2
null
Apache-2.0
JavaScript
dfagundes2001/dev-movies
master
# dev-movies Link do projeto: https://dev-movies-df.netlify.app <br> <h2>Tenologias ultilizadas:</h2> <p>- HTML<p> <p>- Styled-Components<p> <p>- JavaScript</p> <p>- React</p> <h2> Autor </h2> <p>Diego Fagundes da Silva</p> https://www.linkedin.com/in/diego-fagundes-da-silva/
Um site que você poderá pesquisar por filmes e series, ver os trailers, quais são os populares,que vão estrear e muito mais.
css3,deploy,html5,javascript,api,react,styledcomponents,axios
2023-06-04T13:24:23Z
2024-03-28T18:19:14Z
null
1
3
46
0
0
2
null
null
JavaScript
BaseMax/ProductsGraphQLTS
main
# E-Commerce Project with GraphQL and NestJS This project is an e-commerce application built with GraphQL and TypeScript using the NestJS framework. It provides various functionalities for managing products, categories, and user authentication. The project includes features such as user registration, login, authentication, logout, product management (including creation, editing, deletion, searching, sorting, pagination), category management (including creation, editing, deletion), and role-based access control. ## Prerequisites Before running the application, ensure that the following prerequisites are met: - Node.js (version >= 12) is installed on your machine. - NPM (Node Package Manager) or Yarn is installed. - MongoDB or any other compatible database is set up and running. ## Installation Clone the repository: ```bash git clone https://github.com/BaseMax/ProductsGraphQLTS.git ``` Install the dependencies: ```bash cd ProductsGraphQLTS npm install ``` ## Configuration Rename the `.env.example` file to `.env` and update the following configuration variables as per your environment: ```makefile # Database configuration DB_HOST=<your-database-host> DB_PORT=<your-database-port> DB_NAME=<your-database-name> # JWT secret key for token generation JWT_SECRET=<your-secret-key> # Admin email and password for initial setup ADMIN_EMAIL=<admin-email> ADMIN_PASSWORD=<admin-password> ``` Adjust any other necessary configuration settings based on your requirements. ## Usage To start the application, run the following command: ``` npm run start ``` This will start the server on the specified port (default is 3000). You can access the GraphQL playground by navigating to http://localhost:3000/graphql in your browser. ## API Endpoints The API endpoints are defined using GraphQL and can be accessed through the GraphQL playground. Below are the available queries and mutations: ### Authentication - `register`: Create a new user account. - `login`: Authenticate a user and generate an access token. - `logout`: Invalidate the access token and log out the user. ### Products - `getProducts`: Retrieve a list of products. - `createProduct`: Create a new product. - `editProduct`: Update an existing product. - `deleteProduct`: Delete a product. - `searchProduct`: Search for products based on a keyword. - `filterProducts`: Filter products based on specific criteria (e.g., category, price range, etc.). - `paginateProducts`: Retrieve paginated products based on specified page and limit values. ### Categories - `createCategory`: Create a new category. - `editCategory`: Update an existing category. - `deleteCategory`: Delete a category. - `getProductsByCategory`: Retrieve all products within a specific category. ### Admin-specific - `getInactiveProducts`: Retrieve all products that are not yet active. - `activateProduct`: Activate a product. - `deactivateProduct`: Deactivate a product. Note: Certain mutations and queries may require the user to be authenticated and have the appropriate role (e.g., admin) to access them. ## Examples ### Authentication **Register** ```graphql mutation { register(input: { name: "John Doe", email: "johndoe@example.com", password: "password123" }) { id name email created message } } ``` **Login** ```graphql mutation { login(input: { email: "johndoe@example.com", password: "password123" }) { accessToken message } } ``` ### Products **Get Products** ```graphql query { getProducts { id name price category { id name } } } ``` **Create Product** ```graphql mutation { createProduct(input: { name: "Product Name", price: 29.99, categoryId: "<category-id>" }) { id name price category { id name } } } ``` **Edit Product** ```graphql mutation { editProduct(input: { id: "<product-id>", name: "New Product Name", price: 39.99 }) { id name price category { id name } } } ``` **Delete Product** ```graphql mutation { deleteProduct(id: "<product-id>") } ``` **Search Product** ```graphql query { searchProduct(keyword: "keyword") { id name price category { id name } } } ``` **Filter Products** ```graphql query { filterProducts(categoryId: "<category-id>", minPrice: 10, maxPrice: 50) { id name price category { id name } } } ``` **Paginate Products** ```graphql query { paginateProducts(page: 1, limit: 10) { totalItems totalPages currentPage products { id name price category { id name } } } } ``` ### Categories **Create Category** ```graphql mutation { createCategory(name: "Category Name") { id name } } ``` **Edit Category** ```graphql mutation { editCategory(id: "<category-id>", name: "New Category Name") { id name } } ``` **Delete Category** ```graphql mutation { deleteCategory(id: "<category-id>") } ``` **Get Products by Category** ```graphql query { getProductsByCategory(categoryId: "<category-id>") { id name price category { id name } } } ``` ### Admin-specific **Get Inactive Products** ```graphql query { getInactiveProducts { id name price category { id name } } } ``` **Activate Product** ```graphql mutation { activateProduct(id: "<product-id>") { id name price category { id name } } } ``` **Deactivate Product** ```graphql mutation { deactivateProduct(id: "<product-id>") { id name price category { id name } } } ``` ## Authentication and Authorization User authentication is handled using JWT (JSON Web Tokens). When a user successfully logs in, an access token is generated and returned in the response. This access token should be included in the Authorization header for subsequent requests requiring authentication. The application implements role-based access control, differentiating between admin and normal users. Admins have additional privileges, such as viewing inactive products. Copyright 2023, Max Base
This project is an e-commerce application built with GraphQL and TypeScript using the NestJS framework. It provides various functionalities for managing products, categories, and user authentication. The project includes features such as user registration, login, authentication, logout, product management.
graphql,graphql-ts,javascript,js,nest,ts,ts-graphql,typescript,typescript-graphql
2023-06-05T16:14:35Z
2024-03-29T11:07:49Z
null
1
11
28
0
1
2
null
GPL-3.0
TypeScript
brianwereh/brianwereh.github.io
main
![portfolio1](https://github.com/brianwereh/brianwereh.github.io/assets/76516934/48f9a970-5c4f-4147-993b-675d693b172b)
This is a portfolio website having one page
css,html,javascript,portfolio,services,technology,website,youtuber
2023-05-25T15:53:49Z
2023-12-16T10:26:37Z
null
1
0
21
0
1
2
null
null
HTML
sashauly/pair-game-js
main
# pair-game-js ![Screenshot](./misc/screenshot.png) > Simple Pair Game in vanilla Javascript. > Live demo [_here_](https://sashauly.github.io/pair-game-js//). ## Table of Contents - [pair-game-js](#pair-game-js) - [Table of Contents](#table-of-contents) - [General Information](#general-information) - [Technologies Used](#technologies-used) - [Features](#features) - [Setup](#setup) - [Project status](#project-status) - [Contacts](#contacts) ## General Information - This is a game implemented in JavaScript. - Project developed in educational purposes to get familiar with DOM structures, arrow functions, arrays and objects in JavaScript. - HTML file contains only basic tags in `<head>` section. All the other stuff is in the `pair-game.js` file. - In CSS I mainly use `em` format for font-sizes, margin, etc. to get familiar with them either. - Tested in Chrome, Firefox and Safari browsers on desktop and mobile versions. ## Technologies Used - JavaScript ES6 - HTML5 ## Features Rules are simple: - Choose a number of cards in rows and columns, click 'Start Game'. - Then you have memorize as much pair of cards as you can, but be careful - you have a little time for that! - And then you have to pick a pair of cards with identical numbers. ### Good luck! ## Setup Just open [the live version](https://sashauly.github.io/pair-game-js//). For now this project served for presentation purposes ## Project status Project is: _complete_ ## Contacts Created by [@sashauly](https://t.me/sashauly) - feel free to contact me!
Simple Pair Game in vanilla Javascript
html5,javascript,pair-game
2023-06-06T09:17:29Z
2023-07-17T12:38:04Z
null
1
0
25
0
0
2
null
null
JavaScript
grit-coding/serverless-prune-path
main
# Serverless Prune Path [![Coverage Status](https://coveralls.io/repos/github/grit-coding/serverless-prune-path/badge.svg?branch=main)](https://coveralls.io/github/grit-coding/serverless-prune-path?branch=main) </br> This Serverless plugin allows you to optimize your AWS Lambda package before deployment by providing the ability to selectively prune your package. You can either specify paths to keep or paths to delete within the given directory. The plugin works by first unpacking the Lambda package, pruning paths according to your specification, and then repackaging. This gives you greater control over your deployment package, especially when you are using custom packages or other packaging plugins. This can be particularly useful when your project has dependencies or files that are not needed in the production environment, allowing you to reduce the size of your deployment package and ultimately the cold start time of your Lambda functions. </br> ## Prerequisites Before using the serverless-prune-path plugin, make sure you have an existing Serverless project set up and Serverless Framework installed. If you don't have the Serverless Framework installed, you can do so by running: ```bash npm install -g serverless ``` For more details on setting up a Serverless project and installing the Serverless Framework, please refer to the [Serverless Framework Getting Started Guide](https://www.serverless.com/framework/docs/tutorial). </br> ## How to Use ### Installation Install the plugin via npm: ```bash npm install --save-dev serverless-prune-path ``` </br> ### Configuration In your serverless.yml, add the plugin and configure your prunePath settings in the custom field: ```yaml plugins: - serverless-prune-path custom: prunePath: pathsToKeep: all: - 'path/to/keep/1' - 'path/to/keep/2' pathsToDelete: all: - 'path/to/delete/1' - 'path/to/delete/2' ``` The `pathsToKeep` and `pathsToDelete` configuration options accept an object with a special keyword `all`. When you use 'all' as a key, it means that the array of paths you specify will apply to every single function in your service. In this version, only the 'all' configuration is available for specifying the scope of pruning. That is, all the Lambda functions are targeted for pruning with the specified paths. Pruning individual functions is a feature planned for a future release. </br> ### Example ```yaml custom: prunePath: pathsToKeep: all: - 'node_modules' - 'handler.js' ``` In this example, 'node_modules' and 'handler.js' will be the only paths kept in every function's package. All other files and directories will be removed from the packages. </br> Likewise, if 'all' is used under `pathsToDelete`, the specified paths will be deleted from all function packages. ```yaml custom: prunePath: pathsToDelete: all: - 'node_modules/aws-sdk' ``` In this example, 'node_modules/aws-sdk' will be deleted from every function's package. Please note: Incorrect configuration may lead to the deletion of necessary files, causing your Lambda function to fail. </br> ### Prune Test If you want to check the result of prune path, run the below command and check the packed lambda. ```bash serverless package ``` If you are happy with the result, and want to deploy ```bash serverless deploy ``` </br> ## Future Work We're always working to improve Serverless Prune Path and have some exciting features planned for the next version: * Individual Function Pruning: We plan to introduce a feature to allow pruning paths for individual functions, giving you even greater control over your lambda packages. </br> ## README in Other Languages * [한국어](https://github.com/grit-coding/serverless-prune-path/blob/main/docs/README-ko.md)
This Serverless plugin allows you to optimize your AWS Lambda package before deployment by providing the ability to selectively prune your package.
github-actions,javascript,jest,nodejs,npm,serverless-framework
2023-05-26T18:29:17Z
2023-07-18T18:47:59Z
null
1
6
82
0
0
2
null
null
JavaScript
lawalsegun2025/udemy_course_recommendation_system
main
# Udemy Course Recomendation System ## Table of Content * [Demo](#demo) * [Overview](#overview) * [Motivation](#motivation) * [Problem Solving Steps](#problem-solving-steps) * [Source of Dataset](#source-of-dataset) * [Exploratory Data Analysis](#exploratory-data-analysis) * [Recommendation System](#recommendation-system) * [Future scope of project](#future-scope-of-project) ## Demo https://github.com/lawalsegun2025/udemy_course_recommendation_system/assets/94943377/a7decaed-11a9-4a44-a5c9-9960f0aa13ab ## Overview This project helps recommend similar courses on udemy for which the user is searching for. The user enters the name or phrase of a subject of interest and related courses will be recommended and displayed. There is also and analysis dashboard that gives all the analysis of the udemy courses available in the dataset. </br></br> <img src="img/udemy_courses.png"> ## Motivation ## Problem Solving Steps 1. Import the dataset 2. Peform Text Preprocessing 3. Perform Exploratory Data Analysis (EDA) an generate insights. 4. Convert text to numveric values and calculate the cosine similarity score. 5. After finding the similarity score, sort the values which have similar similarity score and recommend the course. 6. Integrate the Recommendation System with Flask Framework. 7. Deploy the web Application on a cloud platform ## Source of Dataset This dataset contains 3683 records of courses from 4 subjects (Business Finance, Graphic Design, Musical Instruments and Web Design) taken from Udemy. Udemy is a massive online open course (MOOC) platform that offers both free and paid courses. Anybody can create a course, a business model by which allowed Udemy to have hundreds of thousands of courses. This version modifies column names, removes empty columns and aggregates everything into a single csv file for ease of use. ## Exploratory Data Analysis For the exploratory data analysis, we explored the dataset by trying to answer the following question to have a better understanding of the data; ### Questions to Solve * **Course Title** - What is the most frequent words in course title? - Longest/Shortest course title? - How can we build recommendation systems via title using similarity? - Most famous courses by number of subscribers? * **Subjects/Categories** - What is the distribution of subjects? - How many courses per subject? - Distribution of subjects per year? - How many people purchase a particular subject? - Which subjects is the most popular? * **Published Year** - Number of courses per year? - Which year has the highest number of courses? - What is the trend of courses per year? * **Levels** - How many levels do we have? - What is the distribution of courses per level? - Which subject have the highest levels? - How many subscribers per level? - How many courses per level? * **Duration of Course** - Which courses have the highest duration (paid and free)? - Which courses have higher durations? - Duration vs number of subscribers? * **Subscribers** - Which course have the highest number of subscribers? - Average number of subscribers? - Number of subscribers per subject? - Number of subscribers per year? * **Price** - What is the average price of a course? - What is the minimum and maximum price? - How much does Udemy earn? - The most profitable courses? * **Correlation** - Does number of subscribers depend on; - Number of reviews? - Price? - Number of lectures? - Content duration? * **Question on Time** - Published Year - Number of courses per year? - Distribution of subjects per year? - Which year has the highest number of courses? - What is the trend of courses per year? ## Recommendation System **Algorithms** * Cosine Similarity * Linear Similarity **Workflow** * Import Dataset * Vectorize Dataset * Cosine Similarity Matrix * ID Score * Recommend For building the course recommendation system, we will be working with only the `course_title` column only. We start by cleaning the `course_title` using `neattext.functions` column as it is a text data. **`neattext`** is a simple Natural Language Processing package for cleaning text data and pre-processing text data. It can be used to clean sentences, extract emails, phone numbers, web links, and emojis from sentences. ## Future scope of project The data set for thid project included only 4 categories of courses (Business Finance, Graphic Design, Musical Instruments and Web Design). More catecories of courses could be added.
This project helps recommend similar courses on udemy for which the user is searching for
nlp,javascript,ml,recommendation
2023-06-05T10:20:35Z
2023-07-11T04:32:26Z
null
1
0
96
0
1
2
null
null
Jupyter Notebook
mnibor/recursos-programacion
main
# RECURSOS VARIOS En este repositorio, en un principio, fue pensado para ir recopilando muchos pasos de configuración que son comunes a nuestros proyectos de Django. Pero luego nos fuimos dando cuenta que no sólo podemos recopilar información relacionada a Django, entonces fuimos creando carpetas que agrupan la información por lenguaje. A medida que vayamos incorporando nuevos recursos, este archivo de recursos se va a ir actualizando. Los otros archivos que se encuentran aquí también son ayudas rápidas (les suelen llamar "chuletas") sobre comandos que necesitamos para ejecutar en nuestra consola. Además vamos a ir incorporando documentación básica de otros recursos, como ser Django REST Framework, JavaScript, Python y VUE Cli entre otros.
Repositorio dedicado a la recopilación de comandos o ayudas rápidas de los diferentes lenguajes que vamos aprendiendo a lo largo de nuestros videos publicados en el canal de YouTube
django,django-rest-framework,javascript,python,vue3
2023-05-19T13:44:22Z
2023-07-10T15:17:43Z
null
1
0
3
0
1
2
null
null
Python
Tonybsilva-dev/domain-driven-design
master
<center> <table> <tr> <td width="200"><img src="https://i.imgur.com/W2gg0sL.png" width="150" height="150"></td> <td> # Domain Driven Design 📝 Studies on DDD and Clean Architecture (Fórum API). - [x] Domain Driven Design - [x] Clean Architecture - [x] Automated Tests - [x] Factory - [ ] Functional Error Handling - [ ] CI/CD ## How to install? ``` git clone https://github.com/Tonybsilva-dev/domain-driven-design.git cd domain-driven-design npm install npm run test ``` > Follow me --> <https://www.linkedin.com/in/tony-silva/> </td> </tr> <table> </center>
Studies about DDD
automated-testing,clean-architecture,domain-driven-design,factory,javascript,typescript,vitest,husky,lint-staged,ci
2023-05-19T11:18:33Z
2023-06-17T23:14:24Z
null
1
9
45
0
0
2
null
null
TypeScript
thesixpathguy/anime-recommender-service
master
null
null
css,html,javascript,nginx-proxy,nodejs,pug
2023-06-08T15:43:05Z
2023-07-28T17:46:33Z
null
2
32
50
0
0
2
null
null
JavaScript
brundabharadwaj/hotel-booking-application-portal
main
# hotel-booking-application-portal A simple application to book hotel rooms
A simple application to book hotel rooms
reactjs,spring-boot,javascript,java,maven,spring,ant,material-icons,tailwindcss
2023-06-03T14:41:41Z
2023-08-16T17:12:50Z
null
3
16
37
11
1
2
null
MIT
TypeScript
SandeepKundalwal/Internet-Of-Things
master
# [EE536]: IoT Systems This repository contains all the programming assignments given in EE536 during the Spring Session of 2023 at IIT Mandi. Worked with Arduino Uno, NodeMCU, Raspberry Pi 3B+ & NodeRed.
[EE536: IoT] This repo contains all the assignment of EE536 offered at IIT Mandi by Dr. Padmanabhan Rajan & Dr. Siddhartha Sarma during Spring Session 2023.
arduino-ide,arduino-uno,bluetooth,cpp,i2c-bus,internet-of-things,javascript,linux,nodemcu,nodered
2023-06-06T08:42:03Z
2023-12-26T18:25:30Z
null
1
0
20
0
0
2
null
null
C++
Abdullah-coder2013/Quran
main
<p align="center"> <img src="/public/apple-touch-icon.png"/> </p> <h1 align="center">Quran Reading Website</h1> <p align="center"> <a href="https://read-quran.pages.dev"><img src="https://img.shields.io/badge/Go_to-Website-green"></a> <a href="https://github.com/quran/quran.com-api"><img src="https://img.shields.io/badge/Go_to-API-purple"></a> <a href="https://abdullah.abdulmunim.com"><img src="https://img.shields.io/badge/Go_to-My_Personal_Site-orange"></a><a href="https://app.deepsource.com/gh/Abdullah-coder2013/Quran/?ref=repository-badge"> <img src="https://app.deepsource.com/gh/Abdullah-coder2013/Quran.svg/?label=resolved+issues&show_trend=true&token=SyNYYd0As72tadjQDZPP-AMJ"/></a> <a href="https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates"><img src="https://camo.githubusercontent.com/7f4aec020ec1dccb8ae5c9479116a9a403ce460ee1674a4379dea2cbc11962ff/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446570656e6461626f742d656e61626c65642d626c75652e737667"/> </a> <a href="https://github.com/Abdullah-coder2013/Quran"><img src="https://img.shields.io/badge/Latest_Version-v3.2-red"></a> <a href="https://github.com/Abdullah-coder2013/Quran/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow"></a> </p> <img src="/public/images/image.png"> <!--<img src="/public/screenshots/1.png"> <img src="/public/screenshots/2.png"> <img src="/public/screenshots/3.png"> <img src="/public/screenshots/4.png">--!> ## Anouncements 📢 The active github pages **will not** be updated.<br/> The website has switched to cloudflare pages and will be updated insh'allah.<br/> <br/> Active website is available at: https://read-quran.pages.dev/<br/> ## Installation You cannnot really install this, but you can run it locally. Here are the steps to do so: First you should have `Node` and `npm` installed. You can go to [the Node website](https://nodejs.org) Then clone the repo: ```bash git clone https://github.com/Abdullah-coder2013/Quran.git ``` Go inside the cloned folder and run: ``` npm i react tailwindcss ``` Then run ```npm start``` ## About This website is made to help people read the Quran online and with caches, offline. Cache size is also really small of about 3.5 MB ## Dependencies - **Tailwind CSS** - **React** ## Features - Works fully offline after opening it during WiFi. - Feels like a book - Stores Bookmarks - Can use Indopak and Uthmani scripts ## Contribute If you cannot write code but still want to contribute, please star this repo! If you want to add a feature please make a pull request! Our Goal is to make this website as productive as possible. Please see the the [CODE OF CONDUCT](https://github.com/Abdullah-coder2013/Quran/blob/main/CODE_OF_CONDUCT.md)<br/> And also the [CONTRIBUTING GUIDELINES](https://github.com/Abdullah-coder2013/Quran/blob/main/CONTRIBUTING.md) ## Issues First, if you face an issue, see if there are already open issues that match your problem. If not, feel free to make an issue with coresponding tags and ## Thanks to everyone who has checked this app out and/or contributed!
This is a website that lets you read the Qur’an page by page
javascript,quran,react,reading,tailwindcss,website
2023-06-04T18:44:47Z
2024-01-12T15:17:22Z
2023-07-23T08:40:58Z
1
43
177
0
0
2
null
MIT
JavaScript
JL978/tiktok-notion-notes
master
# Chrome extension starter template A simple starter template based on the getting started tutorial on the [official doc](https://developer.chrome.com/docs/extensions/mv3/getstarted/) to get started in creating a Chrome exntension
A Chrome browser extension that allows you to take notes on tiktok videos and save it to a notion database
extension-chrome,javascript,notion,notion-api,tiktok
2023-05-28T02:14:00Z
2023-05-31T20:31:23Z
null
1
0
22
0
0
2
null
null
JavaScript
microsoftreact/MP3
main
null
Javascript MP3
css3,html5,javascript
2023-05-19T10:35:13Z
2023-05-19T10:35:36Z
null
1
0
1
0
0
2
null
null
HTML
asbhogal/Frontend-Mentor-URL-Shortening-Project
main
<div align="center"> <h1>URL Shortening Page - Pair Programming Project</h1> ![GitHub deployments](https://img.shields.io/github/deployments/asbhogal/Frontend-Mentor-URL-Shortening-Project/production?label=DEPLOYMENT%20STATE&style=for-the-badge&labelColor=000) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/asbhogal/Frontend-Mentor-URL-Shortening-Project?style=for-the-badge&labelColor=000) ![GitHub repo size](https://img.shields.io/github/repo-size/asbhogal/Frontend-Mentor-URL-Shortening-Project?color=blueviolet&style=for-the-badge&labelColor=000) </div> A single web page rendered from a series of mockups for the Frontend Mentor challenge which leverages the URL Shortening API to return a condensed version of a user-submitted website address, stores these in the browser's local storage and allows the user to copy these to their clipboard. Regex has also been used to check whether the URL entered is valid. This is a pair programming project between <a href="https://github.com/ofthewildfire" target="_blank">ofthewildfire</a> and <a href="https://github.com/asbhogal" target="_blank">asbhogal</a>, built using HTML5, CSS3, SCSS and JavaScript. <strong>:heavy_check_mark: Features:</strong><br> - Designs representative of mockups - Uses async-await functionality to call API - Leverages Clipboard API - Regex for user-inputted URL validation - Fully responsive - Optimised for the web - Locally hosted fonts <strong>:nerd_face: Stacks &#38; Tools Used:</strong><br> <br> <a target="_blank" rel="noopener noreferrer" href="https://github.com/devicons/devicon/blob/master/icons/html5/html5-original.svg"><img src="https://github.com/devicons/devicon/raw/master/icons/html5/html5-original.svg" alt="html5 logo" width="50" height="50" style="max-width:100%;"></a> <a target="_blank" rel="noopener noreferrer" href="https://github.com/devicons/devicon/blob/master/icons/css3/css3-original.svg"><img src="https://github.com/devicons/devicon/raw/master/icons/css3/css3-original.svg" alt="css3 logo" width="50" height="50" style="max-width:100%;"></a> <a target="_blank" rel="noopener noreferrer" href="https://github.com/devicons/devicon/blob/master/icons/sass/sass-original.svg"><img src="https://github.com/devicons/devicon/blob/master/icons/sass/sass-original.svg" alt="sass logo" width="50" height="50" style="max-width:100%;"></a> <a target="_blank" rel="noopener noreferrer" href="https://github.com/devicons/devicon/blob/master/icons/javascript/javascript-original.svg"><img src="https://github.com/devicons/devicon/raw/master/icons/javascript/javascript-original.svg" alt="JavaScript" width="50" height="50" style="max-width:100%;"></a> <a target="_blank" rel="noopener noreferrer" href="https://github.com/vitejs/vite/blob/main/docs/public/logo.svg"><img src="https://github.com/vitejs/vite/blob/main/docs/public/logo.svg" alt="Vite logo" width="50" height="50" style="max-width:100%;"></a> <strong>Links :link:</strong><br> - <a target="_blank" href="https://frontend-mentor-url-shortening-project.vercel.app/">URL Shortening Page</a> - <a target="_blank" href="https://www.frontendmentor.io/challenges/url-shortening-api-landing-page-2ce3ob-G">Frontend Mentor Challenge</a>
A pair programming project which leverages the URL Shortening API and stores condensed URLs using Local Storage.
api,api-rest,css3,front-end-development,frontend-mentor,html5,javascript,js,pair-programming,rest-api
2023-06-01T21:16:05Z
2023-11-29T20:53:58Z
null
2
2
156
0
1
2
null
null
SCSS
suyash-thakur/sql-csv
main
# sql-csv `sql-csv` is a simple library that allows you to run SQL queries on CSV files. ## Table of Contents - [Installation](#installation) - [Usage](#usage) - [Supported SQL Syntax](#supported-sql-syntax) - [Examples](#examples) - [Benchmark Results](#benchmark-results) ## Installation You can install `sql-csv` using npm: `npm install sql-csv` ## Usage To use `sql-csv`, you first need to create a new instance of the `CsvSql` class: ```javascript const CsvSql = require('sql-csv'); const csvSql = new CsvSql('path/to/csv/file.csv'); ``` You can also pass url to a CSV file: ```javascript const csvSql = new CsvSql('https://example.com/file.csv'); ``` You can then run SQL queries on the CSV data using the query method: ```javascript const result = await csvSql.query('SELECT * FROM file WHERE column1 = "value"'); ``` - The table name in the query must match the name of the CSV file. - The column names in the query must match the column names in the CSV file. - The values in the query must be enclosed in double quotes. - The query must end with a semicolon. - The result will be an array of objects, where each object represents a row in the CSV file. ## Supported SQL Syntax `sql-csv` supports a subset of the SQL syntax. The following SQL statements are supported: - `SELECT` - `FROM` - `WHERE` - `AND` - `OR` - `ORDER BY` - `GROUP BY` - `HAVING` - `LIMIT` - `OFFSET` The following operators are supported: - `=` - `!=` - `>` - `<` - `>=` - `<=` The following functions are supported: - `COUNT` - `MIN` - `MAX` - `AVG` - `SUM` - `DISTINCT` ## Examples ```javascript const result = csvSql.query('SELECT * FROM data'); ``` ```javascript const result = csvSql.query('SELECT column1, column2 FROM data'); ``` # Benchmark Results ### Query 1: SELECT * FROM data | Rows | Time (ms) | | ------- | --------- | | 1000 | 19.9 | | 10000 | 54.7 | | 100000 | 63.5376 | | 1000000 | 4528.325 | ### Query 2: SELECT * FROM data WHERE column1 = "value" | Rows | Time (ms) | | ------- | --------- | | 1000 | 8.53 | | 10000 | 43.8 | | 100000 | 52.5 | | 1000000 | 2330.46 |
Javascript package that allows you run SQL queries on CSV.
csv,csv-parser,javascript,nodejs,sql
2023-06-01T21:37:23Z
2023-07-26T18:42:59Z
null
1
0
37
0
0
2
null
MIT
JavaScript
slydragonn/minimalist-portfolio
main
# Minimalist Portfolio Single page portfolio made with [Astro](https://astro.build/) ![Minimalist Portfolio](/images/web.png) ## Demo View a live demo: [slydragonn.velcel.app](https://slydragonn.vercel.app) ## Clone: ``` git clone https://github.com/slydragonn/minimalist-portfolio.git ``` ## Install: ``` npm install ``` ## Run: ``` npm run dev ``` ## Project Struture ``` ├── src/ │ ├── components/ │ │ ├── Button.astro │ │ ├── Footer.astro │ │ ├── Navbar.astro │ │ ├── ProjectCard.astro │ │ ├── SkillCard.astro │ │ └── Title.astro │ ├── pages/ │ │ └── index.astro ├── public/ │ ├── favicon.svg │ ├── design.svg │ ├── dragon.png │ ├── email.svg │ ├── external-link.svg │ ├── python.svg │ └── server.svg ├── astro.config.mjs ├── package.json ├── .gitignore ├── README.md └── tsconfig.json ``` ## Components **Button:** ``` <Button message='Latest Posts' icon='/external-link.svg' link='https://dev.to/slydragonn' /> ``` **Title:** ``` <Title text='Skilss & Technologies' /> ``` **SkillCard:** ``` <SkillCard title='Frontend Development' description='Developing websites with JavaScript and the best Frameworks like React, Vue, and Astro' icon='/design.svg' /> ``` **ProjectCard:** ``` <ProjectCard title='Markdown Web Editor' description='Simple and Minimalist Markdown Web Editor' link='https://markwriter.tech' /> ``` ## Deploy You can deploy this site on your favorite static hosting service such as Vercel, Netlify, GitHub Pages, etc.
Minimalist Portfolio made with Astro
astro,javascript,minimalist,portfolio,portfolio-website
2023-05-24T00:52:11Z
2023-07-28T01:01:56Z
null
2
0
5
0
2
2
null
null
Astro
akash-rajak/JavaScript-Usage
main
# ✔ JavaScript Usage - Curated use of JavaScript Libraries, Frameworks, and Technologies. <p align = "center"> <img src = "https://img.shields.io/github/stars/akash-rajak/JavaScript-Usage?style=social", alt = "GitHub Repo stars"> <img src = "https://img.shields.io/github/forks/akash-rajak/JavaScript-Usage?style=social", alt = "GitHub Repo forks"> <img src = "https://img.shields.io/github/watchers/akash-rajak/JavaScript-Usage?style=social", alt = "GitHub Repo watchers"> <img src = "https://img.shields.io/github/contributors/akash-rajak/JavaScript-Usage?style=social", alt = "GitHub contributors"> </p> <p align = "center"> <img src = "https://img.shields.io/github/languages/count/akash-rajak/JavaScript-Usage?style=social", alt = "GitHub language count"> <img src = "https://img.shields.io/github/languages/top/akash-rajak/JavaScript-Usage?style=social", alt = "GitHub top language"> <img src = "https://img.shields.io/github/directory-file-count/akash-rajak/JavaScript-Usage?style=social", alt = "GitHub repo file count"> <img src = "https://img.shields.io/github/repo-size/akash-rajak/JavaScript-Usage?style=social", alt = "GitHub repo size"> </p> <p align = "center"> <img src = "https://img.shields.io/github/issues/akash-rajak/JavaScript-Usage", alt = "GitHub issues"> <img src = "https://img.shields.io/github/issues-closed/akash-rajak/JavaScript-Usage", alt = "GitHub closed issues"> <img src = "https://img.shields.io/github/issues-pr/akash-rajak/JavaScript-Usage", alt = "GitHub pull requests"> <img src = "https://img.shields.io/github/issues-pr-closed/akash-rajak/JavaScript-Usage", alt = "GitHub closed pull requests"> </p> <p align = "center"> <img src = "https://img.shields.io/github/commit-activity/t/akash-rajak/JavaScript-Usage", alt = "GitHub commit activity"> <img src = "https://img.shields.io/github/commit-activity/y/akash-rajak/JavaScript-Usage", alt = "GitHub commit activity/year"> <img src = "https://img.shields.io/github/commit-activity/m/akash-rajak/JavaScript-Usage", alt = "GitHub commit activity/month"> <img src = "https://img.shields.io/github/commit-activity/w/akash-rajak/JavaScript-Usage", alt = "GitHub commit activity/week"> <img src = "https://img.shields.io/github/last-commit/akash-rajak/JavaScript-Usage", alt = "GitHub last commit"> <img src = "https://img.shields.io/github/discussions/akash-rajak/JavaScript-Usage", alt = "GitHub Discussions"> </p> <p align = "center"> <img src = "https://img.shields.io/github/license/akash-rajak/JavaScript-Usage", alt = "Github"> </p> **** ### 📌Usage Points: - To run the HTML file `index.html` ``` start index.html ``` - To run the Javascript file `script.js` ``` node script.js ``` - To run the Typescript file `type.ts` and compile it to equivalent `type.js` file ``` tsc type.ts ``` **** ### 📌IMP Points: - **** ### 🌟Stargazers Over Time: [![Stargazers over time](https://starchart.cc/akash-rajak/JavaScript-Usage.svg)](https://starchart.cc/akash-rajak/JavaScript-Usage) **** ### 📌Contributors: <a href="https://github.com/akash-rajak/JavaScript-Usage/graphs/contributors"> <img src="https://contrib.rocks/image?repo=akash-rajak/JavaScript-Usage" /> </a>
Curated use of JavaScript Libraries, Frameworks, and Technologies.
javascript,javascript-framework,javascript-library,javascript-technology,angularjs,collectjs,d3,es6,jquery,lodash
2023-06-05T05:58:38Z
2023-06-10T05:23:46Z
null
1
0
53
0
0
2
null
null
HTML
universal-org/ueats-web
main
## Ueats is an online food ordering and delivery platform .<br/> ## Since rise of unhealthy food is increasing , a portion of the world is dying before the average age of human life. ## Ueats is a open source software that shows you currently what you are consuming , keeps the track of what you have consumed , prevents you from eating over unhealthy food. ## Our algorithm is based on scientific research studies . ## Also by using ueats you are not destroying the planet because our official suppliers don't use plastic to ship food items, however as Ueats is decentralized . It is recommended for you to check your own supplier . # ✒️ Contribute<br/> ## Contributions are always welcome, if you want any features, performance improvements please open an issue or make a folk and give a PR. # 💧Donate<br/> ### Donations can be made at <br/> ### https://liberapay.com/kamlendras<br/> ### https://buymeacoffee.com/kamlendras<br/> ### https://patreon.com/kamlendras<br/>
A glossly online food service and food delivery platform for the web, Made to keep track of your health.
elasticsearch,mongodb,reactjs,redux,scss,typescript,javascript,nextjs,mui,framermotion
2023-05-18T20:57:19Z
2024-04-30T14:08:07Z
null
1
1
26
0
2
2
null
AGPL-3.0
JavaScript
Turing158/starfall-springboot-web
master
_________ __ ___________ .__ .__ / _____// |______ ______\_ _____/____ | | | | \_____ \\ __\__ \\_ __ \ __) \__ \ | | | | / \| | / __ \| | \/ \ / __ \| |_| |__ /_______ /|__| (____ /__| \___ / (____ /____/____/ \/ \/ \/ \/
SpringBoot 启动!通过Springboot框架构建的论坛,数据库操作采用JPA
java,css,html,javascript,spring,spring-boot,springboot,vue,maven
2023-06-01T15:53:31Z
2024-05-14T17:22:58Z
2023-09-23T15:01:59Z
2
0
152
0
0
2
null
MIT
HTML
Choaib-ELMADI/next-fb-clone
main
null
A Facebook clone built with nextjs and firebase...
application,clone,javascript,nextjs,react,web
2023-05-18T20:55:05Z
2023-05-18T20:54:09Z
null
1
0
29
0
0
2
null
null
JavaScript
junaid10144/VacationVibe
main
# VacationVibe: Vacation Rental Booking App VacationVibe is a Full Stack Booking App that enables users to book vacation rentals, providing a seamless experience for reserving accommodations. The app allows users to create listings for their own properties, giving property owners the opportunity to showcase their rentals to potential guests. With VacationVibe, users can easily search for available properties, view property details, make bookings, and manage their reservations. **To experience VacationVibe firsthand, please visit our website for a live demo:** [![Start Your Vacation Adventure](https://cdn.pixabay.com/photo/2023/04/22/04/40/live-streaming-7943006_960_720.png)](https://vacation-vibe.vercel.app/) [**Visit Website for Live Demo**](https://vacation-vibe.vercel.app/) ## Key Features - **Booking System:** Users can easily search for available properties and make bookings. - **Listing Creation:** Property owners can create and manage their listings. - **Dashboard:** Property owners have access to a dashboard where they can manage their listings and view booking requests. - **User Accounts:** Users can create accounts to save their favorite properties and manage their bookings. ## Technology Stack The application was developed using the following technologies: - **MongoDB:** A NoSQL database used to store property and user data. - **Express.js:** A server-side framework for building RESTful APIs and handling server-side logic. - **React:** A JavaScript library for building user interfaces. - **Tailwind CSS:** A utility-first CSS framework used for styling the frontend. - **Node.js:** A JavaScript runtime environment used to run the server-side code. - **Vercel:** A cloud platform for static site hosting and deployment, used to deploy the frontend of the application. - **AWS S3:** Amazon Simple Storage Service (S3) for file storage, allowing users to upload and retrieve property images. It enables secure and scalable file storage, ensuring a reliable and efficient system for handling property images. ## Getting Started To run the VacationVibe app locally, follow these steps: 1. Clone the repository: `git clone https://github.com/junaidsaleem10144/VacationVibe.git` 2. Navigate to the project directory: `cd VacationVibe` 3. Install the dependencies: - Backend: Navigate to the `api` folder and run `npm install` - Frontend: Navigate to the `client` folder and run `npm install` 4. Create a `.env` file in the `api` folder and provide the necessary environment variables. You can refer to the `.env.example` file for the required variables. 5. Start the development servers: - Backend: In the `api` folder, run `npm run dev` - Frontend: In the `client` folder, run `npm run start` Now, you can access the VacationVibe app by opening your browser and visiting `http://localhost:4000`. ## Folder Structure The project follows a specific folder structure: - `api/`: Contains the backend code, including server setup, routes, and models. - `client/`: Contains the frontend code, including React components, styles, and assets. ## Acknowledgements We would like to express our gratitude to the following resources and libraries that have been instrumental in the development of VacationVibe: ### Backend - [bcryptjs](https://www.npmjs.com/package/bcryptjs): Library for hashing and comparing passwords. - [cookie-parser](https://www.npmjs.com/package/cookie-parser): Middleware for parsing cookies in Express. - [cors](https://www.npmjs.com/package/cors): Middleware for enabling Cross-Origin Resource Sharing (CORS). - [dotenv](https://www.npmjs.com/package/dotenv): Module for loading environment variables from a .env file. - [jsonwebtoken](https://www.npmjs.com/package/jsonwebtoken): Library for generating and verifying JSON Web Tokens (JWT). - [mongoose](https://mongoosejs.com/): Object Data Modeling (ODM) library for MongoDB. - [multer](https://www.npmjs.com/package/multer): Middleware for handling file uploads in Express. - [@aws-sdk/client-s3](https://aws.amazon.com/sdk-for-javascript/): A client library for interacting with Amazon S3 for storing files. - [image-downloader](https://www.npmjs.com/package/image-downloader): Library for downloading images from URLs. - [mime-types](https://www.npmjs.com/package/mime-types): Library for working with MIME types. - [express](https://expressjs.com/): Web framework for Node.js. **Development dependencies (Backend):** - [nodemon](https://nodemon.io/): Utility that automatically restarts the Node.js server when file changes are detected. ### Frontend - [axios](https://axios-http.com/): Library for making HTTP requests. - [date-fns](https://date-fns.org/): Library for manipulating and formatting dates. - [react-router-dom](https://reactrouter.com/): Library for handling routing in React applications. - [react](https://reactjs.org/): JavaScript library for building user interfaces. - [react-dom](https://reactjs.org/docs/react-dom.html): Package for rendering React components. **Development dependencies (Frontend):** - [@types/react](https://www.npmjs.com/package/@types/react): Type definitions for React. - [@types/react-dom](https://www.npmjs.com/package/@types/react-dom): Type definitions for React DOM. - [@vitejs/plugin-react](https://www.npmjs.com/package/@vitejs/plugin-react): Vite plugin for React support. - [autoprefixer](https://www.npmjs.com/package/autoprefixer): PostCSS plugin for adding vendor prefixes to CSS. - [postcss](https://www.npmjs.com/package/postcss): CSS post-processor tool. - [tailwindcss](https://tailwindcss.com/): Utility-first CSS framework. - [vite](https://vitejs.dev/): Build tool for modern web development. Thank you for choosing VacationVibe! If you have any questions or feedback, please feel free to reach out. ## Contributing Contributions to the VacationVibe app are welcome! If you find any issues or want to add new features, please feel free to open a pull request. ## License This project is licensed under the [MIT License](LICENSE).
VacationVibe - Full Stack Booking App
aws-s3,backend,booking-app,express,frontend,full-stack-application,javascript,mongodb,nodejs,react
2023-05-20T02:44:30Z
2023-05-21T10:24:20Z
null
1
0
22
0
2
2
null
MIT
JavaScript
firtysh/codenames
main
# Codenames [![wakatime](https://wakatime.com/badge/github/firtysh/codenames.svg)](https://wakatime.com/badge/github/firtysh/codenames) Codenames is a mobile application built with React Native CLI that brings the popular board game "Codenames" to your smartphone. Enjoy the game with your friends and family anytime, anywhere. ## Features - Create and join game rooms to play with friends. - Two roles: Spymaster and Operative, with different permissions and responsibilities. - Real-time communication between team members within the game room. - Generate random word grids for each game. - Score tracking and game progress indicators. - Timer for turn-based gameplay. ## Installation 1. Clone the repository: ```shell git clone https://github.com/firtysh/codenames.git ``` 2. Navigate to the project directory: ```shell cd codenames ``` 3. Install the dependencies: ```shell npm install ``` 4. Run the Metro bundler: ```shell npm start ``` 5. For Android, open a new terminal window and run the following command: ```shell npm run android ``` If the above command doesn't work, you can try the following alternative: ```shell npm start -- --reset-cache ``` Then open a new terminal window and run: ```shell npx react-native run-android ``` For iOS, open a new terminal window and run: ```shell npx react-native run-ios ``` Please ensure you have the necessary development environment and tools set up for React Native and Android/iOS development. Refer to the official documentation of React Native and the respective platforms for more detailed setup instructions if needed. ## Usage 1. Follow the installation instructions above to set up the project. 2. Once the app is running on your device or emulator, follow the on-screen instructions to create or join a game room. ## Technologies Used - React Native - React Navigation (for navigation between screens) - Socket.io (for real-time communication) ## Contributing Contributions to Codenames are welcome! If you find any bugs or have suggestions for new features, please open an issue or submit a pull request. Make sure to follow the project's code style and guidelines. ## License Codenames is open source and released under the [MIT License](https://opensource.org/licenses/MIT). Feel free to use, modify, and distribute the code as per the terms of the license. ## Acknowledgements - The Codenames project is inspired by the board game "Codenames" designed by Vlaada Chvátil. - Thanks to the React Native community and various open source libraries that have made this project possible.
This is a android version of a web game codenames.game
android,android-game,codenames,game,javascript,open-source,react-native,redux,socket-io,typescript
2023-05-17T18:08:43Z
2023-08-13T18:35:12Z
null
1
0
21
0
0
2
null
null
TypeScript
lack21/Notifications-Page
main
# Notifications-Page Tools Used : • HTML • SASS • JavaScript ![desktop-preview](https://github.com/lack21/Notifications-Page/assets/100687592/58e2968a-22e5-481c-9aba-d1f11327405f) Link : https://lack21.github.io/Notifications-Page/
Design Project
css,html,javascript,scss
2023-05-17T13:20:07Z
2023-05-17T13:26:04Z
null
1
0
2
0
0
2
null
null
SCSS
Gnaneshwar5a7/Assignment-Management-App
master
null
This is an Node Web application for managing and monitoring the assignments of a college or class. It is developed using Node.js , Express.js and mongoDB database.
css,expressjs,javascript,mongoose,nodejs,pug
2023-06-02T11:52:05Z
2023-06-12T07:49:04Z
null
1
0
28
0
1
2
null
null
Pug
ZeroNiki/ToDo-Django
main
# To-Do web app [![Watch the video](https://img.youtube.com/vi/f8KZJjuLEwI/maxresdefault.jpg)](https://youtu.be/f8KZJjuLEwI) Written on: * python 3 * Django * HTML * CSS * Boostrap ________________________ <p style="color: red;">! Be careful when redacting the .env file</p> # Starting via terminal (GNU/Linux) First, let's create a virtual environment in python via the terminal: ``` python3 -m venv venv ``` then run the virtual environment: ``` source venv/bin/activate ``` running the virtual environment download the dependencies: ``` pip install -r requirements.txt ``` <h2>Running:</h2> Go to the todoapp directory and run the file manage.py: ``` python3 manage.py runserver ``` click on link (default): http://127.0.0.1:8000/
null
django-todo,django-todoapp,linux,python,python3,boostrap,css,html5,javascript,semanticui
2023-06-02T12:34:17Z
2023-06-09T06:48:08Z
null
1
0
6
0
0
2
null
null
JavaScript
zap0812/zap0812.github.io
main
null
null
dos,dos-attack,html,html-javascript,javascript
2023-06-07T12:10:40Z
2023-06-14T05:38:20Z
null
1
0
41
0
0
2
null
null
HTML
PatPinello/WebScraperOverwatch2
main
# WebScraperOverwatch2 This project utilizes the following: - PHP Apache Web Server with a MySQL database. - A PHP Web Scraper - HTML, CSS, and JS to display data - Developed in Docker Overwatch 2 is a multiplayer online game. It's website holds all the statistics for each player, but there's no easy way to compare them. The user is given a web page that asks for the url of up to 5 people's Overwatch 2 accounts. Once these are added, an attribute is selected. In other words, the players stats for that attribute will be displayed. overwatch.php scrapes data from the given urls, calling functions to read and write to the database. When the user hits submit, the data is pulled from the database through PHP and passed to Javascript. This is done using cookies and variables. The data is then displayed in a chart. For now, bar charts are the only type available. In the future there will be a timeline option. The project is currently running on my localhost. For now, I'll include images. HTML, CSS, and Js are used to display a simple webpage prompting the user for the urls of the users they'd like to compare. Additionally, they must choose 1 attribute to compare the players against. These are saved as cookies both because it makes it easy to interface with PHP, but also to save the user time. ![image](https://github.com/PatPinello/WebScraperOverwatch2/assets/68654707/8114bafa-b8c7-4ef7-afa6-7fcd027a06e7) When these are submitted, the page is reloaded and the chart is displayed. Below is an example with 4 players comparing their "Most in Game Eliminations" ![image](https://github.com/PatPinello/WebScraperOverwatch2/assets/68654707/967a3d59-7225-4488-aea3-deb082a3923b) overwatch.php takes the urls, follows them, and scrapes the users data. overwatch.php scrapes the website below: ![image](https://github.com/PatPinello/WebScraperOverwatch2/assets/68654707/a5cc37ad-a5c3-4e6d-a6ae-638817539154) The data is then formatted for SQL. PHP picks up this data and checks if the user exists, if the user data with that date exists, etc. It's then sent to the SQL database. When the data needs to be read PHP creates Javascript variables to make the data avaiable on the frontend. MySQL Database created through PHP using an image of an Apache Web Server: ![chart](https://github.com/PatPinello/WebScraperOverwatch2/assets/68654707/7e0304e6-fd07-44b5-b4ec-1f87e9de54dc) Example of SQL database entry: ![image](https://github.com/PatPinello/WebScraperOverwatch2/assets/68654707/471ca35d-e6c5-4183-b389-0a1f8d22135b) Next Steps: I would like to add the abiity to select a time frame and view the data over a period of time. The date values are already written in so this is as simple as PHP query SQL for the values ordered by date and saving them as a Javscript object. Introduce a cleaner MVC architecture.
Web Scraper, Database, and Data Visualizer - for Overwatch 2
php,javascript,python,sql,webscraping
2023-05-31T06:10:30Z
2023-07-18T13:29:48Z
null
1
0
27
0
0
2
null
null
PHP
salteadorneo/infojobs-hackathon
main
# InfoJobs Hackathon 2023 @midudev Geolocalización de ofertas de empleo presenciales de InfoJobs con mapa interactivo. Desarrollado con API de InfoJobs (https://developer.infojobs.net/) y Geoapify (https://www.geoapify.com/). Siguiendo la línea de estilo y cuidando el [rendimiento](#informe-lighthouse). https://infojobs-map.vercel.app ![Captura web mapa ofertas de trabajo InfoJobs](https://github.com/salteadorneo/infojobs-hackathon/assets/4882454/60065961-e7d2-4149-9488-7ae561c2167e) ## Informe Lighthouse ![image](https://github.com/salteadorneo/infojobs-hackathon/assets/4882454/1aa733c5-502e-4a9e-9584-622b2d88c6c3)
InfoJobs Hackathon 2023 @midudev
hackathon,javascript,midudev,react
2023-05-22T22:03:01Z
2023-06-26T23:01:04Z
null
1
0
35
0
1
2
null
null
JavaScript
Braa-GH/MEVN-news-scrapper
main
# MEVN-news-scrapper this is a Node.js scrapping project on a news website (Arabic), Vue.js 3 used as a front-end ### Video of testing front-end API to back-end: https://drive.google.com/file/d/11Bg3m_9FozQtTdkyURuKz1m73E5pWEbZ/view ### dont forget to install packages from package.json #### change to Server dir: ``` cd Server ``` ##### server setup ``` npm install ``` ##### server run: ``` npm start ``` #### change to Client dir: ``` cd Client ``` ##### client set up: ``` npm install ``` ##### client run: ``` npm run serve ```
this is a Node.js scrapping project on a news website (Arabic), Vue.js 3 used as a front-end
express,javascript,mevn-stack,mongodb,nodejs,scraping,scraping-websites,vue3
2023-05-23T10:15:07Z
2023-09-14T14:38:12Z
null
1
0
7
0
0
2
null
null
Vue
punitsharma10/bigbasket
main
<u>Big Basket Clone Project➡️</u> This is a clone of the Big Basket e-commerce website, built using HTML,CSS and JavaScript.Big basket is a large online grocer headquartered in Bangalore,India, and currently owned by Tata Group.Its registered company name is Supermarket Grocery Supplies Pvt. Collaborators:- Punit Kumar Sharma Vamsi Shetty Akash Desai Saif Khan Tech Stack➡️ HTML CSS Javascript - (DOM Manipulation, Local Storage) Bootstrap Git github Features➡️ The following features have been implemented in the project: Home Page:- Nav Bar,Footer Sign-In:- User authentication to check whether user email and password match with details existing in the database. User authentication (login) Responsiveness for different screen sizes Browse products by category Sorting products for reccomended, What's new, popularity, Price high to low and low to High Filter products in pages based on brand, colour, Price, and discount Add products to cart,a empty button to empty cart,then checkout to Address and payment page with fully validation,then payment processing. Deployed on(netlify)➡️ https://647e005fed84ff2236edc1b9--fastidious-buttercream-e1aa8d.netlify.app/
This is a clone of the Big Basket e-commerce website, built using HTML,CSS and JavaScript.Big basket is a large online grocer headquartered in Bangalore,India, and currently owned by Tata Group.Its registered company name is Supermarket Grocery Supplies Pvt.
css,html,javascript,project
2023-05-21T14:33:33Z
2023-08-14T10:39:18Z
null
5
8
37
0
0
2
null
null
HTML
microsoftreact/universal-magazine
main
null
universal shop
css3,html5,javascript
2023-05-19T10:04:56Z
2023-05-19T10:04:26Z
null
1
0
1
0
0
2
null
null
CSS
microsoftreact/design-todoList
main
null
Design TodoList Javascript
css3,html5,javascript
2023-05-19T11:01:52Z
2023-05-19T11:02:20Z
null
1
0
1
0
0
2
null
null
CSS
microsoftreact/Hospital-tailwind-css
main
# Hospitol ‣潈灳瑩汯�
Hospital tailwind css
css3,html5,javascript,tailwindcss
2023-05-19T09:26:37Z
2023-05-19T09:26:58Z
null
1
0
1
0
0
2
null
null
HTML
Sitch196/JobSeeker
master
# WorkUp - Fullstack Job Seeking Application WorkUp is a fullstack job seeking application built using the MERN stack. It utilizes React, Node.js, Express, MongoDB, and Mongoose to provide a comprehensive solution for job seekers. ## Features - User-friendly interface for easy navigation and interaction. - User authentication and authorization to ensure secure access to the application. - Job search functionality with the ability to filter and sort results. - User profiles for creating and managing personal information, including work experience and education. - Job application tracking to keep track of submitted applications and their statuses. ## Technologies Used - **React**: A powerful JavaScript library for building user interfaces, enabling dynamic and responsive front-end development. - **Node.js**: A runtime environment that allows the execution of JavaScript code on the server side, providing a scalable and efficient back-end solution. - **Express**: A flexible web application framework for Node.js, used to develop the server-side components of the application. - **MongoDB**: A NoSQL document-oriented database that stores data in flexible, JSON-like documents, providing scalability and flexibility. - **Mongoose**: An object data modeling (ODM) library for Node.js and MongoDB, simplifying data validation and interaction with the database. ## Contributing Contributions are welcome! If you'd like to contribute to WorkUp, please follow these steps: 1. Fork the repository. 2. Create a new branch for your feature or bug fix. 3. Make your changes and commit them with descriptive messages. 4. Push your changes to your forked repository. 5. Submit a pull request, explaining the changes you've made. ## License The WorkUp application is released under the [MIT License](LICENSE). Feel free to explore and use the WorkUp application as a starting point for your own job seeking projects! **Disclaimer: This application is for demonstration purposes only and does not guarantee actual job placement or application success.**
Workup ✨ The Most Reliable JobSeeking Platform
css,expressjs,html,javascript,mongodb,mongoose,nodejs,react
2023-06-03T11:16:04Z
2024-01-05T15:19:25Z
null
1
0
18
0
0
2
null
null
JavaScript
MargoMarm/goit-react-hw-03-image-finder
main
# React homework template Этот проект был создан при помощи [Create React App](https://github.com/facebook/create-react-app). Для знакомства и настройки дополнительных возможностей [обратись к документации](https://facebook.github.io/create-react-app/docs/getting-started). ## Создание репозитория по шаблону Используй этот репозиторий организации GoIT как шаблон для создания репозитория своего проекта. Для этого нажми на кнопку `«Use this template»` и выбери опцию `«Create a new repository»`, как показано на изображении. ![Creating repo from a template step 1](./assets/template-step-1.png) На следующем шаге откроется страница создания нового репозитория. Заполни поле его имени, убедись что репозиторий публичный, после чего нажми кнопку `«Create repository from template»`. ![Creating repo from a template step 2](./assets/template-step-2.png) После того как репозиторий будет создан, необходимо перейти в настройки созданного репозитория на вкладку `Settings` > `Actions` > `General` как показано на изображении. ![Settings GitHub Actions permissions step 1](./assets/gh-actions-perm-1.png) Проскролив страницу до самого конца, в секции `«Workflow permissions»` выбери опцию `«Read and write permissions»` и поставь галочку в чекбоксе. Это необходимо для автоматизации процесса деплоя проекта. ![Settings GitHub Actions permissions step 2](./assets/gh-actions-perm-2.png) Теперь у тебя есть личный репозиторий проекта, со структурой файлов и папок репозитория-шаблона. Далее работай с ним как с любым другим личным репозиторием, клонируй его себе на компьютер, пиши код, делай коммиты и отправляй их на GitHub. ## Подготовка к работе 1. Убедись что на компьютере установлена LTS-версия Node.js. [Скачай и установи](https://nodejs.org/en/) её если необходимо. 2. Установи базовые зависимости проекта командой `npm install`. 3. Запусти режим разработки, выполнив команду `npm start`. 4. Перейди в браузере по адресу [http://localhost:3000](http://localhost:3000). Эта страница будет автоматически перезагружаться после сохранения изменений в файлах проекта. ## Деплой Продакшн версия проекта будет автоматически проходить линтинг, собираться и деплоиться на GitHub Pages, в ветку `gh-pages`, каждый раз когда обновляется ветка `main`. Например, после прямого пуша или принятого пул-реквеста. Для этого необходимо в файле `package.json` отредактировать поле `homepage`, заменив `your_username` и `your_repo_name` на свои, и отправить изменения на GitHub. ```json "homepage": "https://your_username.github.io/your_repo_name/" ``` Далее необходимо зайти в настройки GitHub-репозитория (`Settings` > `Pages`) и выставить раздачу продакшн версии файлов из папки `/root` ветки `gh-pages`, если это небыло сделано автоматически. ![GitHub Pages settings](./assets/repo-settings.png) ### Статус деплоя Статус деплоя крайнего коммита отображается иконкой возле его идентификатора. - **Желтый цвет** - выполняется сборка и деплой проекта. - **Зеленый цвет** - деплой завершился успешно. - **Красный цвет** - во время линтинга, сборки или деплоя произошла ошибка. Более детальную информацию о статусе можно посмотреть кликнув по иконке, и в выпадающем окне перейти по ссылке `Details`. ![Deployment status](./assets/deploy-status.png) ### Живая страница Через какое-то время, обычно пару минут, живую страницу можно будет посмотреть по адресу указанному в отредактированном свойстве `homepage`. Например, вот ссылка на живую версию для этого репозитория [https://goitacademy.github.io/react-homework-template](https://goitacademy.github.io/react-homework-template). Если открывается пустая страница, убедись что во вкладке `Console` нет ошибок связанных с неправильными путями к CSS и JS файлам проекта (**404**). Скорее всего у тебя неправильное значение свойства `homepage` в файле `package.json`. ### Маршрутизация Если приложение использует библиотеку `react-router-dom` для маршрутизации, необходимо дополнительно настроить компонент `<BrowserRouter>`, передав в пропе `basename` точное название твоего репозитория. Слеш в начале строки обязателен. ```jsx <BrowserRouter basename="/your_repo_name"> <App /> </BrowserRouter> ``` ## Как это работает ![How it works](./assets/how-it-works.png) 1. После каждого пуша в ветку `main` GitHub-репозитория, запускается специальный скрипт (GitHub Action) из файла `.github/workflows/deploy.yml`. 2. Все файлы репозитория копируются на сервер, где проект инициализируется и проходит линтинг и сборку перед деплоем. 3. Если все шаги прошли успешно, собранная продакшн версия файлов проекта отправляется в ветку `gh-pages`. В противном случае, в логе выполнения скрипта будет указано в чем проблема.
null
javascript,learning,learning-by-doing,react,react-class-components
2023-06-01T11:38:09Z
2023-06-02T22:09:57Z
null
1
0
15
0
0
2
null
null
JavaScript
chenyl8848/node.js-study
master
# `Node.js` 教程 - [0. 基础概念](#0-基础概念) - [1. `Buffer`](#1-buffer) - [1.1 概念](#11-概念) - [1.2 特点](#12-特点) - [1.3 使用](#13-使用) - [1.3.1 `Buffer` 的创建](#131-buffer-的创建) - [1.3.2 `Buffer` 与字符串的转化](#132-buffer-与字符串的转化) - [1.3.3 `Buffer` 的操作](#133-buffer-的操作) - [2. `fs` 模块](#2-fs-模块) - [2.1 文件写入](#21-文件写入) - [2.1.1 异步写入](#211-异步写入) - [2.1.2 同步写入](#212-同步写入) - [2.1.3 追加写入](#213-追加写入) - [2.1.4 流式写入](#214-流式写入) - [2.2 文件读取](#22-文件读取) - [2.2.1 异步读取](#221-异步读取) - [2.2.2 同步读取](#222-同步读取) - [2.2.3 流式读取](#223-流式读取) - [2.3 文件移动与重命名](#23-文件移动与重命名) - [2.4 文件删除](#24-文件删除) - [2.5 文件夹操作](#25-文件夹操作) - [2.5.1 创建文件夹](#251-创建文件夹) - [2.5.2 读取文件夹](#252-读取文件夹) - [2.5.3 删除文件夹](#253-删除文件夹) - [2.6 查看资源状态](#26-查看资源状态) - [2.7 相对路径问题](#27-相对路径问题) - [2.8 `__dirname`](#28-__dirname) - [2.9 练习](#29-练习) - [3. `path` 模块](#3-path-模块) - [4. `http` 模块](#4-http-模块) - [4.1 创建 `http` 服务](#41-创建-http-服务) - [4.1.1 操作步骤](#411-操作步骤) - [4.1.2 测试](#412-测试) - [4.1.3 注意事项](#413-注意事项) - [4.2 获取 `http` 请求报文](#42-获取-http-请求报文) - [4.3 设置 `http` 响应报文](#43-设置-http-响应报文) - [4.4 练习](#44-练习) - [4.4.1 `http` 请求练习](#441-http-请求练习) - [4.4.1 `http` 响应练习](#441-http-响应练习) - [4.5 静态资源服务](#45-静态资源服务) - [4.5.1 网页中的 `URL`](#451-网页中的-url) - [4.5.2 设置资源类型(`mime` 类型)](#452-设置资源类型mime-类型) - [4.5.3 `GET` 和 `POST` 请求的区别](#453-get-和-post-请求的区别) - [5. 模块化](#5-模块化) - [5.1 基础概念](#51-基础概念) - [5.2 模块暴露](#52-模块暴露) - [5.3 模块导入](#53-模块导入) - [5.4 模块导入流程](#54-模块导入流程) - [6. 包管理工具](#6-包管理工具) - [6.1 基础概念](#61-基础概念) - [6.2 `npm`](#62-npm) - [6.2.1 初始化](#621-初始化) - [6.2.2 包管理](#622-包管理) - [6.2.3 启动项目](#623-启动项目) - [6.3 `cnpm`](#63-cnpm) - [6.4 `yarn`](#64-yarn) - [6.5 管理发布包](#65-管理发布包) - [6.6 `nvm`](#66-nvm) - [7. `express` 框架](#7-express-框架) - [7.1 介绍与使用](#71-介绍与使用) - [7.2 路由](#72-路由) - [7.2.1 路由初体验](#721-路由初体验) - [7.2.2 获取请求参数](#722-获取请求参数) - [7.2.3 设置响应](#723-设置响应) - [7.2.4 路由模块化](#724-路由模块化) - [7.3 中间件](#73-中间件) - [7.3.1 全局中间件](#731-全局中间件) - [7.3.2 路由中间件](#732-路由中间件) - [7.3.3 静态资源中间件](#733-静态资源中间件) - [7.4 `EJS` 模板引擎](#74-ejs-模板引擎) - [7.4.1 `EJS` 初体验](#741-ejs-初体验) - [7.4.2 `EJS` 常用语法](#742-ejs-常用语法) - [7.5 脚手架](#75-脚手架) - [8. `MongoDB`](#8-mongodb) - [8.1 基础概念](#81-基础概念) - [8.2 操作命令](#82-操作命令) - [8.2.1 数据库命令](#821-数据库命令) - [8.2.2 集合命令](#822-集合命令) - [8.2.3 文档命令](#823-文档命令) - [8.3 `Mongooose`](#83-mongooose) - [8.4.1 介绍与使用](#841-介绍与使用) - [8.4.2 字段操作](#842-字段操作) - [8.4.3 增删改查](#843-增删改查) - [8.4.4 条件控制](#844-条件控制) - [8.4.5 个性化读取](#845-个性化读取) - [9. 接口](#9-接口) - [9.1 `RESTful API`](#91-restful-api) - [9.2 `json-server`](#92-json-server) - [10. 会话控制](#10-会话控制) - [10.1 `cookie`](#101-cookie) - [10.2 `session`](#102-session) - [10.3 `token`](#103-token) ## 0. 基础概念 > `Node.js` 是一个基于 `Chrome V8` 引擎的 `JavaScript` 运行环境,使用了一个事件驱动、非阻塞式 `I/O` 模型,让 `JavaScript` 运行在服务端的开发平台。 官方地址:https://nodejs.org/en 中文地址:https://nodejs.org/zh-cn 代码初体验: ```JavaScript console.log("hello NodeJS") // 1.进入到对应 js 文件的目录下 // 2.执行 node 1-hello.js // 3.输出:hello NodeJS ``` ## 1. `Buffer` ### 1.1 概念 > `Buffer` 是一个类似于数组的**对象**,用于表示固定长度的字节序列。`Buffer` 本质是一段内存空间,专门用来处理二进制数据。 ### 1.2 特点 - `Buffer` 大小固定且无法调整 - `Buffer` 性能较好,可以直接对计算机内存进行操作 - 每个元素的大小为 1 字节(byte) ### 1.3 使用 #### 1.3.1 `Buffer` 的创建 `Node.js` 中创建 `Buffer` 的方式主要如下几种: `Buffer.alloc` ```JavaScript // 创建了一个长度为 10 字节的 Buffer,相当于申请了 10 字节的内存空间,每个字节的值为 0 // 结果为 <Buffer 00 00 00 00 00 00 00 00 00 00> let buf_1 = Buffer.alloc(10); ``` `Buffer.allocUnsafe` ```JavaScript // 创建了一个长度为 10 字节的 Buffer,Buffer 中可能存在旧的数据, 可能会影响执行结果,所以叫 unsafe let buf_2 = Buffer.allocUnsafe(10); ``` `Buffer.from` ```JavaScript // 通过字符串创建 Buffer let buf_3 = Buffer.from('hello'); // 通过数组创建 Buffer let buf_4 = Buffer.from([105, 108, 111, 118, 101, 121, 111, 117]); ``` #### 1.3.2 `Buffer` 与字符串的转化 可以借助 `toString` 方法将 `Buffer` 转为字符串 ```JavaScript // buffer 与字符串的转换 const buffer = Buffer.from([105, 108, 111, 118, 101, 121, 111, 117]); // 默认使用 UTF-8 的编码格式 console.log(buffer.toString()) ``` > 注意:`toString` 默认是按照 `utf-8` 编码方式进行转换的。 #### 1.3.3 `Buffer` 的操作 `Buffer` 可以直接通过 [] 的方式对数据进行处理。 ```JavaScript const buffer = Buffer.from('hello'); // 二进制:1101000 console.log(buffer[0].toString(2)) // 修改 buffer buffer[0] = 95 console.log(buffer.toString()) // 溢出 如果修改的数值超过 255 ,则超过 8 位数据会被舍弃 const buffer = Buffer.from('hello') // 会舍弃高位的数字,因为八位的二进制最高值为 255 0001 0110 1001 => 0110 1001 buffer[0] = 361 console.log(buffer) // 中文 一个 utf-8 的字符 一般 占 3 个字节 const buffer = Buffer.from('你好') console.log(buffer) ``` > 注意: > 1. 如果修改的数值超过255,则超过8位数据会被舍弃 > 2. 一个 `utf-8` 的字符一般占3个字节 ## 2. `fs` 模块 > `fs` 全称为 `file system`,称之为**文件系统**,是 `Node.js` 中的**内置模块**,可以对计算机中的磁盘进行操作。 ### 2.1 文件写入 文件写入就是将数据保存到文件中,有如下的 `API` | 方法 | 说明 | | -- | -- | | writeFile | 异步写入 | | writeFileSync | 同步写入 | | appendFile/appendFileSync | 追加写入 | | createWriteStream | 流式写入 | #### 2.1.1 异步写入 语法: `fs.writeFile(file, data, [options], callback)` 参数说明: - `file`:文件名 - `data`:待写入的数据 - `options`:选项设置 (可选) - `callback`:写入回调 返回值: `undefined` 代码示例: ```JavaScript // 1.导入 fs 模块 const fs = require('fs') // 2.写入文件 // writeFile 异步写入,四个参数:1.文件路径 2.写入内容 3.配置信息 4.回调函数 // 文件写入成功 fs.writeFile('./座右铭.txt', '封狼居胥,禅于姑衍,饮马瀚海', error => { // errror 为 null就是写入成功 if (error) { console.log('文件写入失败') return; } console.log('文件写入成功') }); ``` #### 2.1.2 同步写入 语法: `fs.writeFileSync(file, data, [options])` 参数说明: - `file`:文件名 - `data`:待写入的数据 - `options`:选项设置 (可选) 返回值: `undefined` 代码示例: ```JavaScript // 1.导入 fs 模块 const fs = require('fs') // 2.写入文件 // 同步写入,没有回调函数 fs.writeFileSync('./座右铭.txt', '封狼居胥,禅于姑衍,饮马瀚海,燕石勒然') ``` > `Node.js` 中的磁盘操作是由其他线程完成的,结果的处理有两种模式: > - 同步处理 `JavaScript` 主线程会等待其他线程的执行结果,然后再继续执行主线程的代码,效率较低 > - 异步处理 `JavaScript` 主线程不会等待其他线程的执行结果,直接执行后续的主线程代码,效率较好 #### 2.1.3 追加写入 `appendFile` 作用是在文件尾部追加内容,`appendFile` 语法与 `writeFile` 语法完全相同 语法: - fs.appendFile(file, data, [options], callback) - fs.appendFileSync(file, data, [options]) 返回值: 二者都为 `undefined` 代码示例: ```JavaScript // 1.引入 fs 模块 const fs = require('fs'); const content = '\r\n但使龙城飞将在,不教胡马度阴山'; // fs.appendFile('./座右铭.txt', content, error => { // // errror 为 null就是写入成功 // if (error) { // console.log('文件追加写入失败') // return; // } // console.log('文件追加写入成功'); // }) // 同步文件追加写入 // fs.appendFileSync('./座右铭.txt', content) // 使用 writeFile 的方式追加文件写入 fs.writeFile('./座右铭.txt', content, {flag: 'a'}, error => { if (error) { console.log('文件追加写入失败') return; } console.log('文件追加写入成功') }) console.log('hello world') ``` #### 2.1.4 流式写入 语法: `fs.createWriteStream(path, [options])` 参数说明: - `path`:文件路径 - `options`:选项配置( 可选 ) 返回值: `Object` 代码示例: ```JavaScript // 1.导入 fs 模块 const fs = require('fs'); // 2.创建写入流对象 const writeStream = fs.createWriteStream('./观书有感.txt'); // 3.写入内容 writeStream.write('半亩方塘一鉴开\r\n') writeStream.write('天光云影共徘徊\r\n') writeStream.write('问渠那得清如许\r\n') writeStream.write('为有源头活水来\r\n') // 4.关闭通道 不是必须 // writeStream.close(); ``` > 程序打开一个文件是需要消耗资源的,流式写入可以减少打开关闭文件的次数。流式写入方式适用于**大文件写入**或者**频繁写入**的场景, `writeFile` 适合于写入频率较低的场景。 ### 2.2 文件读取 文件读取顾名思义,就是通过程序从文件中取出其中的数据,有如下几种 `API`: | 方法 | 说明 | | -- | -- | | readFile | 异步读取 | | readFileSync | 同步读取 | | createReadStream | 流式读取 | #### 2.2.1 异步读取 语法: `fs.readFile(path, [options], callback)` 参数说明: - `path`:文件路径 - `options`:选项配置 - `callback`:回调函数 返回值: `undefined` 代码示例: ```JavaScript // 1.引入 fs 模块 const fs = require('fs') // 2.异步读取 fs.readFile('./座右铭.txt', (error, data) => { if (error) { console.log('文件读取错误') return } console.log(data.toString()) }) ``` #### 2.2.2 同步读取 语法: `fs.readFileSync(path, [options])` 参数说明: - `path`:文件路径 - `options`:选项配置 返回值: `string` | `Buffer` 代码示例: ```JavaScript // 1.引入 fs 模块 const fs = require('fs') // 2.同步读取 let data = fs.readFileSync('./座右铭.txt'); console.log(data.toString()) ``` #### 2.2.3 流式读取 语法: `fs.createReadStream(path, [options])` 参数说明: - `path`:文件路径 - `options`:选项配置(可选) 返回值:`Object` 代码示例: ```JavaScript // 1.导入 fs 模块 const fs = require('fs') // 2.创建读取流对象 const rs = fs.createReadStream('./观书有感.txt'); // 3.绑定 data 事件 rs.on('data', chunk => { // chunk:块儿、大块儿 console.log(chunk) console.log(chunk.length) console.log(chunk.toString()) }) // 4.结束事件(可选) rs.on('end', () => { console.log('文件读取完成') }) ``` ### 2.3 文件移动与重命名 在 `Node.js` 中,可以使用 `rename` 或 `renameSync` 来移动或重命名文件或文件夹 语法: - `fs.rename(oldPath, newPath, callback)` - `fs.renameSync(oldPath, newPath)` 参数说明: - `oldPath`:文件当前的路径 - `newPath`:文件新的路径 - `callback`:操作后的回调 代码示例: ```JavaScript // 1.导入 fs 模块 const fs = require('fs'); // 2.文件重命名 // fs.rename('./座右铭-2.txt', './西汉名将.txt', error => { // if (error) { // console.log('文件重命名失败') // return ; // } // console.log('文件重命名成功') // }) // 3.文件移动 // 文件夹如果不存在,会报错误 Error: ENOENT: no such file or directory fs.rename('./西汉名将.txt', './文件/西汉名将.txt', error => { if (error) { console.log(error, '移动文件出错'); return ; } console.log('操作成功') }) ``` ### 2.4 文件删除 在 `Node.js` 中,可以使用 `unlink` 或 `unlinkSync` 或 `rm` 或 `rmSync` 来删除文件 语法: - `fs.unlink(path, callback)` - `fs.unlinkSync(path)` 参数说明: - `path`:文件路径 - `callback`:操作后的回调 代码示例: ```JavaScript // 1.引入 fs 模块 const fs = require('fs') // 2.调用 unlink 方法 // unlinkSync:同步删除 // fs.unlink('./座右铭-3.txt', error => { // if (error) { // console.log('删除文件错误', error) // return; // } // console.log('删除文件成功') // }) // 3.调用 rm 方法 // rmSync:同步删除 fs.rm('./文件/西汉名将.txt', error => { if (error) { console.log('文件删除失败', error) return; } console.log('文件删除成功') }) ``` ### 2.5 文件夹操作 在 `Node.js` 中可以通过如下 `API` 对文件夹进行创建、读取、删除等操作 | 方法 | 说明 | | -- | -- | | mkdir / mkdirSync | 创建文件夹 | | readdir / readdirSync | 读取文件夹 | | rmdir / rmdirSync | 删除文件夹 | #### 2.5.1 创建文件夹 在 `Node.js` 中,可以使用 `mkdir` 或 `mkdirSync` 来创建文件夹 语法: - `fs.mkdir(path, [options], callback)` - `fs.mkdirSync(path, [options])` 参数说明: - `path`:文件夹路径 - `options`:选项配置(可选) - `callback`:操作后的回调 示例代码: ```JavaScript // 1.引入 fs 模块 const fs = require('fs') // 2.创建文件夹 // mkdir make:制作 directory:目录 fs.mkdir('./html', error => { if (error) { console.log('创建目录失败', error) return; } console.log('创建目录成功') }) // 3.递归创建文件夹 fs.mkdir('./a/b/c', { recursive: true }, error => { if (error) { console.log("递归创建文件夹失败", error) return; } console.log('递归创建文件夹成功') }) // 4.递归同步创建文件夹 fs.mkdirSync('./a/b/c', {recursive: true}); ``` #### 2.5.2 读取文件夹 在 `Node.js` 中,可以使用 `readdir` 或 `readdirSync` 来读取文件夹 语法: - `fs.readdir(path, [options], callback)` - `fs.readdirSync(path, [options])` 参数说明: - `path`:文件夹路径 - `options`:选项配置(可选) - `callback`:操作后的回调 示例代码: ```JavaScript // 1.引入 fs 模块 const fs = require('fs') // 2.读取文件夹 // readdir read:读取 dir:directory 目录 fs.readdir('./', (error, data) => { if (error) { console.log('读取文件夹错误', error) return; } // [ // '1-文件写入.js', // '2-追加写入.js', // '3-流式写入.js', // '4-文件读取.js', // '5-流式读取.js', // '6-练习-文件复制.js', // '7-文件重命名与移动.js', // '8-删除文件.js', // '9-文件夹操作.js', // 'a', // 'html', // '座右铭.txt', // '文件', // '观书有感.txt' // ] console.log(data) }) //同步读取 // let data = fs.readdirSync('./'); // console.log(data); ``` #### 2.5.3 删除文件夹 在 `Node.js` 中,可以使用 `rmdir` 或 `rmdirSync` 来删除文件夹 语法: - `fs.rmdir(path, [options], callback)` - `fs.rmdirSync(path, [options])` 参数说明: - `path`:文件夹路径 - `options`:选项配置(可选) - `callback`:操作后的回调 示例代码: ```JavaScript // 1.引入 fs 模块 const fs = require('fs') // 2.删除文件夹 // fs.rmdir('./文件', error => { // if (error) { // console.log('删除文件夹失败', error) // return; // } // console.log('删除文件夹成功') // }) // 3.递归删除文件夹 // 递归删除文件夹失败 [Error: ENOTEMPTY: directory not empty, rmdir 'E:\JavaEE\frontend\nodejs-study\2-fs文件系统\a'] // 不推荐使用 // fs.rmdir('./a', {recursive: true}, error => { // if (error) { // console.log('递归删除文件夹失败', error) // return ; // } // console.log('递归删除文件夹成功') // }) // 推荐使用 fs.rm('./a', {recursive: true}, error => { if (error) { console.log('递归删除文件失败', error) return; } console.log('递归删除文件成功') }) //同步递归删除文件夹 fs.rmdirSync('./a', {recursive: true}) ``` ### 2.6 查看资源状态 在 `Node.js` 中,可以使用 `stat` 或 `statSync` 来查看资源的详细信息 语法: - `fs.stat(path, [options], callback)` - `fs.statSync(path, [options])` 参数说明: - `path`:文件夹路径 - `options`:选项配置(可选) - `callback`:操作后的回调 示例代码: ```JavaScript // 1.引入 fs 模块 const fs = require('fs') // 2.stat 方法 status 的缩写:状态 fs.stat('./观书有感.txt', (error, data) => { if (error) { console.log('操作失败', error) return; } // Stats { // dev: 985301708, // mode: 33206, // nlink: 1, // uid: 0, // gid: 0, // rdev: 0, // blksize: 4096, // ino: 281474979770305, // size: 92, // blocks: 0, // atimeMs: 1684373309132.9426, // mtimeMs: 1684289136772.1648, // ctimeMs: 1684289136772.1648, // birthtimeMs: 1684289136770.7136, // atime: 2023 - 05 - 18 T01: 28: 29.133 Z, // mtime: 2023 - 05 - 17 T02: 05: 36.772 Z, // ctime: 2023 - 05 - 17 T02: 05: 36.772 Z, // birthtime: 2023 - 05 - 17 T02: 05: 36.771 Z // } console.log(data) console.log(data.isFile()) console.log(data.isDirectory()) }) // 3.同步获取状态 let data = fs.statSync('./观书有感.txt'); console.log(data) console.log(data.isFile()) console.log(data.isDirectory()) ``` 结果值对象结构: - `size`:文件体积 - `birthtime`:创建时间 - `mtime`:最后修改时间 - `isFile`:检测是否为文件 - `isDirectory`:检测是否为文件夹 ### 2.7 相对路径问题 `fs` 模块对资源进行操作时,路径的写法有两种: - 相对路径 - `./座右铭.txt`:当前目录下的座右铭.txt - `座右铭.txt`:等效于上面的写法 - `../座右铭.txt`:当前目录的上一级目录中的座右铭.txt - 绝对路径 - `D:/Program Files`:`windows` 系统下的绝对路径 - `/usr/bin`:`Linux` 系统下的绝对路径 > 相对路径中所谓的当前目录,指的是**命令行的工作目录**,而并非是文件的所在目录。所以当命令行的工作目录与文件所在目录不一致时,会出现一些 `BUG`。 ### 2.8 `__dirname` `__dirname` 与 `require` 类似,都是 `Node.js` 环境中的 '全局' 变量 `__dirname` 保存着**当前文件所在目录的绝对路径**,可以使用 `__dirname` 与文件名拼接成绝对路径 代码示例: ```JavaScript let data = fs.readFileSync(__dirname + '/data.txt'); console.log(data); ``` > 使用 `fs` 模块的时候,尽量使用 `__dirname` 将路径转化为绝对路径,这样可以避免相对路径产生的 `Bug` ### 2.9 练习 实现文件复制的功能 代码示例: ```JavaScript /** * 需求: * 复制【座右铭.txt】 */ // 1.引入 fs 模块 const fs = require('fs'); // 全局对象,即 global 对象的属性,无须声明即可访问。它用于描述当前 Node 进程状态的对象,提供了一个与操作系统的简单接口。 const process = require('process') // 方式一:使用 readFile // 2.读取文件 // let data = fs.readFileSync('./座右铭.txt'); // // 3.写入文件 // fs.writeFileSync('./座右铭-2.txt', data); // // 查看系统耗费内存 // // rss: 19795968 字节 // console.log(process.memoryUsage()) // 方式二:使用流式操作 // 2.创建流式读取 let rs = fs.createReadStream('./座右铭.txt'); // 3.创建流式写入 let ws = fs.createWriteStream('./座右铭-3.txt'); // // 4.绑定 data 事件 // rs.on('data', chunk => { // ws.write(chunk); // }) // // 5.绑定 end 事件 // rs.on('end', () => { // // rss: 20885504 字节 相比于同步的方式占用内存会比较小 // console.log(process.memoryUsage()) // }) // 4.使用 pipe(管道) 可直接复制 rs.pipe(ws) ``` ## 3. `path` 模块 `path` 模块提供了**操作路径**的功能,有如下几个较为常用的 `API`: | 方法 | 说明 | | -- | -- | | path.resolve | 拼接规范的绝对路径常用 | | path.sep | 获取操作系统的路径分隔符 | | path.parse | 解析路径并返回对象 | | path.basename | 获取路径的基础名称 | | path.dirname | 获取路径的目录名 | | path.extname | 获得路径的扩展名 | 代码示例: ```JavaScript // 1.引入 path、fs 模块 const path = require('path') const fs = require('fs') // 写入文件 // fs.writeFileSync(__dirname + '/index.html', 'love') // E:\JavaEE\frontend\nodejs-study\3-path模块/index.html // console.log(__dirname + '/index.html') // 使用 path 解决 // E:\JavaEE\frontend\nodejs-study\3-path模块\index.html console.log(path.resolve(__dirname, './index.html')) // E:\JavaEE\frontend\nodejs-study\3-path模块\index.html console.log(path.resolve(__dirname, 'index.html')) // E:\index.html\test console.log(path.resolve(__dirname, '/index.html', './test')) // 分隔符 // \ windows:\ linux:/ console.log(path.sep) // parse 方法 __dirname '全局变量' // __filename '全局变量' 文件的绝对路径 console.log(__filename) let str = 'E:\\JavaEE\\frontend\\nodejs-study\\3-path模块\\index.html'; // { // root: 'E:\\', // dir: 'E:\\JavaEE\\frontend\\nodejs-study\\3-path模块', // base: 'index.html', // ext: '.html', // name: 'index' // } console.log(path.parse(str)) // index.html console.log(path.basename(str)) // E:\JavaEE\frontend\nodejs-study\3-path模块 console.log(path.dirname(str)) // .html console.log(path.extname(str)) ``` ## 4. `http` 模块 ### 4.1 创建 `http` 服务 #### 4.1.1 操作步骤 代码示例: ```JavaScript // 1.引入 http 模块 const http = require('http') // 2.创建 http 服务 const server = http.createServer((request, response) => { // response.end 设置响应体 必须要返回,且只能返回一次 // 多个 response.end 报错 Error [ERR_STREAM_WRITE_AFTER_END]: write after end // response.end("hello world") // response.end("hello world") // 解决中文乱码 response.setHeader('content-type', 'text/html;charset=utf-8') response.end('你好,世界') }) // 3.启动服务并监听端口 server.listen(9000, () => { console.log('http 服务启动成功') }) ``` > `http.createServer` 里的回调函数的执行时机:当接收到 `http` 请求的时候,就会执行 #### 4.1.2 测试 浏览器请求对应端口 `http://127.0.0.1:9000` #### 4.1.3 注意事项 - 命令行 `ctrl + c` 停止服务 - 当服务启动后,更新代码必须重启服务才能生效 - 响应内容中文乱码的解决办法 ```JavaScript response.setHeader('content-type', 'text/html;charset=utf-8') ``` - 端口号被占用 - 关闭当前正在运行监听端口的服务 - 修改其他端口号 - 如果端口被其他程序占用,可以使用**资源监视器**找到占用端口的程序,然后使用**任务管理器**关闭对应的程序 ### 4.2 获取 `http` 请求报文 想要获取请求的数据,需要通过 `request` 对象 | 方法 | 说明 | | -- | -- | | request.method | 请求方法 | | request.httpVersion | 请求版本 | | request.url | 请求路径 | | require('url').parse(request.url).pathname | URL 路径 | | require('url').parse(request.url, true).query | URL 查询字符串 | | request.headers | 请求头 | | request.on('data', function(chunk){})<br/>request.on('end', function(){}); | 请求体 | 注意事项: - `request.url` 只能获取路径以及查询字符串,无法获取 `URL` 中的域名以及协议的内容 - `request.headers` 将请求信息转化成一个对象,并将属性名都转化成了『小写』 - 关于路径:如果访问网站的时候,只填写了 `IP` 地址或者是域名信息,此时请求的路径为『/』 - 关于 `favicon.ico`:这个请求是属于浏览器自动发送的请求 代码示例: ```JavaScript // 1.引入 http 模块 const http = require('http') // 2.创建服务 const server = http.createServer((request, response) => { // 获取请求的方法 console.log(request.method) // 获取请求的 url console.log(request.url) // 获取 http 协议版本号 console.log(request.httpVersion) // 获取请求头 console.log(request.headers) // 获取请求主机地址 console.log(request.headers.host) response.end("hello world") }) // 3.启动服务并监听端口‘ server.listen(9000, () => { console.log('服务启动成功') }) ``` 代码示例: ```JavaScript // 1.引入 http 模块 const http = require('http') // 2.创建服务 const server = http.createServer((request, response) => { // 1.声明一个变量 let body = '' // 2.绑定 data 事件 request.on('data', chunk => { body += chunk }) // 3.绑定 end 事件 request.on('end', () => { console.log(body) response.end("hello world") }) }) // 3.启动服务并监听端口‘ server.listen(9000, () => { console.log('服务启动成功') }) ``` 代码示例: ```JavaScript // 1.引入 http 模块 const http = require('http') // 1.导入 url 模块 const url = require('url') // 2.创建服务 const server = http.createServer((request, response) => { // request: http://127.0.0.1:9000/search?keyword=123&username=chen // 2.解析 request.url // let res1 = url.parse(request.url) // Url { // protocol: null, // slashes: null, // auth: null, // host: null, // port: null, // hostname: null, // hash: null, // search: '?keyword=123&username=chen', // query: 'keyword=123&username=chen', // pathname: '/search', // path: '/search?keyword=123&username=chen', // href: '/search?keyword=123&username=chen' // } // console.log(res1) // let res2 = url.parse(request.url, true) // Url { // protocol: null, // slashes: null, // auth: null, // host: null, // port: null, // hostname: null, // hash: null, // search: '?keyword=123&username=chen', // query: [Object: null prototype] { // keyword: '123', // username: 'chen' // }, // pathname: '/search', // path: '/search?keyword=123&username=chen', // href: '/search?keyword=123&username=chen' // } // console.log(res2) let res = url.parse(request.url, true) // 请求路径 // /search console.log(res.pathname) // 查询字符串 // 123 console.log(res.query.keyword) response.end('hello world') }) // 3.启动服务并监听端口‘ server.listen(9000, () => { console.log('服务启动成功') }) ``` 代码示例: ```JavaScript // 1.引入 http 模块 const http = require('http') // 2.创建服务 const server = http.createServer((request, response) => { // request: http://127.0.0.1:9000/search?keyword=123&username=chen // 第二个参数要写完整 http://127.0.0.1 只写 ip 会报错 let url = new URL(request.url, 'http://127.0.0.1') // URL { // href: 'http://127.0.0.1/search?keyword=123&username=chen', // origin: 'http://127.0.0.1', // protocol: 'http:', // username: '', // password: '', // host: '127.0.0.1', // hostname: '127.0.0.1', // port: '', // pathname: '/search', // search: '?keyword=123&username=chen', // searchParams: URLSearchParams { // 'keyword' => '123', 'username' => 'chen' // }, // hash: '' // } // console.log(url) // 请求路径 console.log(url.pathname) // 请求路径参数 console.log(url.searchParams.get('keyword')) response.end('hello world') }) // 3.启动服务并监听端口‘ server.listen(9000, () => { console.log('服务启动成功') }) ``` ### 4.3 设置 `http` 响应报文 | 方法 | 说明 | | -- | -- | | response.statusCode | 设置响应状态码 | | response.statusMessage | 设置响应状态描述 | | response.setHeader('键名', '键值') | 设置响应头信息 | | response.write('xx')<br>response.end('xxx') | 设置响应体 | `write` 和 `end` 的两种使用情况: ```JavaScript // 1.write 和 end 的结合使用 响应体相对分散 response.write('xx'); response.write('xx'); response.write('xx'); //每一个请求,在处理的时候必须要执行 end 方法,且只能执行一次 response.end(); // 2.单独使用 end 方法 响应体相对集中 response.end('xxx'); ``` 代码示例: ```JavaScript // 1.引入 http 模块 const http = require('http') // 2.创建服务 const server = http.createServer((request, response) => { // 1.设置响应状态码 // response.statusCode = 200 // response.statusCode = 404 // 2.设置响应信息 不常用 // response.statusMessage = 'hello world' // 3.设置响应头 response.setHeader('content-type', 'text/html;charset=utf-8') response.setHeader('Server', 'Node.js') response.setHeader('myHeader', 'myHeader') response.setHeader('test', ['love', 'love', 'love']) // 4.设置响应体 response.write('love\r\n') response.write('love\r\n') response.write('love\r\n') response.write('love\r\n') response.end('hello world') }) // 3.启动服务并监听端口‘ server.listen(9000, () => { console.log('服务启动成功') }) ``` ### 4.4 练习 #### 4.4.1 `http` 请求练习 需求: 当请求方式为 `get` 请求时,请求路径为 `/login` 返回 `login` 当请求方式为 `get` 请求时,请求路径为 `/register` 返回 `register` 代码示例: ```JavaScript /** * 需求: * 当请求方式为 get 请求时,请求路径为 /login 返回 login * 当请求方式为 get 请求时,请求路径为 /register 返回 register */ // 1.引入 http 模块 const http = require('http') // 2.创建服务 const server = http.createServer((request, response) => { // 请求方式 let { method } = request // 请求路径 let { pathname } = new URL(request.url, 'http://127.0.0.1') if (method === 'GET' && pathname === '/login') { response.end('login') } else if (method === 'GET' && pathname === '/register') { response.end('register') } else { response.end('hello world') } }) // 3.启动服务并监听端口‘ server.listen(9000, () => { console.log('服务启动成功') }) ``` #### 4.4.1 `http` 响应练习 需求: 回一个4行3列的表格,且要求表格有隔行换色效果,且点击单元格能高亮显示 代码示例: ```JavaScript /** * 需求: * 返回一个4行3列的表格,且要求表格有隔行换色效果,且点击单元格能高亮显示 */ // 1.引入 http 模块 const http = require('http') // 2.创建服务 const server = http.createServer((request, response) => { response.end(` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> td { padding: 20px 40px; } table tr:nth-child(odd) { background: rgb(179, 165, 201); } table tr:nth-child(even) { background: #fcb; } table, td { border-collapse: collapse; } </style> </head> <body> <table border="1"> <tr> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> </tr> </table> <script> //获取所有的 td let tds = document.querySelectorAll('td'); //遍历 tds.forEach(item => { item.onclick = function () { this.style.background = '#222'; } }) </script> </body> </html> `) }) // 3.启动服务并监听端口‘ server.listen(9000, () => { console.log('服务启动成功') }) ``` 代码优化: ```JavaScript /** * 需求: * 返回一个4行3列的表格,且要求表格有隔行换色效果,且点击单元格能高亮显示 */ // 1.引入 http 模块 const http = require('http') // 1.引入 fs 模块 const fs = require('fs') // 2.创建服务 const server = http.createServer((request, response) => { // 2.读取文件内容 let file = fs.readFileSync(__dirname + '/10-table.html') response.end(file) }) // 3.启动服务并监听端口‘ server.listen(9000, () => { console.log('服务启动成功') }) ``` ### 4.5 静态资源服务 > 静态资源是指**内容长时间不发生改变的资源**,例如图片、视频、`CSS` 文件、`JS` 文件、`HTML` 文件、字体文件等。 > 动态资源是指**内容经常更新的资源**,例如百度首页、网易首页、京东搜索列表页面等。 #### 4.5.1 网页中的 `URL` > 网页中的 `URL` 主要分为两大类:相对路径与绝对路径 绝对路径可靠性强,而且相对容易理解,在项目中运用较多 | 形式 | 特点 | | -- | -- | | http://xxx.com/web | 直接向目标资源发送请求,容易理解,网站的外链会用到此形式 | | //xxx.com/web | 与页面 `URL` 的协议拼接形成完整 `URL` 再发送请求,大型网站用的比较多 | | /web | 与页面 `URL` 的协议、主机名、端口拼接形成完整 `URL` 再发送请求,中小型网站 | 相对路径在发送请求时,需要与当前页面 `URL` 路径进行计算,得到完整 `URL` 后,再发送请求 例如当前网页 `URL` 为 `http://www.xxx.com/course/h5.html` | 形式 | 最终的 `URL` | | -- | -- | | ./css/app.css | http://www.xxx.com/course/css/app.css | | js/app.js | http://www.xxx.com/course/js/app.js | | ../img/logo.png | http://www.xxx.com/img/logo.png | | ../../mp4/show.mp4 | http://www.atguigu.com/mp4/show.mp4 | #### 4.5.2 设置资源类型(`mime` 类型) > 媒体类型(通常称为 `Multipurpose Internet Mail Extensions` 或 `MIME` 类型 )是一种标准,用来表示文档、文件或字节流的性质和格式。 `mime` 类型结构: `[type]/[subType]` 例如: `text/html` `text/css` `image/jpeg` `image/png` `application/json` `http` 服务可以设置响应头 `Content-Type` 来表明响应体的 `mime` 类型,浏览器会根据该类型决定如何处理资源 下面是常见文件对应的 `mime` 类型: ```Json { html: 'text/html', css: 'text/css', js: 'text/javascript', png: 'image/png', jpg: 'image/jpeg', gif: 'image/gif', mp4: 'video/mp4', mp3: 'audio/mpeg', json: 'application/json' } ``` > 说明:对于未知的资源类型,可以选择 `application/octet-stream` 类型,浏览器在遇到该类型的响应时,会对响应体内容进行独立存储,也就是**下载**。 代码示例: ```JavaScript /** * 需求: * 根据不同的请求路径,返回不同的文件 */ // 1.引入模块 const http = require('http') const fs = require('fs') // 2.创建服务 const server = http.createServer((request, response) => { // 获取请求路径 let { pathname } = new URL(request.url, 'https://127.0.0.1:9000') if (pathname === '/') { // 获取要响应的文件 let data = fs.readFileSync(__dirname + '/11-table.html') // 设置响应 response.end(data) } else if (pathname === '/index.css') { // 获取要响应的文件 let data = fs.readFileSync(__dirname + '/index.css') // 设置响应 response.end(data) } else if (pathname === '/index.js') { // 获取要响应的文件 let data = fs.readFileSync(__dirname + '/index.js') // 设置响应 response.end(data) } else { response.end(`<h1>404 Not Found</h1>`) } }) // 3.启动服务,并监听端口‘ server.listen(9000, () => { console.log('服务启动成功') }) ``` 代码优化: ```JavaScript /** * 需求: * 创建一个 HTTP 服务,端口为 9000,满足如下需求 * GET /index.html 响应 page/index.html 的文件内容 * GET /css/app.css 响应 page/css/app.css 的文件内容 * GET /images/logo.png 响应 page/images/logo.png 的文件内容 */ // 1.引入模块 const http = require('http') const fs = require('fs') const path = require('path') // 2.创建服务 const server = http.createServer((request, response) => { // 获取文件根路径 let root = path.resolve(__dirname + '/page') // 获取文件路径 let { pathname } = new URL(request.url, 'https://127.0.0.1:9000') // 拼接文件路径 let filePath = root + pathname // 获取文件 fs.readFile(filePath, (error, data) => { // 设置字符集,解决打开文件中文乱码的问题 response.setHeader('content-type', 'text/html;charset=utf-8') if (error) { response.end('读取文件错误') } response.end(data) return; }) }) // 3.启动服务并监听端口 server.listen(9000, () => { console.log('服务启动成功') }) ``` 代码优化: ```JavaScript /** * 需求: * 创建一个 HTTP 服务,端口为 9000,满足如下需求 * GET /index.html 响应 page/index.html 的文件内容 * GET /css/app.css 响应 page/css/app.css 的文件内容 * GET /images/logo.png 响应 page/images/logo.png 的文件内容 * 根据不同的文件类型,返回不同的类型 */ // 1.引入模块 const http = require('http') const fs = require('fs') const path = require('path') // 声明一个变量 let mimes = { html: 'text/html', css: 'text/css', js: 'text/javascript', png: 'image/png', jpg: 'image/jpeg', gif: 'image/gif', mp4: 'video/mp4', mp3: 'audio/mpeg', json: 'application/json' } // 2.创建服务 const server = http.createServer((request, response) => { // 获取文件根路径 let root = path.resolve(__dirname + '/page') // 获取文件路径 let { pathname } = new URL(request.url, 'https://127.0.0.1:9000') // 拼接文件路径 let filePath = root + pathname // 获取文件 fs.readFile(filePath, (error, data) => { if (error) { // 设置字符集,解决打开文件中文乱码的问题 response.setHeader('content-type', 'text/html;charset=utf-8') switch(error.code) { case 'ENOENT': response.statusCode = 404 response.end(`<h1>404 Not Found</h1>`) break; case 'EPERM': response.statusCode = 403 response.end(`<h1>403 Forbidden</h1>`) break; default: response.statusCode = 500 response.end(`<h1>500 Internal </h1>`) break; } return; } // 获取文件后缀 let ext = path.extname(filePath).slice(1) // 获取对应的类型 let type = mimes[ext] if (type) { // 匹配到了 if (ext === 'html') { response.setHeader('content-type', type + ';charset=utf-8') } else { response.setHeader('content-type', type) } } else { // 没有匹配到 // 这种返回格式可以实现下载效果 response.setHeader('content-type', 'application/octet-stream') } response.end(data) }) }) // 3.启动服务并监听端口 server.listen(9000, () => { console.log('服务启动成功') }) ``` #### 4.5.3 `GET` 和 `POST` 请求的区别 - `GET` 和 `POST` 是 `http` 协议请求的两种方式。 - `GET` 主要用来获取数据,`POST` 主要用来提交数据 - `GET` 带参数请求是将参数缀到 `URL` 之后,在地址栏中输入 `URL` 访问网站就是 `GET` 请求,`POST` 带参数请求是将参数放到请求体中 - `POST` 请求相对 `GET` 安全一些,因为在浏览器中参数会暴露在地址栏 - `GET` 请求大小有限制,一般为 `2K`,而 `POST` 请求则没有大小限制 ## 5. 模块化 ### 5.1 基础概念 > 模块化:将一个复杂的程序文件依据一定规则(规范)拆分成多个文件的过程称之为**模块化**。 > 模块:拆分出的每个文件就是一个模块,模块的内部数据是私有的,不过模块可以暴露内部数据以便其他模块使用 > 模块化项目:编码时是按照模块一个一个编码的, 整个项目就是一个模块化的项目 模块化好处: - 防止命名冲突 - 高复用性 - 高维护性 ### 5.2 模块暴露 模块暴露的方式有两种: - `module.exports = value` - `exports.name = value` > 说明: > - `module.exports` 可以暴露任意数据和方法 > - 不能使用 `exports = value` 的形式暴露,模块内部 `module` 与 `exports` 具有隐式关系 > `exports = module.exports = {}`,`require` 返回的是目标模块中 `module.exports` 的值 代码示例: `hello.js` ```JavaScript const type = 'hello world' function helloWorld() { console.log('你好,世界....') } // 暴露数据、方法 module.exports = { type, helloWorld } // exports.type = type // module.exports = helloWorld // exports.type = type // exports.helloWorld = helloWorld ``` `index.js` ```JavaScript // 引入自定应模块 const hello = require('./hello') // 调用模块数据/方法 console.log(hello) hello.helloWorld() // hello() ``` ### 5.3 模块导入 在模块中使用 `require` 传入文件路径即可引入文件 `require` 使用的一些注意事项: - 对于自己创建的模块,导入时路径建议写**相对路径**,且不能省略 `./` 和 `../` - `js` 和 `json` 文件导入时可以不用写后缀,`c/c++` 编写的 `node` 扩展文件也可以不写后缀,但是一般用不到 - 如果导入其他类型的文件,会以 `js` 文件进行处理 - 如果导入的路径是个文件夹,则会首先检测该文件夹下 `package.json` 文件中 `main` 属性对应的文件,如果存在则导入,反之如果文件不存在会报错。如果 `main` 属性不存在,或者 `package.json` 不存在,则会尝试导入文件夹下的 `index.js` 和 `index.json`,如果还是没找到,就会报错 - 导入 `node.js` 内置模块时,直接 `require` 模块的名字即可,无需加 `./` 和 `../` ### 5.4 模块导入流程 `require` 导入**自定义模块**的基本流程: 1. 将相对路径转为绝对路径,定位目标文件 2. 缓存检测 3. 读取目标文件代码 4. 包裹为一个函数并执行(自执行函数),通过 `arguments.callee.toString()` 查看自执行函数 5. 缓存模块的值 6. 返回 `module.exports` 的值 代码示例: ```JavaScript /** * require 导入原理 伪代码 */ // 1.引入模块 const path = require('path') const fs = require('fs') // 2.定义一个缓存数组 let caches = [] function require(file) { // 3.将相对路径转成绝对路径 let absolutePath = path.resolve(__dirname, file) // 4.检测是否有缓存 if (caches[absolutePath]) { return caches[absolutePath] } // 5.读取文件的代码 let code = fs.readFileSync(absolutePath).toString() // 6.封装一个函数 let module = {} let exports = module.exports = {} (function (exports, require, module, __fileName, __dirname) { const test = { name: 'hello world' } module.exports = test console.log(arguments.callee.toString()) })(exports, require, module, __filename, __dirname) // 7.缓存结果 caches[absolutePath] = module.exports // 7.返回 module.exports 的值 return module.exports } ``` ## 6. 包管理工具 ### 6.1 基础概念 包:英文单词是 `package`,代表了一组特定功能的源码集合 包管理工具:管理**包**的应用软件,可以对**包**进行下载安装、更新、删除、上传等操作。借助包管理工具,可以快速开发项目,提升开发效率。包管理工具是一个通用的概念,很多编程语言都有包管理工具,所以 掌握好包管理工具非常重要 常用的包管理工具: - `npm` - `cnpm` - `yarn` - `pnpm` ### 6.2 `npm` > `npm` 全称 `Node Package Manager`,翻译为中文意思是**Node 的包管理工具** > `npm` 是 `Node.js` 官方内置的包管理工具,是必须要掌握住的工具 常见使用命令: | 命令 | 说明 | | -- | -- | | `npm -v` | 查看版本号 | | `npm init` | 命令的作用是将文件夹初始化为一个包, 交互式创建 `package.json` 文件 | | `npm s/search` | 搜索包 | | `npm install`<br> `npm i` | 下载安装包 | | `npm i -g` | 全局安装 | | `npm i <包名@版本号>` | 安装指定版本的包 | | `npm remove` <br> `npm r` | 局部删除依赖 | | `npm remove -g` | 全局删除依赖 | #### 6.2.1 初始化 创建一个空目录,然后以此目录作为工作目录**启动命令行工具**,执行 `npm init`. `npm init` 命令的作用是将文件夹初始化为一个**包**,交互式创建 `package.json` 文件。 `package.json` 文件是包的配置文件,每个包都必须要有, `package.json` 文件内容: ```Json { "name": "1-npm", #包的名字 "version": "1.0.0", #包的版本 "description": "", #包的描述 "main": "index.js", #包的入口文件 "scripts": { #脚本配置 "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", #作者 "license": "ISC" #开源证书 } ``` > 初始化的过程中还有一些注意事项: > - `name` ( 包名 ) 不能使用中文、大写,默认值是文件夹的名称 ,所以文件夹名称也不能使用中文和大写 > - `version` ( 版本号 )要求 `x.x.x` 的形式定义, `x` 必须是数字,默认值是 `1.0.0` > - `ISC` 证书与 `MIT` 证书功能上是相同的,关于开源证书扩展阅读 http://www.ruanyifeng.com/blog/2011/05/how_to_choose_free_software_licenses.html > - `package.json` 可以手动创建与修改 > - 使用 `npm init -y` 或者 `npm init --yes` 极速创建 `package.json` ### 6.2.2 包管理 通过 `npm install` 和 `npm i` 命令安装包 ```Bash npm install uniq npm i uniq ``` 运行之后文件夹下会增加两个资源 - `node_modules` 文件夹存放下载的包,`node_modules` 文件夹大多数情况都不会存入版本库(`git`、`svn` 等) - `package-lock.json` 包的锁文件,用来锁定包的版本 可以使用 `require` 导入 `npm` 包 ```JavaScript // 导入 uniq 包 const uniq = require('uniq') ``` `require` 导入的基本流程: - 在当前文件夹下 `node_modules` 中寻找同名的文件夹 - 在上级目录中下的 `node_modules` 中寻找同名的文件夹,直至找到磁盘根目录 安装的包,也称为**依赖**,**依赖**有**生产依赖**与**开发依赖**,二者的使用如下: | 类型 | 命令 | 说明 | | -- | -- | -- | | 生产依赖 | `npm i -S uniq` <br> `npm i --save uniq` | `-S` 等效于 `--save`,`-S` 是默认选项 <br> 包信息保存在 `package.json` 中 `dependencies` 属性 | | 开发依赖 | `npm i -D less` <br> `npm i --save-dev less` | `-D` 等效于 `--save-dev` <br> 包信息保存在 `package.json` 中 `devDependencies` 属性 | 项目中可能会遇到版本不匹配的情况,有时就需要安装指定版本的包,可以使用下面的命令 ```Bash npm i jquery@1.11.2 ``` 可以执行安装选项 `-g` 进行全局安装 ```Bash npm i -g nodemon ``` 全局安装完成之后就可以在命令行的任何位置运行 `nodemon` 命令,该命令的作用是**自动重启 Node 应用程序** > 说明: > - 全局安装的命令不受工作目录位置影响 > - 可以通过 `npm root -g` 可以查看全局安装包的位置 > - 不是所有的包都适合全局安装,只有全局类的工具才适合,可以通过查看包的官方文档来确定 项目中可能需要删除某些不需要的包,可以使用下面的命令 ```Bash ## 局部删除 npm remove uniq npm r uniq ## 全局删除 npm remove -g nodemon ``` ### 6.2.3 启动项目 可以通过配置 `package.json` 中的 `scripts` 属性来启动项目 ```Json { "scripts": { "server": "node server.js", "start": "node index.js", }, } ``` 配置完成之后,执行命令启动项目 ```Bash npm run server npm run start ``` 不过 `start` 比较特别,使用时可以省略 `run` ```Bash npm start ``` > `npm run` 有自动向上级目录查找的特性,跟 `require` 函数一样 ### 6.3 `cnpm` `cnpm` 是一个淘宝构建的 `npmjs.com` 的完整镜像,也称为**淘宝镜像**,网址:https://npmmirror.com/。 `cnpm` 服务部署在国内阿里云服务器上,可以提高包的下载速度。官方也提供了一个全局工具包 `cnpm`,操作命令与 `npm` 大体相同。 可以通过 `npm` 来安装 `cnpm` 工具: ```Bash npm install -g cnpm --registry=https://registry.npmmirror.com ``` 常用操作命令: | 命令 | 说明 | | -- | -- | | `cnpm init` / `cnpm init` | 初始化 | | `cnpm i uniq` <br> `cnpm i -S uniq` <br> `cnpm i -D uniq` <br> `cnpm i -g nodemon` | 安装包 | | `cnpm i` | 安装项目依赖 | | `cnpm r uniq` | 删除 | 用 `npm` 也可以使用淘宝镜像,配置的方式有两种: - 直接配置 - 工具配置 执行如下命令即可完成配置: ```Bash npm config set registry https://registry.npmmirror.com/ ``` 使用 `nrm` 配置 `npm` 的镜像地址 `npm registry manager` 1. 安装 `nrm` ```Bash npm i -g nrm ``` 2. 修改镜像 ```Bash nrm use taobao ``` 3. 检查是否配置成功(选做) ```Bash npm config list ``` 检查 `registry` 地址是否为 `https://registry.npmmirror.com/`, 如果是则表明成功 > 补充说明: > - 建议使用第二种方式进行镜像配置,因为后续修改起来会比较方便 > - 虽然 `cnpm` 可以提高速度,但是 `npm` 也可以通过淘宝镜像进行加速,所以 `npm` 的使用率还是高于 `cnpm` ### 6.4 `yarn` `yarn` 是由 `Facebook` 在 2016 年推出的新的 `Javascript` 包管理工具,官方网址:https://yarnpkg.com/ `yarn` 特点: - 速度超快:`yarn` 缓存了每个下载过的包,所以再次使用时无需重复下载。同时利用并行下载以最大化资源利用率,因此安装速度更快。 - 超级安全:在执行代码之前,`yarn` 会通过算法校验每个安装包的完整性 - 超级可靠:使用详细、简洁的锁文件格式和明确的安装算法,`yarn` 能够保证在不同系统上无差异的工作 可以使用 `npm` 安装 `yarn` ```Bash npm i -g yarn ``` `yarn` 常用命令: | 命令 | 说明 | | -- | -- | | `yarn init` / `yarn init -y` | 初始化 | | `yarn add uniq` 生产依赖 <br> `yarn add less --dev` 开发依赖 <br> `yarn global add nodemon` 全局安装 | 安装包 | | `yarn remove uniq` 删除项目依赖包 <br> `yarn global remove nodemon` 全局删除包 | 删除包 | | `yarn`/`yarn install` | 安装项目依赖 | | `yarn` <别名> # 不需要添加 `run` | 运行命令别名 | 可以通过如下命令配置淘宝镜像 ```Bash yarn config set registry https://registry.npmmirror.com/ ``` 查看 `yarn` 的配置项 ```Bash yarn config list ``` `npm` 和 `yarn` 选择: - 个人项目:如果是个人项目, 哪个工具都可以 ,可以根据自己的喜好来选择 - 公司项目:如果是公司要根据项目代码来选择,可以 通过**锁文件**判断项目的包管理工具 - `npm` 的锁文件为 `package-lock.json` - `yarn` 的锁文件为 `yarn.lock` > 切记:包管理工具不要混着用 ### 6.5 管理发布包 可以将自己开发的工具包发布到 `npm` 服务上,方便自己和其他开发者使用,操作步骤如下: 1. 创建文件夹,并创建文件 `index.js`, 在文件中声明函数,使用 `module.exports` 暴露 2. `npm` 初始化工具包,`package.json` 填写包的信息 (包的名字是唯一的) 3. 注册账号:https://www.npmjs.com/signup 4. 激活账号(一定要激活账号) 5. 修改为官方的官方镜像(命令行中运行 `nrm use npm`) 6. 命令行下 `npm login` 填写相关用户信息 7. 命令行下 `npm publish` 提交包 后续可以对自己发布的包进行更新,操作步骤如下: 1. 更新包中的代码 2. 测试代码是否可用 3. 修改 `package.json` 中的版本号 4. 发布更新命令 `npm publish` 执行如下命令删除包 ```Bash npm unpublish --force ``` 删除包需要满足一定的条件,https://docs.npmjs.com/policies/unpublish - 是包的作者 - 发布小于 24 小时 - 大于 24 小时后,没有其他包依赖,并且每周小于 300 下载量,并且只有一个维护者 ### 6.6 `nvm` > `nvm` 全称 `Node Version Manager` 顾名思义它是用来管理 `Node` 版本的工具,方便切换不同版本的 `Node.js`。 > `nvm` 的使用非常的简单,跟 `npm` 的使用方法类似。 > 下载地址 https://github.com/coreybutler/nvm-windows/releases 常用命令: | 命令 | 说明 | | -- | -- | | `nvm list available` | 显示所有可以下载的 `Node.js` 版本 | | `nvm list` | 显示已安装的版本 | | `nvm install 18.12.1` | 安装 `18.12.1` 版本的 `Node.js` | | `nvm install latest` | 安装最新版的 `Node.js` | | `nvm uninstall 18.12.1` | 删除某个版本的 `Node.js` | | `nvm use 18.12.1` | 切换 `18.12.1` 的 `Node.js` | ## 7. `express` 框架 ### 7.1 介绍与使用 > `express` 是一个基于 `Node.js` 平台的极简、灵活的 `WEB` 应用开发框架,官方网址:`https://www.expressjs.com.cn/` > 简单来说,`express` 是一个封装好的工具包,封装了很多功能,便于我们开发 `web` 应用(`http` 服务) `express` 下载 `express` 本身是一个 `npm` 包,所以可以通过 `npm` 安装: ```Bash npm init npm i express ``` `express` 初体验: ```JavaScript // 1.引入模块 const express = require('express') // 2.创建服务 const app = express() // 3.创建路由 app.get('/hello', (req, resp) => { resp.end('hello world') }) // 4.启动服务并监听端口 app.listen(9000, () => { console.log('服务启动成功') }) ``` ### 7.2 路由 #### 7.2.1 路由初体验 > 官方定义:路由确定了应用程序如何响应客户端对特定端点的请求。 一个路由的组成有请求方法、路径、回调函数组成。 `express` 中提供了一系列方法,可以很方便的使用路由,使用格式如下: ```JavaScript app.<method>(path,callback) ``` 代码示例: ```JavaScript // 1.引入模块 const express = require('express') // 2.创建服务 const app = express() // 3.创建路由 // get 请求 app.get('/hello', (req, resp) => { resp.end('hello world') }) // 首页路由 app.get('/', (req, resp) => { resp.end('home') }) // post 请求 app.post('/login', (req, resp) => { resp.end('login') }) // 所有的请求方式都可以 app.all('/register', (req, resp) => { resp.end('register') }) // 404 app.all('*', (req, resp) => { resp.end(`<h1>404 Not Found</h1>`) }) // 4.启动服务并监听端口 app.listen(9000, () => { console.log('服务启动成功') }) ``` #### 7.2.2 获取请求参数 `express` 框架封装了一些 `API` 来方便获取请求报文中的数据,并且兼容原生 `http` 模块的获取方式.。 代码示例: ```JavaScript // 引入模块 const express = require('express') // 创建应用服务 const app = express() // 创建路由 app.get('/hello', (req, resp) => { // 原生方式 // console.log(req.method) // console.log(req.url) // console.log(req.httpVersion) // console.log(req.headers) // express 操作 console.log(req.path) console.log(req.query) // 获取请求ip console.log(req.ip) resp.end('hello world') }) // 监听端口,启动服务 app.listen(9000, () => { console.log('服务启动成功') }) ``` `express` 框架也可以获取到路由参数。路由参数指的是 `URL` 路径中的参数(数据)。 代码示例: ```JavaScript // 导入模块 const express = require('express') // 创建应用服务 const app = express() // 创建路由 app.get('/:id/:token', (req, resp) => { console.log(req.params.id, req.params.token) resp.end('hello world') }) // 监听端口,启动服务 app.listen(9000, () => { console.log('服务启动成功') }) ``` `express` 可以使用 `body-parser` 包处理请求体。 安装 `body-parser` ```Bash npm i body-parser ``` 代码示例: ```JavaScript /** * 需求: * GET /login 显示表单网页 * POST /login 获取表单中的『用户名』和『密码』 */ // 导入模块 const express = require('express') // 使用 body-parser 获取请求体数据 // 安装 body-parser // npm i body-parser // 导入 const bodyParser = require('body-parser') // 创建应用服务 const app = express() // 解析 json 请求格式的请求体中间件 const jsonParser = bodyParser.json() // 解析 queryString 请求格式的请求体中间件 const urlencodedParser = bodyParser.urlencoded({extended: false}) // 创建路由 app.get('/login', (req, resp) => { resp.sendFile(__dirname + '/11-form.html') }) app.post('/login', urlencodedParser, (req, resp) => { // 获取用户名和密码 console.log(req.body) resp.send('登录成功') }) app.all('*', (req, resp) => { resp.send(`<h1>404 Not Found</h1>`) }) // 监听端口,启动服务 app.listen(9000, () => { console.log('服务启动成功') }) ``` #### 7.2.3 设置响应 `express` 框架封装了一些 `API` 来方便给客户端响应数据,并且兼容原生 `http` 模块的获取方式。 代码示例: ```JavaScript // 引入模块 const express = require('express') // 创建应用服务 const app = express() // 创建路由 app.get('/hello', (req, resp) => { // 原生响应 // resp.statusCode = 404 // resp.statusMessage = 'Not Found' // resp.setHeader('aaaa', 'bbbb') // resp.write('hello express ') // express 操作 // resp.status(500) // resp.set('aaa', '123') // 自动返回 utf8 编码。此时无需再写 resp.end() // resp.send('hello express ') // 可以链式调用 resp.status(500).set('xxx', 'yyy').send('你好,世界') }) // 监听端口,启动服务 app.listen(9000, () => { console.log('服务启动成功') }) ``` 还可以设置其他响应: ```JavaScript // 导入模块 const express = require('express') // 创建应用服务 const app = express() // 创建路由 app.get('/hello', (req, resp) => { // resp.end('hello world') // 重定向 // resp.redirect('https://www.baidu.com') // 下载响应 // resp.download(__dirname + '/singers.json') // 返回json // resp.json({ // username: '张三', // age: 18 // }) // 返回文件内容 resp.sendFile(__dirname + '/2-form.html') }) // 监听端口,启动服务 app.listen(9000, () => { console.log('服务启动成功') }) ``` #### 7.2.4 路由模块化 对路由进行模块化,可以更好的管理路由。 `admin.js` 路由 ```JavaScript // 导入模块 const express = require('express') // 创建应用服务 const router = express() // 创建路由 router.get('/admin', (req, resp) => { resp.send('后台首页') }) router.get('/setting', (req, resp) => { resp.send('个人设置') }) module.exports = router ``` `home.js` 路由 ```JavaScript // 导入模块 const express = require('express') // 创建应用服务 const router = express() // 创建路由 router.get('/', (req, resp) => { resp.send('前台首页') }) router.get('/home', (req, resp) => { resp.send('home') }) module.exports = router ``` `index.js` 路由 ```JavaScript // 导入模块 const express = require('express') // 创建应用服务 const app = express() // 创建路由 // 导入路由 const admin = require('./routes/admin') const home = require('./routes/home') app.use(admin) app.use(home) app.all('*', (req, resp) => { resp.send(`<h1>404 Not Found</h1>`) }) // 监听端口,启动服务 app.listen(9000, () => { console.log('服务启动成功') }) ``` ### 7.3 中间件 > 中间件(`Middleware`)本质是一个回调函数。可以像路由回调一样访问请求对象(`request`),响应对象(`response`)。 > 中间件的作用就是使用函数封装公共操作,简化代码。 中间件有两种类型: - 全局中间件 - 路由中间件 #### 7.3.1 全局中间件 > 每一个请求到达服务端之后都会执行全局中间件函数。 代码示例: ```JavaScript /** * 需求: * 记录每个请求的 ip 和 url */ // 引入模块 const express = require('express') const fs = require('fs') const path = require('path') // 创建应用服务 const app = express() // 创建全局路由中间件 let globalMiddleware = (req, resp, next) => { // 获取 url 和 ip let {ip, url} = req // 使用追加的方式记录到日志文件 fs.appendFileSync(path.resolve(__dirname, './access.log'), `${ip} ${url} \r\n`) // 调用 next next() } // 使用全局路由中间件 app.use(globalMiddleware) // 创建路由 app.get('/home', (req, resp) => { resp.send('前台首页') }) app.get('/admin', (req, resp) => { resp.send('后台首页') }) app.all('*', (req, resp) => { resp.send(`<h1>404 Not Found</h1>`) }) // 监听端口,启动服务 app.listen(9000, () => { console.log('服务启动成功') }) ``` #### 7.3.2 路由中间件 如果只需要对某一些路由进行功能封装,则就需要路由中间件。 调用格式如下: ```JavaScript app.get('/路径',`中间件函数`,(request,response)=>{ }); app.get('/路径',`中间件函数1`,`中间件函数2`,(request,response)=>{ }); ``` 代码示例: ```JavaScript /** * 需求: * 针对 /admin /setting 的请求, 要求 URL 携带 code=521 参数, 如未携带提示『暗号错误』 */ // 引入模块 const express = require('express') // 创建应用服务 const app = express() // 创建路由中间件 let routerMiddleware = (req, resp, next) => { // 获取 code let { code } = req.query if (code !== '521') { resp.send('暗号错误') return; } next() } // 创建路由 app.get('/home', (req, resp) => { resp.send('前台首页') }) app.get('/admin', routerMiddleware, (req, resp) => { resp.send('后台首页') }) app.get('/setting', routerMiddleware, (req, resp) => { resp.send('个人设置') }) app.all('*', (req, resp) => { resp.send(`<h1>404 Not Found</h1>`) }) // 监听端口,启动服务 app.listen(9000, () => { console.log('服务启动成功') }) ``` #### 7.3.3 静态资源中间件 `express` 内置处理静态资源的中间件。 代码示例: ```JavaScript // 导入模块 const express = require('express') // 创建应用服务 const app = express() // 创建路由 app.get('/', (req, resp) => { resp.send('前台首页') }) // 静态资源中间件设置 // '/' 路径默认访问 idnex.html,如果与动态资源的请求路径一致时,谁先加载就谁先返回 app.use(express.static(__dirname + '/public')) app.all('*', (req, resp) => { resp.send(`<h1>404 Not Found</h1>`) }) // 监听端口,启动服务 app.listen(9000, () => { console.log('服务启动成功') }) ``` > 注意事项: >- index.html 文件为默认打开的资源 >- 如果静态资源与路由规则同时匹配,谁先匹配谁就响应 >- 路由响应动态资源,静态资源中间件响应静态资源 ### 7.4 `EJS` 模板引擎 > 模板引擎是分离**用户界面和业务数据**的一种技术。 > `EJS` 是一个高效的 `Javascript` 的模板引擎。官网: https://ejs.co/ 中文站:https://ejs.bootcss.com/ #### 7.4.1 `EJS` 初体验 下载安装 `EJS` ```Bash npm i ejs --save ``` ```JavaScript // 安装 ejs // npm i ejs // 导入模块 const ejs = require('ejs') const fs = require('fs') // 声明变量 let text = '中国' let weather = '艳阳高照,万里无云' let str = fs.readFileSync(__dirname + '/1-html.html').toString() let result = ejs.render(str, {text, weather}) console.log(result) ``` ```Html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <h1>我爱你<%= text %></h1></h1> <h2><%= weather %></h1></h1> </body> </html> ``` #### 7.4.2 `EJS` 常用语法 字符串输出 ```Html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <h1>我爱你<%= text %></h1></h1> <h2><%= weather %></h1></h1> </body> </html> ``` 列表渲染 ```Html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <ul> <% list.forEach( item => {%> <li><%= item %></li> <% })%> </ul> </body> </html> ``` 条件判断 ```Html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <% if (isLogin) { %> <span>欢迎回来</span> <% } else { %> <button>登录</button> <button>注册</button> <% } %> </body> </html> ``` ### 7.5 脚手架 > 脚手架:可以快速创建一个应用的框架,应用框架是指在项目开发过程中常用的目录或文件,比如:css目录、js目录等,以提高开发效率。 > `express-generator` 是实现 `express` 框架的脚手架。 安装 `express-generator` ```Bash npm i express-generator -g ``` 初始化 ```Bash express --view=ejs 项目包名 ``` `package.json` 文件 ```JSON { "name": "15-express-generator", "version": "0.0.0", "private": true, "scripts": { "start": "node ./bin/www" }, "dependencies": { "cookie-parser": "~1.4.4", "debug": "~2.6.9", "ejs": "~2.6.1", "express": "~4.16.1", "http-errors": "~1.6.3", "morgan": "~1.9.1" } } ``` 进入项目,安装依赖 ```Bash npm i ``` 启动项目 ```Bash npm start ``` 浏览器访问,端口默认是:`3000` `localhost:3000` ## 8. `MongoDB` ### 8.1 基础概念 > `MongoDB` 是一个基于**分布式文件存储**的数据库,官方地址:https://www.mongodb.com/,下载地址: https://www.mongodb.com/try/download/community > `MongoDB` 操作语法与 `JavaScript` 类似,容易上手,学习成本低。 `MongoDB` 中有三个重要概念需要掌握: - 数据库(`Database`) 是一个数据仓库,数据库服务下可以创建很多数据库,数据库中可以存放很多集合 - 集合(`Collection`) 集合类似于 `JS` 中的数组,在集合中可以存放很多文档 - 文档(`Document`) 文档是数据库中的最小单位,类似于 `JS` 中的对象 可以通过 `JSON` 文件来理解 `MongoDB` 中的概念: 一个 `JSON` 文件好比是一个数据库,一个 `Mongodb` 服务下可以有 `N` 个数据库;`JSON` 文件中的一级属性的数组值好比是集合;数组中的对象好比是文档对象中的属性,有时也称之为字段。 一般情况下,一个项目使用一个数据库,一个集合会存储同一种类型的数据。 ### 8.2 操作命令 #### 8.2.1 数据库命令 显示所有的数据库 ```Bash show dbs ``` 切换到指定的数据库,如果数据库不存在会自动创建数据库 ```Bash use 数据库名 ``` 显示当前所在的数据库 ```Bash db ``` 删除当前数据库 ```Bash use 库名 db.dropDatabase() ``` #### 8.2.2 集合命令 创建集合 ```Bash db.createCollection('集合名称') ``` 显示当前数据库中的所有集合 ```Bash show collections ``` 删除某个集合 ```Bash db.集合名.drop() ``` 重命名集合 ```Bash db.集合名.renameCollection('newName') ``` #### 8.2.3 文档命令 插入文档 ```Bash db.集合名.insert(文档对象) ``` 查询文档 ```Bash db.集合名.find(查询条件) ``` `_id` 是 `MongoDB` 自动生成的唯一编号,用来唯一标识文档 更新文档 ```Bash db.集合名.update(查询条件,新的文档) db.集合名.update({name:'张三'},{$set:{age:19}}) ``` 删除文档 ```Bash db.集合名.remove(查询条件) ``` ### 8.3 `Mongooose` #### 8.4.1 介绍与使用 > `Mongoose` 是一个 **对象文档模型库**,可以方便使用代码操作 `MongoDB` 数据库,官网 http://www.mongoosejs.net/。 代码示例: ```JavaScript // 1.导入 mongoose const mongoose = require('mongoose') // 设置 strictQuery 为 true mongoose.set('strictQuery', true) // 2.连接 mongodb 服务 mongoose.connect('mongodb://127.0.0.1:27017/test') // 3.设置连接成功的回调函数 mongoose.connection.once('open', () => { // 创建新文档 // 1、创建文档的结构模型 let bookSchema = new mongoose.Schema({ name: String, author: String, price: Number }); // 2、创建文档模型对象,用于操作文档 // book 就是集合名,mongoose 会默认加上 s,在mongodb数据库中显示的是 books let bookModel = mongoose.model('book', bookSchema); // 3、操作文档-新增 bookModel.create({ name: "海边的卡夫卡", author: '树上春树', price: 49 }, (err, data) => { // 判断是否有错误 if (err) { console.log('文档新增失败', err) return; } console.log('文档新增成功', data) }); console.log('连接成功') }) // 4.设置连接失败的回调函数 mongoose.connection.on('error', () => { console.log('连接失败') }) // 5.设置连接关闭的回调函数 mongoose.connection.on('close', () => { console.log('连接关闭') }) ``` #### 8.4.2 字段操作 文档结构可选的常用字段类型列表 | 类型 | 描述 | | -- | -- | | `String` | 字符串 | | `Number` | 数字 | | `Boolean` | 布尔值 | | `Array` | 数组,也可以使用 `[]` 来标识 | | `Date` | 日期 | | `Buffer` | `Buffer` 对象 | | `Mixed` | 任意类型,需要使用 `mongoose.Schema.Types.Mixed` 指定 | | `ObjectId` | 对象 `ID`,需要使用 `mongoose.Schema.Types.ObjectId` 指定 | | `Decimal128` | 高精度数字,需要使用 `mongoose.Schema.Types.Decimal128` 指定 | `Mongoose` 有一些内建验证器,可以对字段值进行验证 必填项 ```JSON name: { type: String, // 设置是否必填 // name: ValidatorError: Path `name` is required. required: true } ``` 默认值 ```JSON author: { type: String, // 设置默认值 default: '匿名' } ``` 枚举值 ```JSON tages: { type: String, // 枚举 // tages: ValidatorError: `架空` is not a valid enum value for path `tages`. enum: ['言情', '历史', '励志'] } ``` 唯一值 ```JSON name: { type: String, // 是否唯一 unique: true } ``` `unique` 需要**重建集合**才能有效果。 > 永远不要相信用户的输入! #### 8.4.3 增删改查 插入一条 ```JavaScript bookModel.create({ name: "海边的卡夫卡", author: '树上春树', price: 49 }, (err, data) => { // 判断是否有错误 if (err) { console.log('文档新增失败', err) return; } console.log('文档新增成功', data) }); ``` 批量插入 ```JavaScript bookModel.insertMany([{ name: '西游记', author: '吴承恩', price: 19.9, }, { name: '红楼梦', author: '曹雪芹', price: 29.9, }, { name: '三国演义', author: '罗贯中', price: 25.9, }, { name: '水浒传', author: '施耐庵', price: 20.9, }, { name: '活着', author: '余华', price: 19.9, }, { name: '狂飙', author: '徐纪周', price: 68, }, { name: '大魏能臣', author: '黑男爵', price: 9.9, }, { name: '知北游', author: '洛水', price: 59, }, { name: '道君', author: '跃千愁', price: 59, }, { name: '七煞碑', author: '游泳的猫', price: 29, }, { name: '独游', author: '酒精过敏', price: 15, }, { name: '大泼猴', author: '甲鱼不是龟', price: 26, }, { name: '黑暗王者', author: '古羲', price: 39, }, { name: '不二大道', author: '文刀手予', price: 89, }, { name: '大泼猴', author: '甲鱼不是龟', price: 59, }, { name: '长安的荔枝', author: '马伯庸', price: 45, }, { name: '命运', author: '蔡崇达', price: 59.8, }, { name: '如雪如山', author: '张天翼', price: 58, }, { name: '三体', author: '刘慈欣', price: 23, }, { name: '秋园', author: '杨本芬', price: 38, }, { name: '百年孤独', author: '范晔', price: 39.5, }, { name: '在细雨中呼喊', author: '余华', price: 25, }, ], (error, data) => { if (error) { console.log('批量新增失败', error) return } console.log('批量新增成功') }) ``` 删除一条数据 ```JavaScript bookModel.deleteOne({name: '西游记'}, (error, data) => { if (error) { console.log('删除文档失败', data) return } console.log('删除文档成功', data) }) ``` 批量删除 ```JavaScript bookModel.deleteMany({ name: '海边的卡夫卡' }, (error, data) => { if (error) { console.log('批量删除失败', error) return } console.log('批量删除成功', data) }) ``` 更新一条数据 ```JavaScript bookModel.updateOne({ name: '海边的卡夫卡' }, { name: '西游记', author: '吴承恩', price: 59 }, (error, data) => { if (error) { console.log('更新文档失败', error) return; } console.log('更新文档成功', data) }) ``` 批量更新数据 ```JavaScript bookModel.updateMany({ name: '海边的卡夫卡' }, { price: 89 }, (error, data) => { if (error) { console.log('批量更新文档失败', error) return } console.log('批量更新文档成功', data) }) ``` 查询一条数据 ```JavaScript bookModel.findOne({name: '西游记'}, (error, data) => { if (error) { console.log('读取单个文档错误', error) return } console.log('读取单个文档成功', data) }) ``` 批量查询数据 ```JavaScript bookModel.find({name: '西游记'}, (error, data) => { if (error) { console.log('文档读取错误', error) return; } console.log('文档读取成功', data) }) ``` #### 8.4.4 条件控制 在 `MongoDB` 不能 `>`、`<`、`>=`、`<=`、`!==` 等运算符,需要使用替代符号: `>` 使用 `$gt` `<` 使用 `$lt` `>=` 使用 `$gte` `<=` 使用 `$lte` `!==` 使用 `$ne` ```JavaScript // 获取价格 小于 20 的图书 bookModel.find({price: {$lt: 20}}, (error, data) => { if (error) { console.log('文档读取错误', error) return; } console.log('文档读取成功', data) }) ``` 逻辑运算 `$or` 逻辑或的情况 ```JavaScript //曹雪芹 或者 余华的书 bookModel.find({ $or: [ { author: '曹雪芹' }, { author: '余华' } ] }, (error, data) => { if (error) { console.log('文档读取错误', error) return } console.log('文档读取成功', data) }) ``` `$and` 逻辑与的情况 ```JavaScript //价格大于等于 30 且小于 70 bookModel.find({ $and: [ { price: { $gte: 30 } }, { price: { $lt: 70 } } ] }, (error, data) => { if (error) { console.log('文档读取错误', error) return; } console.log('文档读取成功', data) }) ``` 正则匹配 条件中可以直接使用 `JS` 的正则语法,通过正则可以进行模糊查询 ```JavaScript //正则表达式, 搜索书籍名称中带有 `三` 的图书 let queryCondition = '三' bookModel.find({name: /三/}, (error, data) => { if (error) { console.log('文档读取错误', error) return; } console.log('文档读取成功', data) }) bookModel.find({name: new RegExp(queryCondition)}, (error, data) => { if (error) { console.log('文档读取错误', error) return; } console.log('文档读取成功', data) }) ``` #### 8.4.5 个性化读取 字段筛选 ```JavaScript // 只查询 书名 作者 // 1:查询 0:不查询 bookModel.find().select({name: 1, author: 1, _id: 0}).exec((error, data) => { if (error) { console.log('文档读取错误', error) return } console.log('文档读取成功', data) }) ``` 数据排序 ```JavaScript // 对数据进行排序 // 1:升序 -1:降序 bookModel.find({author: '余华'}).select({name: 1, price: 1}).sort({price: -1}).exec((error, data) => { if (error) { console.log('文件读取错误', error) return } console.log(data) }) ``` 数据截取 ```JavaScript // 数据列表集合截取 // 可用于分页 bookModel.find() .select({name: 1, author: 1, _id: 0}) .sort({price: -1}) .skip(2) .limit(3) .exec((error, data) => { if (error) { console.log('文件读取错误', error) return } console.log(data) }) ``` ## 9. 接口 ### 9.1 `RESTful API` `RESTful API` 是一种特殊风格的接口,主要特点有如下几个: - `URL` 中的路径表示资源 ,路径中不能有动词 ,例如 `create` , `delete` , `update` 等这些都不能有 - 操作资源要与 `HTTP` 请求方法对应 - 操作结果要与 `HTTP` 响应状态码对应 规则示例: | 操作 | 请求类型 | URL | | -- | -- | -- | | 新增歌曲 | `POST` | `/song` | | 删除歌曲 | `DELETE` | `/song/10` | | 修改歌曲 | `PUT` | `/song/10` | | 修改歌曲 | `PATCH` | `/song/10` | | 获取所有歌曲 | `GET` | `/song` | | 获取单个歌曲 | `GET` | `/song/10` | ### 9.2 `json-server` > `json-server` 本身是一个 `JS` 编写的工具包,可以快速搭建 `RESTful API` 服务。 官方地址: https://github.com/typicode/json-server 操作步骤: 全局安装 `json-server` ```Bash npm i -g json-server ``` 创建 `JSON` 文件(`db.json`),编写基本结构 ```JSON { "song": [ { "id": 1, "name": "干杯", "singer": "五月天" }, { "id": 2, "name": "当", "singer": "动力火车" }, { "id": 3, "name": "不能说的秘密", "singer": "周杰伦" } ] } ``` 以 `JSON` 文件所在文件夹作为工作目录,执行如下命令 ```Bash json-server --watch db.json ``` 默认监听端口为 `3000` ## 10. 会话控制 > 所谓会话控制就是对会话进行控制。`HTTP` 是一种无状态的协议,它没有办法区分多次的请求是否来自于同一个客户端,无法区分用户而产品中又大量存在的这样的需求,所以我们需要通过**会话控制**来解决该问题。 常见的会话控制技术有三种: - `cookie` - `session` - `token` ### 10.1 `cookie` > `cookie` 是 `HTTP` 服务器发送到用户浏览器并保存在本地的一小块数据,**保存在浏览器端**的一小块数据且是按照域名划分保存的。 `express` 中可以使用 `cookie-parser` 来进行对 `cookie` 的操作。 示例代码: ```JavaScript // 导入express const express = require('express') const cookieParser = require('cookie-parser') // 创建应用对象 const app = express() app.use(cookieParser()) // 创建路由 app.get('/', (req, resp) => { resp.send('home') }) // 设置cookie app.get('/set-cookie', (req, resp) => { // 在浏览器关闭时会销毁 // resp.cookie('name', 'zhangsan') // 设置 cookie 的过期时间。设置一分钟以后过期 resp.cookie('name', 'lisi', {maxAge: 60 * 1000}) resp.send('hello world') }) // 获取 cookie app.get('/get-cookie', (req, resp) => { console.log(req.cookies) resp.send(`欢迎您${req.cookies.name}`) }) // 删除 cookie app.get('/remove-cookie', (req, resp) => { resp.clearCookie('name') resp.send('删除cookie成功') }) // 监听端口,启动服务 app.listen(3000, () => { console.log('服务启动成功') }) ``` > 不同浏览器中的 `cookie` 是相互独立的,不共享。 ### 10.2 `session` > `session` 是保存在**服务器端**的一块儿数据 ,保存当前访问用户的相关信息。 `express` 中可以使用 `express-session` 对 `session` 进行操作。 示例代码: ```JavaScript // 引入模块 const express = require('express') const session = require('express-session') const MongoStore = require('connect-mongo') // 创建应用服务 const app = express() // 设置 session 的中间件 app.use(session({ // 设置 cookie 的 name,默认值是:connect.sid name: 'sid', // 参与加密的字符串(又称签名) 加盐 secret: '123456', // 是否为每次请求都设置一个cookie用来存储session的id saveUninitialized: false, // 是否在每次请求时重新保存session 20 分钟 4:00 4:20 resave: true, store: MongoStore.create({ //数据库的连接配置 mongoUrl: 'mongodb://127.0.0.1:27017/test' }), cookie: { // 开启后前端无法通过 JS 操作 httpOnly: true, // 这一条 是控制 sessionID 的过期时间的!!! 5分钟过期 maxAge: 5 * 60 * 1000 } })) // 创建路由 app.get('/', (req, resp) => { resp.send('home') }) // 登录时设置 session app.get('/login', (req, resp) => { // 校验一下用户名密码是否正确 if (req.query.username === 'admin' && req.query.password === 'admin') { // 设置 session 信息 req.session.username = req.query.username req.session.uid = '258aefccc' resp.send('登录成功') } else { resp.send('登录失败') } }) // 获取 session app.get('/cart', (req, resp) => { // 检测 session 是否存在用户信息 if (req.session.username) { resp.send(`欢迎您${req.session.username}`) } else { resp.send('请先登录') } }) // 退出登录删除 session app.get('/logout', (req, resp) => { req.session.destroy(() => { resp.send('成功退出登录') }) }) // 监听端口,启动服务 app.listen(3000) ``` **`session` 和 `cookie` 的区别** `cookie` 和 `session` 的区别主要有如下几点: - 存在的位置 - `cookie`:浏览器端 - `session`:服务端 - 安全性 - `cookie` 是以明文的方式存放在客户端的,安全性相对较低 - `session` 存放于服务器中,所以安全性**相对较好** - 网络传输量 - `cookie` 设置内容过多会增大报文体积,会影响传输效率 - `session` 数据存储在服务器,只是通过 `cookie` 传递 `id`,所以不影响传输效率 - 存储限制 - 浏览器限制单个 `cookie` 保存的数据不能超过 `4K`,且单个域名下的存储数量也有限制 - `session` 数据存储在服务器中,所以没有这些限制 ### 10.3 `token` > `token` 是服务端生成并返回给 `HTTP` 客户端的一串加密字符串, `token` 中保存着用户信息。 `token` 的特点: - 服务端压力更小 - 数据存储在客户端 - 相对更安全 - 数据加密 - 可以避免 `CSRF`(跨站请求伪造) - 扩展性更强 - 服务间可以共享 - 增加服务节点更简单 `JWT`(`JSON Web Token`)是目前最流行的跨域认证解决方案,可用于基于 `token` 的身份验证 `JWT` 使 `token` 的生成与校验更规范,可以使用 jsonwebtoken 包 来操作 `token`. 代码操作: ```JavaScript // 引入 jwt const jwt = require('jsonwebtoken') // 生成 token // jwt.sign(用户数据,加密字符串,配置对象) let token = jwt.sign({ username: 'admin' }, '123456', { // 单位秒 60秒后过期 expiresIn: 60 }) // eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNjg1NTE5NTkzLCJleHAiOjE2ODU1MTk2NTN9.IP90SEMbkzaBGnxVDoq63IHWzQ8crbfapvYCylGZhhg console.log(token) // 校验 token jwt.verify(token, '123456', (error, data) => { if (error) { console.log('token 校验失败', error) return } console.log(data) }) ```
Node.js 学习教程
nodejs,express,javascript,mongodb,mongoose
2023-05-19T01:08:15Z
2023-05-31T10:08:50Z
null
1
0
19
0
0
2
null
Apache-2.0
JavaScript