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
the-faizmohammad/Project-To-Do-List
main
<a name="readme-top"></a> <div align="center"> <br/> <h3><b>Project: To do List</b></h3> </div> # 📗 Table of Contents - [📖 About the Project](#about-project) - [🛠 Built With](#built-with) - [Tech Stack](#tech-stack) - [Key Features](#key-features) - [💻 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) - [❓ FAQ (OPTIONAL)](#faq) - [📝 License](#license) # To-do List <a name="about-project"></a> **Project To Do List!** Welcome to the repository for our Project To do List! This repository contains the code and assets for To do list application."To-do list" is a tool that helps to organize your day. It simply lists the things that you need to do and allows you to mark them as complete. ## 🛠 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/Web/HTML">HTML</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/Javascript">Javascript</a></li> </ul> </details> <details> <summary>Server</summary> <ul> <li>N/A</li> </ul> </details> <details> <summary>Database</summary> <ul> <li>N/A</li> </ul> </details> ### Key Features <a name="key-features"></a> - **function to iterate over the tasks array and populate an HTML list item element for each task.** - **Engaging and interactive design** - **On page load, rendered the dynamically created list of tasks in the dedicated placeholder.** <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: - You need to have NodeJS installed - A Web Browser (Google Chrome, Firefox, etc) - A Code Editor (Notepad++, VSCode, etc) ### Setup Clone this repository to your desired folder: ``` git clone yourlink repo [https://github.com/the-faizmohammad/Project-To-Do-List] cd your folder name ``` ### Install Install this project with: ``` npm install ``` ### Usage To run the project, execute the following command: npm run build ### Run tests To run tests, run the following command: npm run dev ### Deployment Coming Soon <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 👥 Authors <a name="authors"></a> 👤 **Faiz Mohammad ** - GitHub: [@githubhandle](https://github.com/the-faizmohammad) - Twitter: [@twitterhandle](https://twitter.com/FaizMoh58742600) - LinkedIn: [LinkedIn](https://twitter.com/FaizMoh58742600) - <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🔭 Future Features <a name="future-features"></a> - [ ] **Add a hello animated illustration** <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](https://github.com/the-faizmohammad/Project-To-Do-List/issues) <p align="right">(<a href="#readme-top">back to top</a>)</p> ## ⭐️ Show your support <a name="support"></a> If you like this project give me a star. <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🙏 Acknowledgments <a name="acknowledgements"></a> Special thanks Microverse. <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 📝 License <a name="license"></a> This project is [MIT](./MIT.md) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
"Streamline your day with To-Do List Manager! This ES6 and Webpack-powered website allows effortless task organization and completion tracking.
es6-javascript,html-css,javascript,npm,webpack
2023-07-18T15:44:01Z
2023-07-27T23:52:59Z
null
1
4
128
0
0
10
null
null
JavaScript
cptntotoro/java-explore-with-me
main
# Explore with me - микросервисное приложение-афиша мероприятий Java, Spring (Boot, Data, Security, MVC), PostgreSQL, REST API, Docker, Mockito, JUnit, Postman, MapStruct, Lombok, Thymeleaf, JavaScript, CSS, HTML ## О проекте Приложение для размещения мероприятий и поиска компаний для участия в них <p align="center"> <img src="https://pictures.s3.yandex.net/resources/S19_09-2_1674558748.png" /> </p> Приложение содержит два микросервиса: - main-service для бизнес-логики - stats-service для сбора статистики просмотра событий по ip, который состоит из трех модулей <p align="center"> <img src="https://pictures.s3.yandex.net/resources/S18_01_1674662618.png" /> </p> У каждого микросервиса есть своя база данных. Микросервисы и базы данных запускаются в собственных Docker контейнерах (4 шт). ## Основная функциональность: ### Неавторизованные пользователи - просматривать все события, в том числе по категориям - видеть детали отдельных событий - видеть закрепленные подборки событий ### Авторизованные пользователи - добавление в приложение новые мероприятия, редактировать их и просматривать после добавления - подача заявок на участие в интересующих мероприятиях - создатель мероприятия может подтверждать заявки, которые отправили другие пользователи сервиса ### Администраторы - добавление, изменение и удаление категорий для событий - добавление, удаление и закрепление на главной странице подборки мероприятий - модерация событий, размещённых пользователями, — публикация или отклонение - управление пользователями — добавление, активация, просмотр и удаление ## Эндпоинты ### main-service - POST /users/{userId}/events - добавить новое событие - GET /users/{userId}/events/{eventId} - получить событие - PATCH /users/{userId}/events/{eventId} - изменить событие - GET /users/{userId}/events - получить события пользователя - GET /users/{userId}/events/{eventId}/requests - получить запросы пользователя на участие в событии - PATCH /users/{userId}/events/{eventId}/requests - изменить статус (подтверждение, отмена) заявок на участие пользователя в событии <br> - GET /categories - получить все категории - GET /categories/{catId} - получить категорию <br> - GET /compilations - получить все подборки событий - GET /compilations/{compId} - получить подборку событий <br> - GET /admin/events - получить события по любым параметрам: - users - список id пользователей - states - список статусов события (PENDING, PUBLISHED, CANCELED) - categories - список id категорий событий - rangeStart - начало временного отрезка в формате yyyy-MM-dd HH:mm:ss - rangeEnd - конец временного отрезка в формате yyyy-MM-dd HH:mm:ss - from - параметр для пагинации - size - параметр для пагинации - PATCH /admin/events/{eventId} - изменить событие <br> - GET /events - получить события по любым параметрам: - text - текст для поиска в названии и описании событий - categories - список id категорий событий - paid - только платные события (true/false) - rangeStart - начало временного отрезка в формате yyyy-MM-dd HH:mm:ss - rangeEnd - конец временного отрезка в формате yyyy-MM-dd HH:mm:ss - onlyAvailable - только доступные события, т.е. у которых еще не исчерпан лимит участников (true/false) - sort - способ сортировки событий (EVENT_DATE, VIEWS) - from - параметр для пагинации - size - параметр для пагинации - GET /events/{id} - получить событие <br> - POST /users/{userId}/requests - добавить запрос на участие в событии - GET /users/{userId}/requests - получить запросы пользователя на участие в событиях - DELETE /users/{userId}/requests/{requestId}/cancel - отменить запрос на участие в событии <br> - POST /users/{userId}/events/{eventId}/comments - добавить комментарий к событию - PATCH /users/{userId}/events/{eventId}/comments/{commentId} - обновить комментарий - GET /users/{userId}/events/{eventId}/comments/{commentId} - получить комментарий к событию - DELETE /users/{userId}/events/{eventId}/comments/{commentId} - удалить комментарий к событию - GET /users/{userId}/events/{eventId}/comments - получить список комментариев пользователя к событию - GET /users/{userId}/comments - получить все комментарии пользователя <br> - POST /admin/users - добавить пользователя - GET /admin/users - получить всех пользователей - DELETE /admin/users/{userId} - удалить пользователя - POST /admin/compilations - добавить подборку событий - DELETE /admin/compilations/{compId} - удалить подборку событий - PATCH /admin/compilations/{compId} - обновить подборку событий - POST /admin/categories - добавить новую категорию - GET /admin/categories/{catId} - получить категорию событий - DELETE /admin/categories/{catId} - удалить категорию - GET /admin/comments - получить комментрии по любым параметрам: - text - текст для поиска в содержании комментария - users - список id пользователей - events - список id событий - statuses - статусы событий (PENDING, PUBLISHED, DELETED) - rangeStart - начало временного отрезка в формате yyyy-MM-dd HH:mm:ss - rangeEnd - конец временного отрезка в формате yyyy-MM-dd HH:mm:ss - from - параметр для пагинации - size - параметр для пагинации - PATCH /admin/comments - изменить статусы комментариев <br> ### stats-service - GET /stats - Получение статистики по посещениям - POST /hit - Сохранение информации о том, что на uri конкретного сервиса был отправлен запрос пользователем ## Как использовать: Ознакомиться с примерами использования можно в [этой коллекции тестов Postman](https://github.com/yandex-praktikum/java-explore-with-me/tree/main_svc/postman)
Микросервисное приложение-афиша мероприятий (Java, Spring (Boot, Data, Security, MVC), PostgreSQL, REST API, Docker, Mockito, JUnit, Postman, MapStruct, Lombok, Thymeleaf, JavaScript, CSS, HTML)
docker,java,junit,lombok,mapstruct,mockito,postgresql,rest-api,spring-boot,spring-jpa
2023-07-12T14:40:20Z
2023-12-20T15:51:48Z
null
1
7
43
2
0
10
null
null
Java
efeturkemir/Shoe-Market
master
# ShoeMarket - Fullstack E-Commerce for Shoes ShoeMarket is a fullstack web market application for buying and selling shoes. It allows users to browse and purchase shoes, leave comments and reviews, and add their favorite shoes to their list. ![ShoeMarket Screenshot](screenshot-2.png) ## Table of Contents - [Features](#features) - [Demo](#demo) - [Technologies Used](#technologies-used) - [Getting Started](#getting-started) - [Setup](#setup) - [Usage](#usage) - [Contributing](#contributing) - [License](#license) ## Features - Browse a wide variety of shoes available for purchase - View detailed information about each shoe, including images, price, and description - Add shoes to the cart and complete the checkout process - Leave comments and reviews on shoes - Add shoes to the user's favorites list - User registration and login functionality - Responsive design for mobile and desktop devices ## Demo A live demo of ShoeMarket is available at [shoe-market-25f4a.web.app](shoe-market-25f4a.web.app) ## Technologies Used - Vue.js 3 - Frontend framework for building user interfaces - Tailwind CSS - Utility-first CSS framework for styling - Express.js - Backend framework for handling API requests - Firebase - Cloud-based platform for hosting and backend services - MongoDB - Document-oriented database for data storage - Mongoose - MongoDB object modeling for Node.js - Splide.js - Lightweight and flexible carousel/slider library - JSON Web Token (JWT) - Security technology for authentication and data exchange - Pinia - We've used Pinia for state management, making our application's data flow smooth and efficient. ## Getting Started To get a local copy of the project up and running on your machine, follow the steps below. ### Prerequisites - Node.js and npm installed on your machine - Firebase account and project set up ### Setup 1. Clone the repository: ```bash git clone https://github.com/efeturkemir/Shoe-Market.git cd Shoe-Market ``` 2. Install dependencies: ```bash npm install ```
A sleek e-commerce platform for shoe enthusiasts, built with Vue.js, Express.js, Firebase, MongoDB and Pinia for a responsive, feature-rich shopping experience.👟
api,crud,express,javascript,ecommerce,full-stack
2023-07-06T20:48:29Z
2024-02-19T18:19:57Z
null
1
0
13
0
2
10
null
null
Vue
mariegrace31/Meal_Gallery
main
<a name="readme-top"></a> <div align="center"> <img src="./assets/meal-galery-logo.gif" alt="logo" width="140" height="140" /> # **Meal Gallery** Meal Gallery is an innovative app that allows you to discover a variety of delicious meals from around the world. Whether you're an experienced chef or simply a food enthusiast, this app is perfect for you. --- <br/> <br/> <br/> </div> <!-- TABLE OF CONTENTS --> ## <b>Table of Contents 📗 - [Built With 🛠](#built-with) - [Key Features 🏷️](#key-features) - [Screenshot 📷](#screenshot) - [Live Demo🚀](#live-demo) - [Prerequisites 🧱](#prerequisites) - [Setup ⚙️](#setup) - [Install 🏗️](#install) - [Usage 📂](#usage) - [Author 👤](#author) - [Contributing 🤝](#contributing) - [Show your support 🌟](#support) - [Acknowledgements 🙏](#acknowledgements) - [FAQ ❓](#fap) - [License 📝](#license) </b><br><br><br><br> --- <!-- BUILT WITH --> ## **Built With 🛠**<a name="built-with"></a><br> <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="https://www.w3schools.com/css/css_grid.asp">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> <li><a href="https://webpack.js.org">Webpack</a></li> </ul> <br> --- <!-- KEY FEATURES --> ### **Key Features 🏷️** <a name="key-features"></a> The Meal Gallery app showcases mouthwatering images of appetizing dishes accompanied by detailed descriptions. You can explore various categories such as main courses, desserts, regional specialties, and much more. <p align="right">(<a href="#readme-top">back to top</a>)</p> <br> --- <!-- SCREENSHOT --> ### **Screenshot 📷**<a name="screenshot"></a> Below is an overview of the app. <br> <div align="center"> <img src="./assets/app_screenshot.png" alt="Meal Gallery Screenshot" max-width="300" max-height="320" border="4px solid gray" /> </div><br> <p align="right">(<a href="#readme-top">back to top</a>)</p> --- <!-- LIVE DEMO --> ## <b>Live Demo 🚀</b><a name="live-demo"></a> This project is hosted on GitHub pages, so if you want to check it online, please click 😊 [here](https://mariegrace31.github.io/Meal_Gallery/dist/). [This](https://drive.google.com/file/d/1AAFWmUOx9na2bKIq-XzLGXzdCfLEvt1G/view?usp=sharing) is our video presentation. <p align="right">(<a href="#readme-top">back to top</a>)</p> --- <!-- PREREQUISITIES --> ## **Prerequisites 🧱**<a name="prerequisites"></a> In order to run this project you need: - A Github account - Node JS - Webpack - 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> --- <!-- SETUP --> ## **Setup ⚙️**<a name="setup"></a> Clone this repository:<br> ```sh git clone https://github.com/mariegrace31/Meal_Gallery.git ``` Navigate to the folder ``` cd Meal_Gallery ``` Checkout the branch ``` git checkout main ``` <br> --- <!-- INSTALL --> ## ** 🏗️**<a name="install"></a> Install all dependencies: ```sh npm install ``` Run the following code to fixed possible JavaScript linter errors: ``` npx eslint . --fix ``` --- <!-- USAGE --> ## **Usage 📂**<a name="usage"></a> Open page in browser ```sh $ open dist/index.html ``` <p align="right">(<a href="#readme-top">back to top</a>)</p> --- <!-- AUTHORS --> ## **Authors 👤**<a name="author"></a> You can reach us using these following links: - Twitter: [@nelly_telli](https://twitter.com/nelly_telli) - LinkedIn: [Nelly T.](https://www.linkedin.com/in/nelly-t-330414266/): - Twitter: [@mariegracebmg](https://twitter.com/mariegracebmg) - LinkedIn: [Marie Grâce Bahati](https://www.linkedin.com/in/marie-gr%C3%A2ce-bahati-546765224/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <br> --- <!-- CONTRIBUTING --> ## **Contributing 🤝**<a name="contributing"></a> If you have suggestions 📝, ideas 🤔, or bug reports 🐛, please feel free to open an [issue](https://github.com/mariegrace31/Meal_Gallery/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> --- <!-- SUPPORT --> ## **Show your support 🌟**<a name="support"></a> Thank you for taking the time to explore my GitHub project! Your support means a lot to ux. If you find my project valuable and would like to contribute, here are a few ways you can support me: - **Star the project ⭐️**: Show your appreciation by starring this GitHub repository. It helps increase visibility and lets others know that the project is well-received. - **Fork the project 🍴 🎣**: 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. - **Share with others 🗺️**: 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> --- <!-- ACKNOWLEDGEMENTS --> ## **Acknowledgments 🙏**<a name="acknowledgements"></a> We would like to express our sincere gratitude to [Microverse](https://github.com/microverseinc), the dedicated reviewers, and collaborators. Your unwavering support, and feedbacks 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> --- <!-- FAQ --> ## **FAQ ❓**<a name="faq"></a> - **What is Webpack** - Webpack is a free and open-source module bundler for JavaScript. It is made primarily for JavaScript, but it can transform front-end assets such as HTML, CSS, and images if the corresponding loaders are included. - **Why should we use Webpack** - Webpack goes through your package and creates what it calls a dependency graph which consists of various modules which your webapp would require to function as expected. Then, depending on this graph, it creates a new package which consists of the very bare minimum number of files required, often just a single bundle.js file which can be plugged in to the html file easily and used for the application. It makes our code shorter, cleaner and compiles different javascript module. <p align="right">(<a href="#readme-top">back to top</a>)</p> <br> --- <!-- 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>
Meal Gallery is an innovative app that allows you to discover a variety of delicious meals from around the world. Whether you're an experienced chef or simply a food enthusiast, this app is perfect for you.
es6-modules,javascript,webpack,gitflow
2023-07-03T13:16:49Z
2023-07-08T17:35:03Z
null
2
10
74
0
0
10
null
MIT
JavaScript
Alok-2002/AdGuardian
main
# AdGuardian AdGuardian is a powerful ad blocker for web browsers that allows you to enjoy a seamless and ad-free browsing experience. This repository contains all the necessary information and resources to install and use AdGuardian on Mozilla Firefox, Opera, and Microsoft Edge browsers. ## Installation To install AdGuardian on your preferred browser, follow the instructions below: ### Mozilla Firefox 1. Visit the [Mozilla Firefox Add-ons](https://addons.mozilla.org/) website. 2. Search for "AdGuardian" in the search bar. 3. Click on the "Add to Firefox" button next to the AdGuardian extension. 4. Confirm the installation by clicking "Add" when prompted. 5. AdGuardian will be installed and activated on your Firefox browser. ### Opera 1. Open the Opera browser. 2. Go to the Opera Extensions website. 3. Search for "AdGuardian" in the search bar. 4. Click on the "Add to Opera" button next to the AdGuardian extension. 5. AdGuardian will be installed and activated on your Opera browser. ### Microsoft Edge 1. Launch the Microsoft Edge browser. 2. Go to the Microsoft Edge Add-ons website. 3. Search for "AdGuardian" in the search bar. 4. Click on the "Get" button next to the AdGuardian extension. 5. Confirm the installation by clicking "Add extension" when prompted. 6. AdGuardian will be installed and activated on your Microsoft Edge browser. ## Usage Once AdGuardian is installed and activated on your browser, it will automatically block ads on websites, enhancing your browsing experience. You don't need to configure any settings to get started. If you encounter any issues or have specific requirements, you can access the AdGuardian settings by following these steps: 1. Click on the browser menu (typically represented by three horizontal lines or dots) in the top-right corner of the browser window. 2. Navigate to the Extensions or Add-ons section. 3. Find AdGuardian in the list of installed extensions. 4. Click on the options or settings button associated with AdGuardian. 5. Customize your ad-blocking preferences and behavior as desired. ## Contributions Contributions to the AdGuardian project are welcome! If you would like to contribute, please follow these steps: 1. Fork this repository. 2. Make your desired changes or improvements. 3. Submit a pull request detailing your changes. 4. Your contribution will be reviewed and merged if it meets the project's guidelines and quality standards. Please ensure that you adhere to the [Code of Conduct](CODE_OF_CONDUCT.md) when contributing to this project. ## License AdGuardian is licensed under the [Mozilla License](LICENSE). Feel free to use, modify, and distribute this software in accordance with the terms of the license. ## Support If you need any assistance or have any questions regarding AdGuardian, please refer to the following resources: - [Documentation](https://github.com/alok-2002/Adguardian) - [Issue Tracker](https://github.com/alok-2002/adguardian/issues) - [Community Forums](https://soulfulscribbles.tech) You can also reach out to the AdGuardian team via email at [sharmaalok02gwl@gmail.com](mailto:sharmaalok02gwl@gmail.com). ## Disclaimer AdGuardian is provided "as is" without any warranty or guarantee. The developers and contributors of this project are not responsible for any damages or consequences caused by the use of this software. Happy ad-free browsing with AdGuardian!
AdGuardian is a powerful adblocker that efficiently blocks ads across various online platforms.
adblocker,alok,alok-2002,alok-sharma,block-ads,chrome-extension,javascript,js,manifest,microsoft-edge-extension
2023-07-02T09:49:24Z
2023-07-12T04:52:23Z
2023-07-02T10:01:53Z
1
0
18
0
0
10
null
MPL-2.0
JavaScript
c99rahul/react-toast
main
# React Toast Notifications ![React Toast Demo](react-toast-demo.gif) This demonstration showcases a straightforward implementation of toast notifications in React, without the need for any additional dependencies. The implementation primarily relies on the `useState` and `useEffect` React hooks. It also provides intuitive positioning options for notifications, including all four positions on the screen. The toast notifications are intelligently aligned based on their specified position. ## Key features - Designed for handling multiple notifications. - Functions effectively with various positions on the screen. - Supports automatic deletion of toasts after a specified duration. - Easily add your own notification types. - Styled with pure CSS, no additional frameworks required - Supports SVG icons; icons utilized are from [FontAwesome](https://fontawesome.com/search?o=r&m=free) - No extra React dependencies are necessary whatsoever To get started, clone the repository, navigate to the cloned directory, and execute `npm i` to install the essential React dependencies. Use `npm run dev` to run the application. Alternatively, you can explore this [StackBlitz demo](https://stackblitz.com/edit/vitejs-vite-qhqmg5?file=src%2FApp.jsx) to see the implementation in action without the need for a local installation.
React toast notifications without additional dependencies
javascript,react,reactjs,toast,toast-notifications
2023-07-03T20:17:21Z
2023-07-06T11:33:46Z
null
1
0
3
0
0
10
null
MIT
JavaScript
adamsyy/cheatGPT
master
# CheatGpt The ultimate AI detection bypass tool. We remove AI detection from content generated by ChatGPT and other AI language models. ![image](https://github.com/adamsyy/cheatGPT/assets/75473780/339cc9a7-22fc-4be7-9fbb-051064646ab8) ![image](https://github.com/adamsyy/cheatGPT/assets/75473780/c1a1f353-ffed-407c-8f28-ea09abfedbf3) ## Features ### Free Account - **15 Free Tries:** With a free account, you can access CheatGPT and use it for 15 free attempts. ### Premium Account - **Unlimited Word Count:** Our premium feature allows you to generate text with an unlimited word count. - **Unlimited Prompts:** You can use as many prompts as you need to get the content you want. - **Secure Payment:** Your payment for the premium features is secured with Stripe, ensuring a safe and reliable transaction. ## Getting Started To get started with CheatGPT, simply sign up for a free account on our platform. You'll have 15 free tries to experience the power of our text generation tool. If you find it useful and want access to unlimited word count and prompts, you can upgrade to the premium account for just $5. ## Usage 1. Sign up for a free or premium account. 2. Log in to your account. 3. Start generating text with your chosen word count and prompts. ## Feedback and Support If you have any questions, encounter issues, or would like to provide feedback, please use the feedback form provided in the website. ## Repo Activity ![Alt](https://repobeats.axiom.co/api/embed/26b7312b78b18058defbc3ee2b8ab786ae0137f8.svg "Repobeats analytics image") Thank you for using CheatGPT! ---
The ultimate AI detection bypass tool.
artificial-intelligence,chatgpt,javascript,reactjs,ai-detection-bypasser
2023-07-14T19:31:06Z
2024-01-22T05:44:57Z
null
2
9
81
0
4
10
null
null
JavaScript
siaikin/vue-to-print
master
# vue-to-print You've created a Vue component and would love to give end users the ability to print out the contents of that component. This package aims to solve that by popping up a print window with CSS styles copied over as well. ![npm](https://img.shields.io/npm/v/vue-to-print?style=flat-square) ![npm](https://img.shields.io/npm/dm/vue-to-print?style=flat-square) ![NPM](https://img.shields.io/npm/l/vue-to-print?style=flat-square) [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release&style=flat-square)](https://github.com/semantic-release/semantic-release) [![Netlify Status](https://api.netlify.com/api/v1/badges/133df312-97ec-411b-816e-52ee0bd49808/deploy-status?style=flat-square)](https://app.netlify.com/sites/vue-to-print/deploys) ## What is this? This is the Vue 3.x version of [ReactToPrint](https://github.com/gregnb/react-to-print). > Thanks to the [contributors](https://github.com/gregnb/react-to-print/graphs/contributors) of `ReactToPrint` whose work made this package possible. VueToPrint aims to be as consistent as possible with ReactToPrint so that you can use the same API. However, there are some differences due to the differences between Vue 3.x and React. ## Documentation - [Online Documentation](https://vue-to-print.netlify.app/) ## Thanks ![JetBrains Logo (Main) logo](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg) > Thank JetBrains for providing an [open-source license](https://jb.gg/OpenSourceSupport), which allows me to use such an excellent IDE. ## License [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsiaikin%2Fvue-to-print.svg?type=large&issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsiaikin%2Fvue-to-print?ref=badge_large&issueType=license)
Print Vue components in the browser. Supports Chrome, Safari, Firefox and EDGE
print,printer,typescript,vue3,javascript,webcomponents
2023-07-19T03:02:23Z
2023-11-05T05:49:12Z
2023-09-21T01:48:48Z
2
4
30
0
1
10
null
MIT
TypeScript
mahmudhmh/DALL-E-Clone-MERN-STACK
main
# DALL-E-Clone-MERN-STACK ![localhost_5173_(PC) (2)](https://github.com/mahmudhmh/DALL-E-Clone-MERN-STACK/assets/54104161/eb5cb4ba-c79e-4e96-a7a9-f91747445558) ## Overview DALL-E-Clone-MERN-STACK is a full-stack MERN (MongoDB, Express, React, Node.js) web application that offers an exciting AI image generation experience, similar to MidJourney and DALL-E Clone. By leveraging the power of the MERN stack and integrating various cutting-edge technologies, this project enables users to create and customize unique images through the AI-powered DALLE API. ![localhost_5173_create-post(PC)](https://github.com/mahmudhmh/DALL-E-Clone-MERN-STACK/assets/54104161/4cfff8cc-37fe-468f-b24f-b60b66b4dec8) ## Features - Utilizes Vite, a build tool, and development server, to streamline the development process of modern web applications. - Implements TailwindCSS, a popular utility-first CSS framework, to achieve a modern and visually appealing user interface. - Integrates file-saver, enabling users to conveniently save and download generated images. - Utilizes react-router-dom, an npm package, to implement dynamic routing, providing smooth navigation through the web app. - Integrates the OPENAI API, offering convenient access to the powerful DALLE API from Node.js applications. - Utilizes Cloudinary API to enable users to upload images, videos, and other files to the cloud. - Allows users to load, create, and customize ReactJS components while understanding the well-structured MERN STACK file organization. - Implements reusable code and scalability using Higher Order Components (HOCs) and industry-standard best practices. - Enables users to add custom prompts for generating images and perform searches using query names and prompts. - Integrates DALLE AI for generating and utilizing images, enhancing the creative potential of the web application. - Provides users with the ability to download the resulting t-shirt model image as a JPEG file, allowing them to save and share their creations. - Ensures responsiveness across all devices, guaranteeing a seamless user experience on various screen sizes. - Prioritizes site performance, optimizing loading times and overall speed. ## Technologies Used - Vite: A build tool and development server optimized for modern web applications. - TailwindCSS: A popular CSS framework used for utility-first styling and creating visually appealing designs. - file-saver: A specialized pre-paid file archiving service enabling convenient file downloads. - react-router-dom: An npm package facilitating dynamic routing in React web applications. - OPENAI API: The OpenAI Node.js library provides convenient access to the DALLE AI API from Node.js applications. - Cloudinary: An API used for easy file upload and management, including images, videos, and other files. ## Getting Started To run the project locally, follow these steps: 1. Clone the repository to your local machine. 2. Navigate to the project directory and install the dependencies using npm or yarn. 3. Set up your MongoDB database and configure the required environment variables. 4. Start the development server using the appropriate npm/yarn command. 5. Open your preferred web browser and access the web application at `http://localhost:5173` (or a different port if specified). ## Contribution Contributions from the open-source community are welcome to enhance this project further. If you wish to contribute, please follow the standard pull request process after making the necessary changes. ## License This project is licensed under the [MIT License](LICENSE), allowing you to freely use, modify, and distribute the code. ## Acknowledgments We extend our gratitude to the creators and maintainers of Vite, TailwindCSS, react-router-dom, OPENAI API, and Cloudinary for their exceptional tools and services that made this project possible. ## Contact If you have any questions, suggestions, or feedback regarding the project, feel free to contact us at [mahmoudh.buss@gmail.com](mailto:mahmoudh.buss@gmail.com) or via GitHub. Start generating amazing AI-powered images today! 🌟🎨
DALL-E-Clone-MERN-STACK is a full-stack MERN (MongoDB, Express, React, Node.js) web application that offers an exciting AI image generation experience.
cloudinary,expressjs,javascript,mongodb,nodejs,openai-api,reactjs,tailwindcss,vitejs
2023-07-10T20:35:07Z
2023-07-28T17:12:45Z
null
1
0
5
0
0
10
null
null
JavaScript
SudiptaChakraborty51/Note-Zone
main
# Note-Zone [Note-Zone](https://note-zone.netlify.app/) - Note-Zone is a user-friendly and efficient note-taking application. Users can easily create, edit, delete and archive notes using the intuitive interface. ## **Demo :** https://github.com/SudiptaChakraborty51/Note-Zone/assets/76644901/8297c163-091d-4647-9ceb-b7f828a3c001 ## How to install and run locally? ``` $ git clone https://github.com/SudiptaChakraborty51/Note-Zone.git $ cd note-zone $ npm install $ npm run dev ``` ## **Technologies used :** - React JS - React Context API - React Router v6 - Vanilla CSS - Firebase for backend - Firestore for database - FontAwesome icons - Toastify ## **Features :** - Landing Page - Authentication - Sign-up (with email-password & Google both) - Login - Logout - List of all Notes - Add a new note - Pin & Unpin note - Archive & Unarchive note - Delete Note - Edit Note - Add labels to note - Delete labels - Add and change background color of notecard - Search a note based on title, content, labels - User Profile ## **Other Features :** - 404 Error Page - Toasts - Loaders - Responsive UI
Note-Zone is a user-friendly and efficient note-taking application. Users can easily create, edit, delete and archive notes using the intuitive interface.
firebase,firestore,reactjs,css,fontawesome-icons,javascript,note-taking-app,toastify
2023-07-07T04:57:15Z
2023-07-18T16:41:10Z
null
1
0
33
0
1
9
null
null
JavaScript
Alok-2002/OIBSIP
main
# Oasis Info Byte Summer Internship - Web Developer Internship Projects Welcome to the OIBSIP (Online Internship Projects) repository! This repository contains the projects completed during my web developer internship at Oasis Info Byte. The projects were assigned in three levels, each with its own set of projects to complete. ## Table of Contents - [Level 1 Projects](#level-1-projects) - [Level 2 Projects](#level-2-projects) - [Level 3 Project](#level-3-project) ## Level 1 Projects Level 1 consists of three projects that helped me gain a foundational understanding of web development. These projects focused on front-end development, HTML, CSS, and JavaScript. 1. Project 1 - ***Starbucks Landing Page***: - Description: A landing page for Starbucks, built using HTML, CSS, and JavaScript. - Technologies Used: HTML, CSS, JavaScript - Deployment: The page is deployed on Vercel at [Starbucks Landing Page](https://starbucks-landing-page-alok-2002.vercel.app). - Repository: The project's GitHub repository can be found at [GitHub Repository](https://github.com/Alok-2002/OIBSIP/tree/main/Starbucks_Landing_Page). - ScreenShots: ![Screenshot 2023-07-24 202845](https://github.com/Alok-2002/OIBSIP/assets/93814546/f37b638b-44d8-4251-842c-cab7b72970f9) 2. Project 2 - *Project Name* - Description: [Brief description of the project] - Technologies Used: [List of technologies used] - Repository: [Link to the project repository] 3. Project 3 - *Project Name* - Description: [Brief description of the project] - Technologies Used: [List of technologies used] - Repository: [Link to the project repository] ## Level 2 Projects Level 2 includes several projects that build upon the skills acquired in Level 1. These projects focused on back-end development, databases, and server-side scripting. 1. Project 1 - ***Calculator Wizard***: - Description: A simple calculator made using HTML, CSS, and JavaScript. - Technologies Used: HTML, CSS, JavaScript - Deployment: The calculator is deployed on Vercel at [Tribute Page](https://calculator-wizard.vercel.app). - Repository: The project's GitHub repository is available at [GitHub Repository](https://github.com/Alok-2002/OIBSIP/tree/main/Calculator_Wizard). - ScreenShots: ![Screenshot 2023-07-26 194623](https://github.com/Alok-2002/OIBSIP/assets/93814546/9245648e-50e9-42d8-8cf4-6ca1d6d2c23e) 2. Project 2 - ***Tribute Page***: - Description: A simple Tribute Page made using HTML, CSS, and JavaScript. - Technologies Used: HTML, CSS, JavaScript - Deployment: The Tribute Page is deployed on Vercel at [Calculator Wizard](https://atal-bihari-vajpaayee.vercel.app). - Repository: The project's GitHub repository is available at [GitHub Repository](https://github.com/Alok-2002/OIBSIP/tree/main/Calculator_Wizard). - ScreenShots: ![image](https://github.com/Alok-2002/OIBSIP/assets/93814546/38ddafb4-ac0c-4778-a9d2-d90425304d90) 3. Project 3 - ***To Do Express Website***: - Description: A simple to-do app built using HTML, CSS, and JavaScript. - Technologies Used: HTML, CSS, JavaScript - Deployment: The app is deployed on Vercel at [To Do Express](https://to-doexpress.vercel.app/). - Repository: The project's GitHub repository can be found at [GitHub Repository](https://github.com/Alok-2002/OIBSIP/tree/main/To_Do_Express). - ScreenShots: ![image](https://github.com/Alok-2002/OIBSIP/assets/93814546/29d2329a-ab8d-488d-8380-bdc936234681) ## Level 3 Project Level 3 is the final level and consists of one comprehensive project. This project involved building a full-stack pizza delivery web application. - Project - ***Pizza Delivery Web Application*** - Description: A full-stack web application that allows users to order pizza online. It includes features like selecting pizza toppings, customizing orders, payment integration, and order tracking. - Technologies Used: [List of technologies used] - Deployment: - Repository: [Link to the project repository] ## Conclusion These projects provided valuable hands-on experience and helped me enhance my skills as a web developer. Each project presented unique challenges and opportunities for growth. I am grateful for the learning experience and the chance to contribute to real-world web development projects. Please refer to the respective project repositories for more detailed information on each project. Feel free to reach out if you have any questions or feedback!
Welcome to the OIBSIP (Online Internship Projects) repository! This repository contains the projects completed during my web developer internship at Oasis Info Byte. The projects were assigned in three levels, each with its own set of projects to complete.
alok-2002,alok-sharma,css,html,html-css-javascript,internship,internship-task,javascript,oibsip,projects
2023-07-13T06:47:38Z
2023-07-28T11:20:05Z
null
1
0
48
0
0
9
null
MIT
HTML
pondev1031/room-three.js-project
main
null
3D room editer three.js
3d,css,html,javascript,rooms,threejs
2023-07-20T14:17:57Z
2023-07-20T14:18:10Z
null
1
0
2
0
0
9
null
null
HTML
CodePapa360/Interactive-comments-section
main
<h1 align="center">Interactive comments section</h1> <div align="center"> Challenge from [Frontend Mentor](https://www.frontendmentor.io/challenges) <h2> [🚀Live Site](https://interactive-comments-section-codepapa360.vercel.app/) || [💡Frontend Mentor](https://www.frontendmentor.io/solutions/nested-comment-section-built-with-vanilla-js-mvc-and-pubsub-pattern-C4fL2vWc_l) </h2> </div> <!-- Badges --> <div align="center"> <img src="https://img.shields.io/badge/Status-Completed-success?style=flat" alt="Status" /> <!-- Liceensee --> <img src="https://img.shields.io/badge/License-MIT-blue?style=flat" alt="License" /> </div> <p align="center"> This is a web application that showcases an interactive comments section. Users can add new comments, reply to existing comments, edit their own comments, and vote on comments. The project follows the <code>Model-View-Controller (MVC)</code> architectural pattern to separate data, presentation, and user interaction. Additionally, the <code>Publisher-Subscriber</code> pattern is utilized for event handling, enhancing the modularity and maintainability of the codebase. </p> <!-- Screenshot --> <a align="center" href="https://interactive-comments-section-codepapa360.vercel.app/"> ![Screenshot](./screenshots/Interactive-comments-section-preview-codepapa360.png) </a> ## Technologies Used - Vanilla JavaScript: The core language used for application logic and event handling. - SASS: Used for styling and layout. - HTML ## Project Structure The project follows the MVC pattern to organize the code into three main components: 1. **Model (model.js):** - Handles data management and storage. - Provides methods for storing, retrieving, and updating comments. - Implements voting functionality for comments. - Manages the current user data and vote history. ```javascript export const storeComment = async function (repliedToId, comment, parentId) { // ... code for storing a new comment or reply ... }; export const deleteComment = function (parentId, mainId) { // ... code for deleting a comment or reply ... }; // ... other model functions ... ``` 2. **View (commentView.js, deleteModalView.js, editView.js, newCommentView.js, replyView.js, scoreView.js):** - Responsible for the presentation and rendering of data to the DOM. - Utilizes the generated HTML markup templates to display comments and other elements. - Implements methods to render main comments, replied comments, edit fields, delete modals, and reply fields. ```javascript class CommentView { renderMainComment(data) { // ... code for rendering the main comment to the DOM ... } renderRepliedComment(data) { // ... code for rendering a replied comment to the DOM ... } // ... other rendering methods ... } ``` 3. **Controller (controller.js):** - Acts as the middleman between the Model and View components. - Implements event listeners using the `Publisher-Subscriber` pattern to handle user interactions. - Connects user actions to corresponding Model methods for data manipulation. - Utilizes View methods to display updated data to the user. ```javascript const controlNewComment = async function () { // ... code for handling the addition of a new comment ... }; const controlReplyComment = async function (repliedToId, comment, parentId) { // ... code for handling the addition of a reply to a comment ... }; // ... other control functions ... ``` ### Publisher-Subscriber (Pub-Sub) pattern: The Pub-Sub pattern is a design pattern where multiple components `(subscribers)` subscribe to `events` published by a central component `(publisher)`. Subscribers are notified whenever a relevant `event` occurs. ```javascript // Example from controller.js const init = function () { editView.addHandlerEditBtn(controlEditComment); scoreView.addHandlerVoting(controlVoting); replyView.addHandlerReplyBtn(controlReplyComment); }; init(); ``` ## Key Features Users should be able to: - Create, Read, Update, and Delete comments and replies. - Upvote and downvote comments. - **Bonus**: Utilized `localStorage` to save the current state in the browser and persist when the browser is refreshed. - **Bonus**: Instead of using the `createdAt` strings from the `data.json` file, I have used timestamps and dynamically track the time since the comment or reply was posted. - **Bonus**: Dark mode toggler. ## What I Learned: The MVC pattern helped me organize my code and separate different parts of the application. It made it easier to manage data, handle user interactions, and update the user interface without making everything messy. The Model represents the data and project logic, the View is responsible for the user interface, and the Controller acts as the middleman between the Model and View. On the other hand, the Pub-Sub method provided a way for different parts of the application to communicate with each other without knowing each other's details. It's like having a bunch of people (subscribers) listening for updates from a central place (publisher). When something changes, the publisher notifies all the subscribers, and they can react accordingly. By using these patterns, I was able to create a more organized and maintainable application. It also helped me handle user interactions and update the comments section dynamically without reloading the page. I learned how to manage data efficiently, display it on the screen, and handle user interactions smoothly. This project built upon my previous experience with the [Forkify](https://github.com/CodePapa360/Forkify-Recipe-App) app, where I first encountered these patterns. Through practice and application, I gained more confidence in using these patterns effectively and understanding their benefits in real-world projects. Overall, it was a great learning experience, and I'm excited to use these skills in future projects to create even better and more user-friendly web applications. ## Author <b>👤 Alamin</b> - Twitter - [@CodePapa360](https://www.twitter.com/CodePapa360) - LinkedIn - [@CodePapa360](https://www.linkedin.com/in/codepapa360) - Frontend Mentor - [@CodePapa360](https://www.frontendmentor.io/profile/CodePapa360) - Github: [@CodePapa360](https://github.com/codepapa360) Feel free to contact me with any questions or feedback! ## Acknowledgments This project was inspired by the "Interactive Comments Section" challenge from Frontend Mentor. Special thanks to Frontend Mentor for providing the design and specifications for this project. ## License This project is licensed under the [MIT](https://github.com/CodePapa360/Interactive-comments-section/blob/main/LICENSE.md) License - see the LICENSE file for details.
Nested comment section with Vanilla JS, utilizing MVC & Pub-Sub patterns. Ideal for practicing full-stack CRUD apps!
codepapa360,comment-section,crud,crud-application,crud-functionality,css,frontend,frontend-development,frontend-mentor,html
2023-07-02T09:15:30Z
2023-08-02T09:11:02Z
null
1
0
54
0
3
9
null
MIT
JavaScript
ThomasHeim11/TicketToken
main
# TicketToken This is a decentralized ticket marketplace smart contract for managing NFT (Non-Fungible Token) tickets using the ERC721 standard. The smart contract allows the creation of occasions (events) with specific details such as the name, cost of each ticket, maximum tickets available, date, time, and location. Users can then buy tickets for these occasions, and each ticket is represented as a unique NFT. Deployed to the Sepolia testnet. <img width="1797" alt="Screenshot 2023-07-17 at 04 53 40" src="https://github.com/ThomasHeim11/StableCryptoDollar/assets/106417552/a7d3cc2c-2b59-4f10-8689-23d269f9f15a"> - [About](#about) - [Getting Started](#getting-started) - [Requirements](#requirements) - [Quickstart](#quickstart) - [Optional Gitpod](#optional-gitpod) - [Updates](#updates) - [Usage](#usage) - [Start a local node](#start-a-local-node) - [Deploy](#deploy) - [Testing](#testing) - [Deployment to a testnet or mainnet](#deployment-to-a-testnet-or-mainnet) - [Thank you!](#thank-you) # About Introducing the Decentralized Ticket Marketplace, a smart contract built on the Ethereum blockchain using the ERC721 standard to manage NFT (Non-Fungible Token) tickets. This innovative marketplace provides a secure and transparent platform for handling ticket transactions for various occasions and events. Through the smart contract, users can easily create occasions, specifying essential details such as occasion name, ticket cost, maximum ticket availability, date, time, and location. These occasions are stored on the blockchain, ensuring immutability and accessibility for all participants. Once an occasion is listed, users can seamlessly purchase tickets for their desired events. Each ticket represents a unique NFT, providing a digital representation of the purchased ticket. By leveraging the power of NFTs, users gain ownership over their event tickets, enabling easy transferability, verification, and secure storage. With this decentralized ticket marketplace, event organizers can reach a broader audience, while attendees enjoy a frictionless ticketing experience, free from intermediaries and counterfeit concerns. Embrace the future of ticketing with the NFT-powered Decentralized Ticket Marketplace. Key Features: - Creation of occasions with detailed event information. - Purchase of unique NFT tickets for listed occasions. - Secure ownership and transferability of event tickets through NFTs. - Elimination of counterfeit ticketing and intermediary involvement. - Transparent and immutable storage of occasion data on the Ethereum blockchain. # Getting Started ## Requirements - [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - You'll know you did it right if you can run `git --version` and you see a response like `git version x.x.x` - [hardhat](https://hardhat.org/) - You'll know you did it right if you can run `npx hardhat --version ` and you see a response like `2.12.7` ## Quickstart ``` git clone https://github.com/ThomasHeim11/TicketToken.git npm install ``` ### Optional Gitpod If you can't or don't want to run and install locally, you can work with this repo in Gitpod. If you do this, you can skip the `clone this repo` part. [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#github.com/PatrickAlphaC/foundry-smart-contract-lottery-f23) # Usage ## Start a local node ``` npx hardhat node ``` ## Deploy This will default to your local node. You need to have it running in another terminal in order for it to deploy. ``` npx hardhat run --network hardhat scripts/deploy.js ``` ## Testing In this repo we cover unit testing ``` npx hardhat test ``` # Deployment to a testnet or mainnet 1. Setup environment variables You'll want to set your `SEPOLIA_RPC_URL` and `PRIVATE_KEY` as environment variables. You can add them to a `.env` file, similar to what you see in `.env.example`. - `PRIVATE_KEY`: The private key of your account (like from [metamask](https://metamask.io/)). **NOTE:** FOR DEVELOPMENT, PLEASE USE A KEY THAT DOESN'T HAVE ANY REAL FUNDS ASSOCIATED WITH IT. - You can [learn how to export it here](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-Export-an-Account-Private-Key). - `SEPOLIA_RPC_URL`: This is url of the goerli testnet node you're working with. You can get setup with one for free from [Alchemy](https://alchemy.com/?a=673c802981) Optionally, add your `ETHERSCAN_API_KEY` if you want to verify your contract on [Etherscan](https://etherscan.io/). 1. Get testnet ETH Head over to [faucets.chain.link](https://faucets.chain.link/) and get some tesnet ETH. You should see the ETH show up in your metamask. 2. Deploy ```npx hardhat run scripts/deploy.js --network sepolia``` # Thank you! If you appreciated this, feel free to follow ! [![Thomas HeimLinkedin](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/thomas-heim11/)
Decentralized ticket marketplace using ERC721 for NFT tickets. Create occasions with details like name, cost, date, and location; users buy unique NFT tickets. Deployed to the Sepolia testnet.
crypto,javascript,nft,smart-contracts,soldity
2023-07-10T07:31:28Z
2024-05-19T13:39:44Z
null
2
7
88
0
3
9
null
null
JavaScript
tokyRT/Ludo-mg
main
null
Ludo game made with jquery
javascript,jquery,ludo,ludo-game,scss
2023-07-16T15:41:43Z
2023-07-19T17:06:43Z
null
1
0
10
0
2
9
null
null
JavaScript
fixtse/o365-card
main
<a name="readme-top"></a> [![HACS Validate](https://github.com/fixtse/o365-card/actions/workflows/github-actions-hacs.yml/badge.svg)](https://github.com/fixtse/o365-card/actions/workflows/github-actions-hacs.yml) [![hacs_badge](https://img.shields.io/badge/HACS-Default-41BDF5.svg)](https://github.com/hacs/integration) [![GitHub release](https://img.shields.io/github/v/release/fixtse/o365-card)](https://github.com/fixtse/o365-card/releases/latest) [![maintained](https://img.shields.io/maintenance/yes/2024.svg)](#) [![maintainer](https://img.shields.io/badge/maintainer-%20%40fixtse-blue.svg)](https://github.com/fixtse) # O365 Card for Home Assistant Table of contents ----------------- * [Introduction](#introduction) * [Installation](#installation) * [Supported Types](#supported-types) * [Inbox](#inbox) * [Teams](#teams) ## Introduction Needs the [O365 Home Assistant Integration](https://github.com/RogerSelwyn/O365-HomeAssistant) to work [![Video Tutorial](http://img.youtube.com/vi/yKr5nMzOaAI/0.jpg)](http://www.youtube.com/watch?v=yKr5nMzOaAI "Integrating Office 365 into Home Assistant") This is a Custom Card to show information from your O365 sensors into the home assistant dashboard.<br /> The intent is to create a **simple** and easy-to-use card to show the sensor's information in the dashboard. I made a video about the O365 integration and on my research, I couldn't find any other card that allowed me to show the information from the sensors easily. So I made this card to simplify the process for everyone that needs it. The Icon and the name of the card are taken from the sensor's configuration, click on the card icon to change them if you need. Once installed can be added from the Dashboard Panel, just search for O365 Card, works with the Lovelace Config Editor. <p align="center"><img src="https://i.imgur.com/aKn0LVo.jpeg" alt="lovelace config editor example"></p> **For ToDo Sensor Support, check the official todo-list card from Home Assistant** <p align="right">(<a href="#readme-top">back to top</a>)</p> ## Installation ### HACS (Recommended) Use this button to be redirected to the card's page on HACS [![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?repository=o365-card&owner=fixtse&category=Plugin) ### Manual 1. Download `o365-card.js` file from the [latest release](https://github.com/fixtse/office365-card/releases/latest). 2. Put `o365-card.js` file into your `config/www` folder. 3. Add a reference to `o365-card.js` in Lovelace. 1. **Go to:** _Settings_ → _Dashboards_ → _Resources_ → Click Plus button → Set _Url_ as `/local/o365-card.js` → Set _Resource type_ as `JavaScript Module`. 4. Add `custom:o365-card.js` to Lovelace UI as any other card (using either editor or YAML configuration). <p align="right">(<a href="#readme-top">back to top</a>)</p> ## Supported Types ## Inbox <p align="center"><img src="img/inbox.webp" alt="inbox sensor example"></p> * The card shows the email list from an email sensor ([doc](https://rogerselwyn.github.io/O365-HomeAssistant/installation_and_configuration.html#email_sensors)) or a query sensor ([doc](https://rogerselwyn.github.io/O365-HomeAssistant/installation_and_configuration.html#query_sensors)) * State Color based on importance level of the email * :information_source: Info: Normal * :no_entry: Alert: High #### Options | Name | Requirement | Description | | --- | --- | --- | | type | **Required** | `custom:o365-card` | | entity | **Required** | Home Assistant entity ID | | max_items | Optional | Maximum amount of items to show in the card <br> The header counter will still show the real value <br> Set to 0 to show all | <p align="right">(<a href="#readme-top">back to top</a>)</p> ## Teams <p align="center"><img src="img/teams_last_message.webp" alt="chat sensor example"></p> * The card shows the information from the teams chat sensor ([doc](https://rogerselwyn.github.io/O365-HomeAssistant/sensor.html#teams-chat-sensor)) * Has a link that will open the conversation in teams.microsoft.com #### Options | Name | Requirement | Description | | --- | --- | --- | | type | **Required** | `custom:o365-card` | | entity | **Required** | Home Assistant entity ID | <p align="right">(<a href="#readme-top">back to top</a>)</p> ## Licence o365-card is [MIT licenced](license.txt)
A custom card for Home Assistant to show your Inbox, To Do and Teams Last Message from Office365
hacs-plugin,home-assistant,inbox,javascript,lovelace,lovelace-custom-card,office365,outlook,teams,todo
2023-07-17T23:32:47Z
2024-01-23T21:38:38Z
2024-01-23T21:35:02Z
1
0
21
0
0
9
null
MIT
JavaScript
abhideepkumar/sigmaevents
master
# 🚀 Sigma Events Welcome to Sigma Events, an easy-to-use website for organizing and participating in events hassle-free. Check it out <a href="https://sigmaevents.netlify.app/"><kbd>here</kbd></a>. This project simplifies event planning and participation with an intuitive and user-friendly interface, built using Next.js, Tailwind CSS, and MongoDB. # 🎉 Key Features - Clear event details presented in a structured manner. - One-time information entry to avoid repetitive form filling. - Instant event notifications for timely updates. - Insights and feedback for event management and improvement. - Privacy-focused approach without sharing personal information publicly. - Easy access to past and upcoming events for efficient planning. ## 🛠️ Setting Up Sigma Events Locally To set up Sigma Events locally on your machine, follow these steps: ### 1. Clone the Repository ```bash git clone https://github.com/abhideepkumar/sigmaevents cd sigmaevents ``` ### 2. Install Dependencies Run the following command to install necessary dependencies: ```bash npm install ``` ### 3. Configure Environment Variables Rename a `example.env.local` file to `.env.local` in the project's root directory and change the required environment variables. #### Setting Up Google Authentication 1. **Create a Google Cloud Platform Project**: - Go to [Google Cloud Console](https://console.cloud.google.com/) and create a project for Sigma Events. 2. **Enable Google Authentication**: - In the Google Cloud Console, navigate to the created project and enable Google authentication for your project. 3. **Obtain Google Client ID and Client Secret**: - Within the Google Cloud Console, retrieve the Client ID and Client Secret for the project. 4. **Add Authorized JavaScript origins and Authorized redirect URIs**: - In the Google Cloud Console, go to the Credentials section and select your project. - Click on the edit button next to your Client ID and scroll down to the Authorized JavaScript origins and Authorized redirect URIs sections. - Add the URL where your application will run locally (`http://localhost:3000/` for Authorized JavaScript origins) and (`http://localhost:3000/api/auth/callback/google` for Authorized redirect URIs). This will allow Google to recognize your application and redirect the user back to your website after authentication. - Save the changes and copy the Client ID and Client Secret to your `.env.local` file. #### Setting Up MongoDB 1. **Create a MongoDB Atlas Account**: - Sign up at [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) and create a new cluster for Sigma Events. 2. **Get API Key and Connection URL**: - After creating the cluster, obtain the API Key and Connection URL from Data API section. #### NextAuth Configuration - `NEXTAUTH_SECRET`: This should be a 32-digit random hexadecimal code, used for session encryption and signing. Generate a secure secret key from [numbergenerator.org](https://numbergenerator.org/random-32-digit-hex-codes-generator) and paste it as the value for `NEXTAUTH_SECRET`. - `NEXTAUTH_URL`: Set this to the URL where your application will run locally (`http://localhost:3000/` by default). This URL is used during the authentication process. Also, add this url in your Google Console Authentication so that Google login will allow this URL. - `ADMIN_NEXTAUTH_URL`:This URL is used during the authentication process for admins. #### Update .env.local with obtained credentials Update the `.env.local` file with the obtained credentials: If you still find it challenging, you can watch some YouTube videos for guidance. ### 4. Start the Project Run the following command to start the Sigma Events project locally: ```bash npm run dev ``` Access the website via `http://localhost:3000/` in your browser. ## 🤝 Contributing Contributions are welcome! Submit issues or pull requests for improvements or bug fixes. ## 📝 License This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
Welcome to Sigma Events! 🚀 This project is an easy-to-use website created to help students and clubs plan and participate in events hassle-free. It's built using Next.js, Tailwind CSS, and MongoDB. Let's dive into how you can get started!
swoc-s4,javascript,mongodb,nextjs
2023-07-20T03:47:13Z
2024-02-10T11:45:44Z
null
10
16
64
5
19
9
null
MIT
JavaScript
ZRprivateServer/ZRprivateServer
main
# ZRprivateServer ## Zombs Royale Private Server Welcome to ZRprivateServer (or ZRPS), a server emulator for [ZombsRoyale.io](https://zombsroyale.io). ## Features The ZRPS is still early in development. A full list of features is coming soon. ## Get Started Check out the [wiki](https://github.com/ZRprivateServer/ZRprivateServer/wiki) to find everything you need to know! ## Support If you need any help, you can reach out to the community on the [Discord server](https://discord.gg/btGEvyyd) or open an issue in the GitHub repository. ## Contributing ZRprivateServer is an open-source project and we welcome contributions from anyone. If you would like to contribute to the project, please follow these steps: 1. Fork the repository. 2. Create a new branch with your changes. 3. Submit a pull request. ## Legal This is an open-source project developed for educational and entertainment purposes only. We do not assume any liability for any loss or damage resulting from the use or misuse of the server, hosting it, or commercializing it, and we do not endorse any illegal or unethical activities associated with the server. Additionally, please note that the project has no intention of infringing on the intellectual property of the original game developers. ## License ZRprivateServer is released under the MIT license. See [LICENSE](https://github.com/ZRprivateServer/ZRprivateServer/blob/main/LICENSE) for more details.
Zombs Royale Private Server
javascript,private-server,reverse-engineering,zombs,zombs-royale,zombsroyale
2023-07-06T17:49:48Z
2023-07-21T00:28:07Z
null
1
0
55
0
1
9
null
MIT
JavaScript
pondev1031/Bonx-NFT-game-frontend
main
# NFT game site landing page <img src="./public/1.png" /> <img src="./public/2.png" />
Bonx-NFT-game-frontend
javascript,nftgame,react,react-hooks,redux,scss,nft
2023-07-20T15:05:56Z
2024-03-13T09:30:42Z
null
1
0
4
0
0
9
null
null
CSS
Alok-2002/Bharat_Intern_Internship_Tasks
main
# Bharat_Intern_Internship_Tasks This repository contains the source code for the tasks assigned to me during my internship at Bharat_Intern. The tasks include the following projects: 1. [Personal Portfolio Website Source Code](https://github.com/Alok-2002/Alok-2002.github.io) 2. [Netflix Home Page Clone Source Code](https://github.com/Alok-2002/Netflix_Home_Page_Using_HTML_And_CSS) 3. [Temperature Converter Source Code](https://github.com/Alok-2002/Temperature_Wizard) All the projects were developed using HTML, CSS, and JavaScript. ## Personal Portfolio Website The Personal Portfolio Website project focuses on creating a website that showcases personal information, skills, projects, and achievements. It utilizes JavaScript for interactivity, allowing users to navigate through different sections, view project details, and contact the website owner. HTML and CSS are used for structuring and styling the website. ### Features - Responsive design for optimal viewing on different devices. - Navigation menu for easy access to different sections. - About Me section to provide a brief introduction. - Skills section to highlight areas of expertise. - Projects section to showcase completed projects. - Contact section for users to get in touch. ### Usage To view or modify the source code for the Personal Portfolio Website project, navigate to the `Personal-Portfolio-Website` folder. ## Netflix Home Page Clone The Netflix Home Page Clone project aims to replicate the user interface of the popular streaming platform Netflix. It involves creating a responsive web page that mimics the layout, design, and functionality of the Netflix homepage. The project utilizes HTML, CSS, and JavaScript to build the user interface and provide interactive features such as browsing different movie categories, playing trailers, and navigating through movie suggestions. ### Features - Responsive design for seamless viewing on various devices. - Netflix-like layout and styling to closely resemble the original. - Interactive features like movie browsing, trailer playback, and movie suggestions. - Customizable movie categories and content. ### Usage To view or modify the source code for the Netflix Home Page Clone project, navigate to the `Netflix-Home-Page-Clone` folder. ## Temperature Converter The Temperature Converter project focuses on creating a web-based tool that allows users to convert temperature values between different units, such as Celsius, Fahrenheit, and Kelvin. Users can input a value in one unit and instantly see the converted values in the other units. The project utilizes HTML, CSS, and JavaScript to create the user interface and perform the temperature conversion calculations. ### Features - Supports conversion between Celsius, Fahrenheit, and Kelvin. - Real-time conversion as users input temperature values. - Clear and intuitive user interface. - Instant display of converted values. ### Usage To view or modify the source code for the Temperature Converter project, navigate to the `Temperature-Converter` folder. ## Live Demos You can try out the live demos of the projects using the following links: 1. [Personal Portfolio Website Demo](https://soulfulscribbles.tech) 2. [Netflix Home Page Clone Demo](https://alok-2002-netflix.vercel.app/) 3. [Temperature Converter Demo](https://temperaturewizard.vercel.app/) Please note that the live demos may not be available for all projects or may have been hosted on different platforms. ## Contribution This repository is for showcasing the tasks assigned to me during my internship, and therefore, contributions are not expected. However, if you have any suggestions or improvements for the projects, feel free to open an issue or contact me. ## License The source code in this repository is provided under the [MIT License](LICENSE). Feel free to use, modify, and distribute the code as per the terms of the license. ## Contact If you have any questions or would like to reach out to me regarding the projects or any other matter, you can contact me at: - Email: [sharmaalok02gwl@gmail.com](mailto:sharmaalok02gwl@gmail.com) - LinkedIn: [Alok Sharma](https://www.linkedin.com/in/alok-sharma2002-) Thank you for visiting this repository and reviewing my internship tasks/projects!
This repository contains the source code for the tasks assigned to me during my internship at Bharat_Intern
alok,alok-2002,alok-sharma,css,css3,git,github,html,internship,internship-task
2023-07-13T04:48:27Z
2023-10-11T18:06:12Z
null
1
1
71
0
0
8
null
MIT
JavaScript
najibullahjafari/math-magicians
dev
<a name="readme-top"></a> <div align="center"> <br/> Math Magicians </div> # 📗 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) # 📖 Math Magicians <a name="about-project"></a> Math Magicians is a web app to work like a calculator, I used React and JSX to build this web app. <img width="959" alt="Screenshot 2023-07-19 131042" src="https://github.com/najibullahjafari/math-magicians/assets/121656832/2fdaa895-c4e2-4b76-bac8-60f5209c3f67"> ## 🛠 Built With <a name="built-with"></a> - HTML, - CSS, - Java Script - GIT, - GITHUB - LINTERS - Webpack - React ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li><a href="https://www.microverse.org/">HTML5</a></li> <li><a href="https://www.microverse.org/">CSS3</a></li> <li><a href="https://www.microverse.org/">JavaScript</a></li> <li><a href="https://www.microverse.org/">React</a></li> </ul> </details> <details> <summary>Server</summary> <ul> <li><a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer">VS CODE Live Server Extension</a></li> </ul> </details> ### Key Features <a name="key-features"></a> - Linters for code quality - Responsive design for different screen sizes - In this project best coding practices is used. ## 🚀 Live Demo <a name="live-demo"></a> Check out the live demo of this project [here](https://zingy-quokka-cdc3ed.netlify.app). ## 💻 Getting Started <a name="getting-started"></a> To get a local copy up and running, follow these steps. 1. Go to this URL link: https://github.com/najibullahjafari/math-magicians 2. clone the repo and start working on it. ### Prerequisites In order to run this project you need: Google Chrome or other browser ```sh https://www.google.com/chrome/?brand=JJTC&gclid=CjwKCAjw9J2iBhBPEiwAErwpeSDcMFWiIQWj2u5GY6owZ7OaOHw7dYYCHW7uTR4kvYosNJYd4wt4VxoCiywQAvD_BwE&gclsrc=aw.ds ``` Github Account: ```sh https://github.com/ ``` Npm installed: ```sh https://nodejs.org/en/download ``` Git installed: ```sh https://git-scm.com/downloads/ ``` ### Setup Clone this repository to your desired folder: ```sh cd my-folder git clone https://github.com/najibullahjafari/math-magicians ``` ### Install Please do the following **steps in this order**: 1. Use `npm run build` to instal all dependencies. 2. Then you can run project by `npm start` command Linters: If you had any issues with linters for `react` you can install as bellow: ### ESLint 1. Run ``` npm install --save-dev eslint@7.x eslint-config-airbnb@18.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x eslint-plugin-react-hooks@4.x @babel/eslint-parser@7.x @babel/core@7.x @babel/plugin-syntax-jsx@7.x @babel/preset-react@7.x @babel/preset-react@7.x ``` _not sure how to use npm? Read [this](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)._ 2. Copy [.eslintrc.json](./.eslintrc.json) and [.babelrc](./.babelrc) to the root directory of your project. 3. **Do not make any changes in config files - they represent style guidelines that you share with your team - which is a group of all Microverse students.** 4. Run `npx eslint "**/*.{js,jsx}"` on the root of your directory of your project. 5. Fix linter errors. 6. **IMPORTANT NOTE**: feel free to research [auto-correct options for Eslint](https://eslint.org/docs/latest/user-guide/command-line-interface#fixing-problems) if you get a flood of errors but keep in mind that correcting style errors manually will help you to make a habit of writing a clean code! ### Stylelint 1. Run ``` npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x ``` _not sure how to use npm? Read [this](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)._ 2. Copy [.stylelintrc.json](./.stylelintrc.json) to the root directory of your project. 3. **Do not make any changes in config files - they represent style guidelines that you share with your team - which is a group of all Microverse students.** 4. Run `npx stylelint "**/*.{css,scss}"` on the root of your directory of your project. 5. Fix linter errors. 6. **IMPORTANT NOTE**: feel free to research [auto-correct options for Stylelint](https://stylelint.io/user-guide/usage/options) if you get a flood of errors but keep in mind that correcting style errors manually will help you to make a habit of writing a clean code! ### Usage To run the project, execute the following command: Open the index.html in your browser ### Run tests To run tests, run the following command: to check for styling errors: ```sh npx stylelint "**/*.{css,scss}" ``` ### Deployment You can deploy this project using: Your working browser. ## 👥 Authors <a name="authors"></a> 👤 **Najibullah Jafari** - GitHub: [Najibullah_jafari](https://github.com/najibullahjafari) - Twitter: [Najibullah_jafari](https://twitter.com/Najib_Jafari_) - LinkedIn: [Najibullah_jafari](https://www.linkedin.com/in/najibulla-jafari-609852263/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - **[Responsive Version]** ## 🤝 Contributing <a name="contributing"></a> Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/najibullahjafari/math-magicians/issues). <p align="right">(<a href="#readme-top">back to top</a>)</p> ## ⭐️ Show your support <a name="support"></a> Do you like this project? So don't wait to give one star! <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> I would like to express my deepest gratitude to Microverse for this project. The invaluable learning experience and support provided have been instrumental in my growth as a developer. My mentors and instructors deserve special thanks for their guidance and patience. The collaborative spirit of my fellow students has been a constant source of inspiration. I also extend my appreciation to the open-source community for their contributions. Lastly, my family and friends' unwavering support has been a driving force throughout this journey. Thank you, Microverse, for this incredible opportunity! <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 project developed a comprehensive calculator web app, The technologies which are used here are Html, React, JavaScript , Bootstrap@5.3.0 and Css.
css,github,html,javascript,linters,react,calculator,calculator-application,magician,math
2023-07-11T02:58:58Z
2023-08-04T23:49:48Z
null
2
6
33
0
0
8
null
MIT
JavaScript
renegadevi/nuxt-component-viewer
main
# Nuxt Component Viewer Simple and fully dynamic single file alternative to Storyboard for Nuxt, accessable via `/_components`. ***Demo***: https://stackblitz.com/edit/nuxt-starter-uotxqv ***Note***: Experimental status. ![screenshot-1](https://github.com/renegadevi/nuxt-component-viewer/blob/6ca97e434ccd52d0949712ca39420529d37b3b5b/.github/screenshot-1.png) ![screenshot-2](https://github.com/renegadevi/nuxt-component-viewer/blob/6ca97e434ccd52d0949712ca39420529d37b3b5b/.github/screenshot-2.png) ## Features - Component viewer - Localization (i18n) - 100% Tailwind - Fully dynamic - Quick toggles for component/viewport - Light/Dark mode - Single page ## Setup ### Prerequisites: - [pnpm](https://pnpm.io/) - [Nuxt](https://nuxt.com/§) - [TailwindCSS](https://nuxt.com/modules/tailwindcss) - [i18n (optional)](https://nuxt.com/modules/i18n/) - [Color mode (optional)](https://nuxt.com/modules/color-mode) ### Minimal install guide 1. Create new nuxt project ```sh pnpm dlx nuxi@latest init nuxt-project cd nuxt-project ``` 2. Install packages ```sh pnpm install pnpm add --save-dev @nuxtjs/tailwindcss ``` 4. add tailwind as module to `nuxt.config.ts` ```ts export default defineNuxtConfig({ devtools: { enabled: true }, modules: [ "@nuxtjs/tailwindcss", ], }) ``` 5. update `.app` to enable pages ```tsx <template> <div> <NuxtLayout> <NuxtPage /> </NuxtLayout> </div> </template> ``` 6. create `/pages` folder 7. create `/pages/index.vue` file with a link ```tsx <template> <div> <NuxtLink to="/_components/">Go to ComponentViewer</NuxtLink> </div> </template> ``` 8. copy the `_components.vue` file from this repo to `/pages/_components.vue` 9. create folder `/layouts` 10. create files `/layouts/default.vue`and `/layouts/blank.vue` with this template ```tsx <template> <div> <slot /> </div> </template> ``` 11. Create `/components` folder 12. Create component file `/components/ButtonComponent.vue` ```tsx <template> <button class="bg-blue-400 p-4 py-2 text-white rounded-xl">A nice button</button> </template> ``` 12. Start server ```sh pnpm run dev ``` 13. Navigate to http://localhost:3000/_components
Simple and fully dynamic single file alternative to Storyboard for Nuxt
components,javascript,nuxt,nuxt3,vue
2023-07-16T02:05:37Z
2023-08-03T03:11:07Z
null
1
0
7
0
1
8
null
MIT
Vue
Aviwani1234/movix
main
null
Movix is a web application built using React that allows users to discover movies and explore their details. With a user-friendly interface and vast collection of movies and TV shows, users can easily search for their favourite movie, browse through different genres, and get detailed information about the cast, crew, and ratings.
api,bootstrap,css,html5,javascript,reactjs
2023-07-12T08:47:49Z
2023-07-24T14:11:03Z
null
1
0
29
0
0
8
null
null
JavaScript
JairTorres1003/JT-View-Exports-SVG
main
# View Exports SVG <img src="./assets/JT View Exports SVG - ICON.png" alt="Logo View Exports SVG" width="180" height="180"> ## Description '**View Exports SVG**' is a Visual Studio Code extension that provides a convenient way to view SVG icons exported from JavaScript, JSX, TypeScript, or TSX files. With this extension, you can easily explore and search for SVG icons within your project, making it effortless to find and utilize your icon assets. **Key features:** - Seamlessly extract SVG icons from code files - Display a floating menu option for quick access - Open a dedicated window with a searchable list of all discovered icons - Efficient search functionality to locate specific icons Enhance your productivity and streamline your icon management workflow with the '**View Exports SVG**' extension for Visual Studio Code. ## Screenshots https://github.com/JairTorres1003/JT-View-Exports-SVG/assets/83931760/5a869f06-87e9-4426-89d2-84a2926eb568 ## Installation 1. Open Visual Studio Code. 2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window. 3. Search for "View Exports SVG" in the Extensions view search box. 4. Click the Install button for the "View Exports SVG" extension. ## usage 1. Select one or more files containing SVG icons in your Visual Studio Code workspace. ([SVG SUPPORT](SVG%20SUPPORT.md)). 2. Right-click on the selected files. 3. In the context menu, choose the "View SVG Exports 🔍" option. 4. A panel will appear showing all the SVG icons found. 5. Use the search bar in the panel to filter the icons by their names. 6. Click the SVG icon to copy the name to the clipboard. ## Wiki Consulta la [wiki](https://github.com/JairTorres1003/JT-View-Exports-SVG/wiki) para obtener más información y documentación detallada. ## Contribuciones Contributions are welcome! If you find any bugs or have suggestions for new features, please feel free to open an issue or submit a pull request. ## License This extension is available under the [MIT License](LICENSE). ## Recent Changes You can find details of the changes and updates in the [changelog file (CHANGELOG.md)](CHANGELOG.md). ## Keywords Visual Studio Code, Extension, SVG icons, React, Javascript, JSX, TypeScript, TSX, Icon management, Icon assets. ### Development If you want to contribute to the development of this extension, follow the steps below: 1. Clone the repository: ```bash git clone https://github.com/JairTorres1003/JT-View-Exports-SVG.git ``` 2. Install dependencies: `npm run install:all` 3. Build the webview-ui: `npm run build:webview` 4. Build the extension: `npm run compile` 5. Press F5 to start a new VS Code instance with the extension loaded.
✨ 'View Exports SVG' is a Visual Studio Code extension designed to streamline the process of accessing and utilizing SVG icons. With this extension, you can effortlessly explore and search for SVG icons within your project, simplifying the task of finding and integrating them into your project.
extension,icon-assets,javascript,jsx,react,svg-icons,tsx,typescript,visual-studio-code,icon-managemen
2023-07-06T01:44:56Z
2024-05-20T01:08:43Z
2024-02-11T17:15:48Z
1
120
468
0
1
8
null
MIT
TypeScript
ikram-shah/fhir-ai-and-openapi-chain
master
# FHIR - AI and OpenAPI Chain [![Gitter](https://img.shields.io/badge/Available%20on-Intersystems%20Open%20Exchange-00b2a9.svg)](https://openexchange.intersystems.com/package/FHIR---AI-and-OpenAPI-Chain) [![Quality Gate Status](https://community.objectscriptquality.com/api/project_badges/measure?project=intersystems_iris_community%2Firis-fhir-template&metric=alert_status)](https://community.objectscriptquality.com/dashboard?id=intersystems_iris_community/fhir-ai-and-openapi-chain) 💻 Contributors - [Ikram Shah](https://community.intersystems.com/user/ikram-shah) and [Sowmiya Nagarajan](https://community.intersystems.com/user/sowmiya-nagarajan). 💪 Built with [OpenAI](https://openai.com/), [LangChain](https://github.com/hwchase17/langchain) & [Streamlit](https://streamlit.io/) ## Demo https://github.com/ikram-shah/fhir-ai-and-openapi-chain/assets/17762967/99512028-8190-4581-9f0a-fd7b699c7d2c ## Overview 🤖 Ask question to any of your chosen FHIR API in natural language 🤖 <img width="1512" alt="Screenshot 2023-07-04 at 12 31 35 AM" src="https://github.com/ikram-shah/fhir-ai-and-openapi-chain/assets/17762967/30f0a468-276a-41fe-9695-9c2be85ba86d"> ## Try online on [Streamlit](https://fhir-ai-and-openapi-chain.streamlit.app/) 1. Get OpenAI Key from [OpenAI Platform](https://platform.openai.com/account/api-keys) 2. Get FHIR Server API endpoint - You may either enter your own sample FHIR server (unauthenticated access needed) - You may create a temporary sample server in [Intersystems IRIS FHIR platform](https://learning.intersystems.com/course/view.php?id=1492) ## Try locally using local FHIR server ### OpenAI API Key Get OpenAI Key from [OpenAI Platform](https://platform.openai.com/account/api-keys) ### Setup Local FHIR Server 1. Prerequisites: [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) & [Docker desktop](https://www.docker.com/products/docker-desktop) 2. Installation: ``` $ git clone https://github.com/ikram-shah/fhir-ai-and-openapi-chain.git ``` ``` $ docker-compose up -d ``` 3. Generate sample patient data [ref](https://github.com/intersystems-community/irisdemo-base-synthea) ``` ./synthea-loader.sh 10 ``` ``` docker-compose exec iris iris session iris -U FHIRServer ``` ``` FHIRSERVER>d ##class(fhirtemplate.Setup).LoadPatientData("/irisdev/app/output/fhir","FHIRSERVER","/fhir/r4") ``` 4. Test FHIR R4 API by visitng [http://localhost:32783/fhir/r4/metadata](url) ### Streamlit ``` pip install -r requirements.txt ``` ``` streamlit run src/streamlit/src/main.py ``` ### Folder Structure ``` fhir-ai-and-openapi-chain/ ├──src │ ├── streamlit/ //streamlit code │ │ ├── src/ │ │ │ ├── main.py │ │ │ └── ... │ └── fhirtemplate/ │ ├── setup.cls │ └── ... . . . ├── requirements.txt //requirements for streamlit to run ├── docker-compose.yml ├── Dockerfile ├── README.md └── LICENSE ``` ### Known Limitations Due to the limitations imposed by OpenAI's token usage, if the reference data + prompt being sent to the OpenAI API exceeds the specified limit, an error may be encountered. <img width="1069" alt="Screenshot 2023-07-04 at 12 46 09 AM" src="https://github.com/ikram-shah/fhir-ai-and-openapi-chain/assets/17762967/81d6cba7-8f74-4807-9197-5a3eca62427d"> ### Useful Resouces [HL7 OpenAPI Specifications](https://hapi.fhir.org/baseR4/api-docs) [FHIR Postman collection by apievangelist](https://apievangelist.com/) [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/api-evangelist/workspace/fast-healthcare-interoperability-resources-fhir/collection/35240-c30a5371-445c-4046-af66-649b43842f3e?action=share&creator=4063768) [InterSystems IRIS FHIR Documentation](https://docs.intersystems.com/irisforhealth20203/csp/docbook/Doc.View.cls?KEY=HXFHIR) [FHIR API](http://hl7.org/fhir/resourcelist.html) [Intersystems Community](https://community.intersystems.com/tags/fhir) ## License This project is licensed under the [MIT License](LICENSE). You can find the full text of the license in the [LICENSE](LICENSE) file.
An application to interact with your FHIR API's using natural language query
ai,chatgpt,fhir,hl7,intersystems,javascript,openai,openapi,python,streamlit
2023-07-02T20:53:25Z
2023-07-06T20:17:11Z
null
2
0
15
0
3
8
null
MIT
JavaScript
jadaun-sahab/Tex-utils-using-react
main
# 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. ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/). ### Code Splitting This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) ### Analyzing the Bundle Size This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) ### Making a Progressive Web App This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) ### Advanced Configuration This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) ### Deployment This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) ### `npm run build` fails to minify This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
This is a basic application where you can convert your text to lowercase or uppercase or you can remove extra space also this application is build with react and bootstrap
bootstrap,css,javascript,reactjs
2023-07-12T14:59:35Z
2023-08-06T13:14:16Z
null
1
0
114
0
0
8
null
null
JavaScript
abereghici/web-feed
main
<div align="center"> <h1 align="center"> <a href="https://web-feed.dev"><img src="https://web-feed.dev/img/og.jpeg?1" alt="Web Feed" /></a> </h1> <strong align="center"> Web feed for web developers </strong> <p> We bring you a curated list of blogs and resources, delivered through RSS, so you can effortlessly stay up to date with the latest trends, insights, and best practices. Whether you're a seasoned developer or just starting your coding journey, our application empowers you to access a wealth of valuable information, saving you time and effort in staying informed. </p> </div>
A curated list of blogs and resources for web developers, delivered through RSS, to effortlessly stay up to date with the latest trends, insights, and best practices.
articles,blog,development,frontend,javascript,links,news,react,rss-aggregator,rss-feed
2023-07-10T18:07:35Z
2024-04-16T06:51:33Z
null
1
2
60
0
0
8
null
null
TypeScript
HichemTab-tech/CopyShareify-js
master
# CopyShareify-js **CopyShareify-js** is a versatile JavaScript library that enhances buttons with customizable actions. With CopyShareify-js, you can effortlessly transform ordinary buttons into powerful tools that enable various actions, including copying content, sharing on social media platforms, and more. ## Features - Seamlessly integrate copy and share functionality into buttons on your web pages - Copy strings, HTML elements, and even images to the clipboard - Customize the action behavior based on your specific requirements - Easy way to integrate without manually add the events. ## Installation ### npm You can install CopyShareify-js via npm: ```bash npm install copyshareify-js ``` ### CDN You can also include CopyShareify-js directly from a CDN by adding the following script tag to your HTML file: ```HTML <script src="https://cdn.jsdelivr.net/gh/HichemTab-tech/CopyShareify-js@1.3.2/dist/copyshareify.min.js"></script> ``` ### Local Download If you prefer to host the library locally, you can download the latest release from the source code and include it in your project: ```HTML <script src="path/to/copyshareify.min.js"></script> ``` ## Usage ### HTML Attribute Method To use CopyShareify-js with HTML attributes, include the necessary dependencies (e.g., jQuery) and the CopyShareify-js script in your HTML file. Use the data-action attribute to specify the action, and other data attributes to configure the options. ```html <!DOCTYPE html> <html> <head> <title>Your Page Title</title> <!-- Include the necessary dependencies --> <script src="path/to/jquery.js"></script> <script src="path/to/copyshareify.js"></script> </head> <body> <!-- Your HTML content here --> <button data-action="copy" data-string="Hello, world!">Copy Text</button> <button data-action="share" data-title="My Page" data-description="Check out this amazing website!" data-string="https://www.example.com">Share Link</button> <script> // Initialize CopyShareify on the buttons $('[data-action]').CopyShareify(); </script> </body> </html> ``` ### Individual Element Method Alternatively, you can trigger CopyShareify on individual elements by passing an options object: ```html <!DOCTYPE html> <html> <head> <title>Your Page Title</title> <!-- Include the necessary dependencies --> <script src="path/to/jquery.js"></script> <script src="path/to/copyshareify.js"></script> </head> <body> <!-- Your HTML content here --> <button id="copyButton">Copy Text</button> <button id="shareButton">Share Link</button> <script> // Initialize CopyShareify on the buttons individually $('#copyButton').CopyShareify({ action: 'copy', string: 'Hello, world!', }); $('#shareButton').CopyShareify({ action: 'share', title: 'My Page', description: 'Check out this amazing website!', string: 'https://www.example.com', }); </script> </body> </html> ``` ### Selecting the Text CopyShareify-js provides multiple ways to select the text to be copied or shared: - **String**: You can directly specify a string value to be copied or shared. - **HTML Input Selector**: You can select the text from an - HTML input element by providing the input selector. - **HTML Element Selector**: You can select the text from an HTML element by providing the element selector. - **HTML Image Selector**: You can select an image to be copied or shared by providing the image selector. Here's an example of how to use CopyShareify-js with different selection options: ```html <!DOCTYPE html> <html> <head> <title>Your Page Title</title> <!-- Include the necessary dependencies --> <script src="path/to/jquery.js"></script> <script src="path/to/copyshareify.js"></script> </head> <body> <!-- Your HTML content here --> <button data-action="copy" data-string="Hello, world!">Copy Text</button> <button data-action="share" data-title="My Page" data-description="Check out this amazing website!" data-string="https://www.example.com">Share Link</button> <input type="text" id="inputText" value="This is an input value"> <p id="paragraph">This is a paragraph text</p> <img id="image" src="path/to/image.jpg" alt="Image"> <button data-action="copy" data-html-input-selector="#inputText">Copy Input Text</button> <button data-action="copy" data-html-element-selector="#paragraph">Copy Paragraph Text</button> <button data-action="copy" data-html-img-selector="#image">Copy Image</button> <script> // Initialize CopyShareify on the buttons $('[data-action]').CopyShareify(); </script> </body> </html> ``` ## Options | Key | Description | |-----------------------|------------------------------------------------------------------------------------| | `action` | Specifies the action to be performed (e.g., "copy" or "share"). | | `string` | The string value to be copied or shared. | | `htmlInputSelector` | The selector of the HTML input element from which the text will be copied. | | `htmlElementSelector` | The selector of the HTML element from which the text will be copied. | | `htmlImgSelector` | The selector of the HTML image element to be copied. | | `title` | The title or subject of the content to be shared. | | `description` | The description or additional information about the content to be shared. | | `onActionDone` | The callback function to be executed when the action is successfully performed. | | `onActionFailed` | The callback function to be executed when the action fails or encounters an error. | ## Demo Here's a Demo example : [Demo](https://hichemtab-tech.github.io/CopyShareify-js/) ## Contributing Contributions are always welcome! If you have any ideas, improvements, or bug fixes, please open an issue or submit a pull request. ## Authors - [@HichemTab-tech](https://www.github.com/HichemTab-tech) ## License [MIT](https://github.com/HichemTab-tech/CopyShareify-js/blob/master/LICENSE)
CopyShareify-js is a versatile JavaScript library that enhances buttons with customizable actions. With CopyShareify-js, you can effortlessly transform ordinary buttons into powerful tools that enable various actions, including copying content, sharing on social media platforms, and more.
clipboard,copy-content,dom-manipulation,frontend-development,html,html-elements,javascript,javascript-library,jquery-plugin,share-content
2023-07-11T22:34:34Z
2023-08-30T07:09:23Z
2023-07-17T18:41:45Z
1
0
34
0
0
8
null
MIT
JavaScript
MozamelJawad/ToDoList
main
## To Do List Project with Testing <a name="readme-top"></a> <!-- TABLE OF CONTENTS --> # 📗 Table of Contents - [📖 About the Project](#about-project) - [🛠 Built With](#built-with) - [Tech Stack](#tech-stack) - [Live Demo](#live-demo) - [Key Features](#key-features) - [💻 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 --> # 📖 ToDoList <a name="about-project"></a> **ToDoList** is a learning project that builds in HTML, CSS, and Javascript and uses webpack to bundle Javascript; in this project, proper ES6 syntax is also implemented. The **ToDo List** interactive application helps you to add your functionalities; in the case of completion, you can mark it as complete, and if you want to delete it, it will be completely deleted from the list and local storage. ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> <ul> <li>Linters</li> <li>Webpack</li> <li>HTML</li> <li>CSS3</li> <li>JS (ES6 synthax)</li> </ul> ## 🚀 Live Demo <a name="live-demo"></a> - [Live Demo](https://mozameljawad.github.io/ToDoList/dist/) ## <!-- Features --> ### Key Features <a name="key-features"></a> - **The project allows users to add and remove things from the to-do list** - **The user can remove the completed To Dos after completion** <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- GETTING STARTED --> ## 💻 Getting Started <a name="getting-started"></a> ### Setup Clone this repository to your desired folder: https://github.com/MozamelJawad/ToDoList ### Install <ul> <li>npm init -y </li> <li>npm install webpack webpack-cli --save-dev</li> <li>npm install --save-dev html-webpack-plugin</li> <li>npm install webpack webpack-cli --save-dev</li> <li>npm install --save-dev style-loader css-loader </li> <li>npm install --save-dev webpack-dev-server</li> <li>npm run build</li> <li>npm start </li> </ul> ### Usage To run the project, execute the following command: > npm install ### Run tests > np start ### Deployment Project can be deployed by using the gh-pages and other web platforms. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ## 👥 Authors <a name="authors"></a> 👤 **Mozamel Jawad** - GitHub: [@githubhandle](https://github.com/MozamelJawad) - Twitter: [@twitterhandle](https://twitter.com/mozameljawad) - LinkedIn: [LinkedIn](https://www.linkedin.com/in/mozamel-jawad-2b4421111/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - [ ] **[I will try to add some more user interactivity using JS]** <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/MozamelJawad/ToDoList/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, give a ⭐️ <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> I would like to thank from 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>
The To-Do List application is designed to allow users to save their daily activities sequentially and can completely delete the completed activities from the local storage. The application developed in JavaScript
css,html,javascript,linter-config,webpak5
2023-07-19T08:49:13Z
2024-02-11T11:05:34Z
null
2
5
64
2
0
8
null
MIT
JavaScript
GautamPatil1/FYMaterials
master
# [https://FYMaterials.live](https://fymaterials.live) ![FYMaterials Logo](https://fymaterials.tech/static/hosting-services.png) FYMaterials is a comprehensive web application designed to cater to the academic needs of first-year students at GH Raisoni College of Engineering Pune. It serves as a centralized platform for accessing notes, previous year question papers, and journals, providing students with valuable resources to excel in their studies. ## Features - **Extensive Collection of Notes:** FYMaterials offers a vast repository of meticulously curated notes covering various subjects, ensuring that students have easy access to comprehensive study materials. - **Previous Year Question Papers:** The platform provides an extensive collection of previous year question papers, enabling students to familiarize themselves with the examination pattern and practice effectively. - **Interactive Journals:** FYMaterials incorporates interactive journals that foster collaboration among students, allowing them to share insights, discuss topics, and enhance their understanding through peer-to-peer learning. - **User-Friendly Interface:** The website boasts a clean and intuitive user interface, providing a seamless browsing experience. The search functionality enables quick access to specific subjects or topics, saving valuable time for students. - **Responsive Design:** FYMaterials is designed to be responsive, ensuring optimal performance and accessibility across various devices, including desktops, laptops, tablets, and mobile phones. ## Installation To set up FYMaterials locally, follow these steps: 1. Clone the repository: 2. Install the required dependencies: 4. Access FYMaterials in your web browser at `http://localhost:8000`. ## Contribution We welcome contributions from the open-source community to enhance FYMaterials. If you would like to contribute, please follow our [contribution guidelines](CONTRIBUTING.md). Developers Gautam Patil (Front End, Back End, Database, Deployment) Shrinivas Narhare (Front End , Design, UI/UX) Ajay Pandit ( Security, Hosting) Gunjan Kawale (Backend Development) Resource Providers Shrinivas Narhare Meet Patil Saloni Parab Ajay Pandit Gautam Patil ## License FYMaterials is released under the [MIT License](https://github.com/GautamPatil1/FYMaterials/edit/master/License.md). --- For more details and information, visit the [FYMaterials website](https://fymaterials.tech) or contact our team at [fymaterials@outlook.com](mailto:fymaterials@outlook.com).
FYMaterials is a comprehensive web application designed to cater to the academic needs of first-year students at GH Raisoni College of Engineering Pune.
containerization,css,django,docker,docker-compose,html,javascript,python,react
2023-07-03T09:30:47Z
2024-04-30T06:45:45Z
2024-02-18T06:47:06Z
4
26
41
0
3
8
null
MIT
HTML
LiveWithCodeAnkit/Electricity-Calculator
master
# Electric City Bill Calculator - Next.js 13 Project This project is a Next.js 13 application that serves as an electric city bill calculator. It allows users to input their consumption data and calculates the corresponding bill amount based on predefined tariff rates and additional charges. ## Features - Next.js 13: The project is built on the latest version of Next.js, a powerful React framework that offers server-side rendering and an extensive development ecosystem. - Tailwind CSS: The application's design is implemented using the Tailwind CSS framework, providing a utility-first approach for efficient styling and customization. - Electric City Bill Calculation: Core functionality includes accurately calculating electric city bills based on user inputs such as consumption, tariff rates, and additional charges. - Responsive User Interface: The application is designed to be responsive and provide an optimal user experience across different devices and screen sizes. - Interactive Form: Users can easily enter their consumption data through a dynamic form, enabling input validation and immediate bill calculation updates. - Real-time Updates: Users can observe the calculated bill amount instantly as they make changes to the input values, receiving immediate feedback. - Result Display: The application displays the calculated bill amount along with a breakdown of the different components, such as consumption charges, taxes, and any applicable discounts or surcharges. - Modular and Maintainable Codebase: The project's codebase follows best practices for organization, reusability, and maintainability, facilitating code readability and future enhancements. - Documentation: The repository includes detailed documentation, providing instructions on setting up the project, understanding the code structure, and contributing to its further development. ## Getting Started Follow these steps to get the project up and running on your local machine: 1. Clone the repository: `git clone [repository URL]` 2. Install dependencies: `npm install` 3. Start the development server: `npm run dev` 4. Open your browser and visit `http://localhost:3000` to access the application. ## Contribution Contributions are welcome! If you find any issues or have ideas for improvements, feel free to open an issue or submit a pull request. Please ensure that your contributions adhere to the established coding standards and follow the repository's license. ## License This project is licensed under the [MIT License](LICENSE). --- We hope you find this project useful! If you have any questions or need further assistance, please don't hesitate to reach out.
This Git repository contains a Next.js 13 project designed to calculate electric city bills. The project utilizes the Tailwind CSS framework and JavaScript to create an intuitive and responsive user interface for efficient bill calculations.
flex,html-css-javascript,javascript,nextjs13,reactjs,router,router-dom,tailwindcss
2023-07-05T14:39:33Z
2023-08-16T17:33:54Z
null
1
0
8
0
0
8
null
null
JavaScript
luxluth/ass-html5
main
<div align="center"> # ass-html5 Display ASS/SSA subtitles on html5 videos ![CI workflow](https://github.com/luxluth/ass-html5/actions/workflows/main.yml/badge.svg) ![Publish workflow](https://github.com/luxluth/ass-html5/actions/workflows/publish.yml/badge.svg) ![License](https://img.shields.io/github/license/luxluth/ass-html5?color=blue) ![npm bundle size](https://img.shields.io/bundlephobia/min/ass-html5) ![npm](https://img.shields.io/npm/v/ass-html5?logo=npm&color=white&link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fass-html5) </div> ## Table of Contents - [ass-html5](#ass-html5) - [Table of Contents](#table-of-contents) - [Installation](#installation) - [Usage](#usage) - [Options](#options) - [Simple HTML](#simple-html) - [Svelte and Plry](#svelte-and-plry) - [videojs](#videojs) - [Credits](#credits) ## Installation ```bash pnpm add ass-html5 ``` ## Usage ### Options | option | description | required | type | default | | :-----: | :---------------------------------------------------------------------------------------------------------: | :------: | :---------------------------: | :-------------------: | | assText | The ass text string | ✅ | `string` | `undefined` | | video | The video to display the subtile on. Can be either an `HTMLVideoElement` or `string` (html query selector ) | ✅ | `HTMLVideoElement` / `string` | `undefined` | | fonts | Custom fonts to load | 🚫 | [`Font[]`](src/ass.ts#L77) | `undefined` | | zIndex | zIndex of the rendering frame | 🚫 | `number` | Drawn after the video | | onReady | A Callback that is invoked when the preprocess of the ass text by render is done | 🚫 | `() => void` | `undefined` | | logging | Type of logging (experimental) | 🚫 | [`LOGTYPE`](src/ass.ts#L44) | `LOGTYPE.DISABLE` | ### Simple HTML > [!NOTE] > The simple `video` tag element, on fullscreen mode, the position of the video is absoluty on top of any element. > No other element can go on top of it. > > It's therefore recommanded to use a third party player rather than the native one. You can see an example with [plry](https://github.com/sampotts/plyr) [here](#svelte-and-plry). ```html <script src="https://cdn.jsdelivr.net/npm/ass-html5@0.5.0/dist/ass.min.js"></script> ``` ```html <video src="/assets/video.mp4" id="video" controls></video> ``` ```html <script> document.addEventListener('DOMContentLoaded', async () => { let res = await fetch('/assets/video.ass'); let assSubs = await res.text(); const ass = new ASS.default({ assText: assSubs, video: document.getElementById('video') }); await ass.render(); }); </script> ``` ### [Svelte](https://github.com/sveltejs/svelte) and [Plry](https://github.com/sampotts/plyr) ```svelte <script lang="ts"> import video from '$lib/assets/video.mp4' import cc from '$lib/assets/cc.ass?raw' import ASS from 'ass-html5' import { onMount } from 'svelte'; import Plyr from 'plyr' const ass = new ASS({ assText: cc, video: "#video-test" }) let vidElement: HTMLVideoElement let player: Plyr onMount(async () => { player = new Plyr(vidElement) await ass.render() }) </script> <div class="video-container"> <!-- svelte-ignore a11y-media-has-caption --> <video preload="metadata" src="{video}" id="video-test" controls autoplay class="vid" bind:this={vidElement} ></video> </div> ``` ### [videojs](https://github.com/videojs/video.js) In the `head` : ```html <script src="https://cdn.jsdelivr.net/npm/ass-html5@<VERSION>/dist/ass.min.js" defer></script> <script src="https://vjs.zencdn.net/8.3.0/video.min.js" defer></script> <link href="https://vjs.zencdn.net/8.3.0/video-js.css" rel="stylesheet" /> ``` In the `body` : ```html <video id="my-video" class="video-js" controls preload="auto" width="1280" height="720" data-setup="{}" > <source src="assets/video.mp4" type="video/mp4" /> </video> ``` In the `script` tag : ```html <script> document.addEventListener('DOMContentLoaded', async () => { let res = await fetch('/assets/video.ass'); let assSubs = await res.text(); var player = videojs('my-video'); player.ready(async () => { // Get the video element from the player var videoElement = player.el().getElementsByTagName('video')[0]; const ass = new ASS.default({ assText: assSubs, video: videoElement }); await ass.render(); }); }); </script> ``` --- # Credits Thanks to the [ass-compiler](https://github.com/weizhenye/ass-compiler/) from weizhenye.
Display ASS/SSA subtitles for html video
aegisub,ass-subtitles,libass,subtitles,html5,javascript,ssa-subtitles,typescript,html-canvas
2023-07-10T08:39:57Z
2024-05-20T15:11:00Z
2024-05-14T02:21:56Z
1
61
182
0
0
8
null
MIT
TypeScript
PangoraWeb/remindme-bot
main
<div align="center"> ![GitHub tag (latest SemVer)](https://img.shields.io/github/release/PangoraWeb/remindme-bot.svg?style=for-the-badge) [![GitHub issues](https://img.shields.io/github/issues-raw/PangoraWeb/remindme-bot.svg?style=for-the-badge)](https://github.com/PippitWeb/pippit/issues) [![License](https://img.shields.io/github/license/PangoraWeb/remindme-bot.svg?style=for-the-badge)](LICENSE) ![GitHub stars](https://img.shields.io/github/stars/PangoraWeb/remindme-bot.svg?style=for-the-badge) </div> <div align="center"> <img src="https://github.com/PangoraWeb/remindme-bot/assets/73616169/7b5a8297-7c60-4bb7-b09d-63feaa72803a" width=200px height=200px></img> <h3 align="center"><a href="">RemindMe Bot</a></h3> <p align="center"> A reminder bot for Pangora, Lemmy, and Kbin to remind yourself after a period of time. </p> </div> ## About the Bot The remindme bot responds to you after a period of time to remind you about something (e.g. if someone in a post says theyre going to do something after a week and you want to be there for that) Theres a version of this bot being hosted currently in programming.dev. You can still self host your own if you want to do things like customize it a bit more for your community but its not required. All remindme bots can work simultaneously since its triggered off of mentions as opposed to a command. ## Usage To use the bot you need to mention it and put a length of time somewhere in the message. `Example: @RemindMe@programming.dev 5 years` `Example: @RemindMe@programming.dev remind me about this in 2 minutes` In order to function in your community you need to request that it be added to the whitelist in the issues tab in this repository (only mods + admins of the community can request) ## Self-Hosting Setup You need node.js downloaded to run this 1. Clone the repository (`git clone https://github.com/PangoraWeb/remindme-bot.git` in a terminal) 2. Create an account in the instance you want the bot to have as its home (just make a regular user) 3. Create a file called .env in the bot folder and give it values in this format with the data in the quotes (dont add the slashes or the part after the slashes) ``` LEMMY_INSTANCE="" // The instance the bot account is in LEMMY_USERNAME="" // The bot username LEMMY_PASSWORD="" // The bot password ``` 4. Change the data in config.yaml based on what you want set 5. Open a terminal in the bot folder and run `npm install` to install dependendies and then `node main.js` to run the bot (whenever you want to start the bot again you can just do ctrl+c to interrupt the process and node main.js to start the bot) I recommend installing something like [forever.js](https://www.npmjs.com/package/forever) for running it in the background on your server If you run into issues feel free to dm me on Matrix [here](https://matrix.to/#/@ategon:matrix.org) ## Contributing If you want to contribute to add some sort of feature feel free to make a pull request with it added [This repository](https://github.com/firstcontributions/first-contributions) has some info on how to do development in a repository and make a pull request ## Credits Icon base by [Delapouite](https://delapouite.com/) under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) with modifications to add a gradient
A pangora/lemmy/kbin bot that reminds you after an amount of time
bot,bots,fediverse,fediverse-bot,javascript,lemmy,lemmy-bot,kbin,pangora
2023-07-17T13:56:01Z
2023-11-14T00:17:27Z
2023-09-23T04:13:57Z
1
0
38
1
0
7
null
AGPL-3.0
JavaScript
stevenlafl/nextjs13-router-events
master
# NextJS 13 Router Events Provides NextJS 13 router events compatible with the App Router https://www.npmjs.com/package/nextjs13-router-events?activeTab=readme ## Usage ``` npm install nextjs13-router-events ``` Replace regular NextJS `Link` components with this one: ```tsx import { Link } from 'nextjs13-router-events'; ``` That Link component should be compatible with your setup. Your layout.tsx: ```tsx import { RouteChangeProvider } from 'nextjs13-router-events'; ... return ( <RouteChangeProvider> {children} </RouteChangeProvider> ) ``` Your component, where you want to monitor the onRouteChangeStart and onRouteChangeComplete events: ```tsx import { useRouteChange } from 'nextjs13-router-events'; ... export default function Component(props: any) { ... useRouteChange({ onRouteChangeStart: () => { console.log('onStart 3'); }, onRouteChangeComplete: () => { console.log('onComplete 3'); } }); ... } ``` ## Credits Inspired by https://github.com/joulev/nextjs13-appdir-router-events
Provides NextJS 13 router events compatible with the App Router
app-router,app-router-nextjs,events,javascript,nextjs,nextjs13,router,router-events,typescript
2023-07-16T08:37:54Z
2023-11-26T21:54:02Z
null
1
0
6
2
0
7
null
MIT
TypeScript
LeeBingler/Reactshop
main
<img src='https://github.com/LeeBingler/ReactShop/assets/98109693/7f507a9b-7356-42f6-a1e2-98f2ae02514c' alt='ReactShop' width='100%' height='200px'/> [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/) ![Static Badge](https://img.shields.io/badge/Dependencies-NPM-black) ![GitHub repo size](https://img.shields.io/github/repo-size/LeeBingler/ReactShop) # ReactShop - An E-commerce Website ReactShop is an impressive e-commerce website built with React.JS and Tailwind. It allows users to browse through various products and make purchases. The project's code is licensed under the MIT License, providing flexibility for usage and distribution. ## Tech Stack Reactshop is developed using the following technologies: 1. **HTML:** The backbone of the web pages, providing the structure and content. 2. **CSS:** Responsible for the visual styling and layout of the website. 3. **JavaScript:** Adding interactivity and functionality to the site. ## Frameworks and Libraries To enhance the development process and user experience, the following frameworks and libraries have been utilized: 1. **React:** A popular JavaScript library for building user interfaces, enabling fast and dynamic updates to the website. 2. **Tailwind:** A utility-first CSS framework that streamlines styling and allows for the creation of clean and responsive designs. 3. **Node.js** an open source, cross-platform runtime environment for executing JavaScript code it is used extensively for server-side programming. ## Testing Library ReactShop uses the "Vitest" testing library to ensure the stability and correctness of the codebase. Automated testing is crucial for maintaining a reliable application. ## API Integration The website is integrated with the [Stripe](https://stripe.com/en-fr) API, a payment processing platform that lets your business safely and effectively accept online and credit card payments, and the [Fake Store API](https://fakestoreapi.com/), a fictional API that provides product data. Two main API endpoints are used: 1. **Get all products:** Fetches a list of all available products from the API. 2. **Get a single product:** Retrieves detailed information about a specific product from the API. Here's an example of how the API is utilized in JavaScript: ```javascript // Get all products fetch('https://fakestoreapi.com/products') .then(res => res.json()) .then(json => console.log(json)); // Get a single product fetch('https://fakestoreapi.com/products/1') .then(res => res.json()) .then(json => console.log(json)); ``` ## Build/Run and Deployment To set up the project locally, you need Node.js and NPM installed on your machine. ### Website: To run the website, follow these steps: 1. Clone the repository and navigate to the project folder. 2. Install the project dependencies using `npm install`. 3. Run the web application using `npm run dev`. 4. Run tests with `npm run test`. For deployment, execute `npm run build`. The generated build files can then be hosted on a web server or a platform like Netlify for public access. ### Server: To run the server, follow these steps: 1. Clone the repository and navigate to the project folder. 2. Install the project dependencies using `npm run build:server`. 3. Run the web application using `npm run start:server`. ## Copyright and License The ReactShop project is open-source and distributed under the MIT License, granting users the freedom to use, modify, and distribute the code. For more details, refer to the License File provided in the project. Feel free to explore the code, contribute, or use ReactShop as a foundation for your e-commerce projects. Happy coding!
An ecommerce website / shopping cart build with React.JS and Tailwind
ecommerce,javascript,react,reactjs,tailwindcss,vitest,e-commerce,e-commerce-website,tailwind-css,webapp
2023-07-07T08:30:46Z
2023-11-23T00:48:34Z
null
6
54
365
1
4
7
null
MIT
JavaScript
JaeAeich/Chaty
main
# Chaty - The Social Solution Introducing Chaty, the cutting-edge social media app designed to bring people closer, spark meaningful connections, and revolutionize the way we interact in the digital world. With its sleek and intuitive interface, Chaty offers a seamless and delightful user experience, catering to users of all ages and backgrounds. ## Chaty API Reference ### User Routes #### Get All Users | User Routes | | | --------------------- | ----------------------------------------------------- | | **Get All Users** | `GET /api/user` | | | - **Auth Required:** Yes (using `protect` middleware) | | | | | **Register User** | `POST /api/user` | | | - **Auth Required:** No | | | | | **Authenticate User** | `POST /api/user/login` | | | - **Auth Required:** No | ```http GET /api/user ``` - **Auth Required:** Yes (using `protect` middleware) Fetches all users. #### Register User ```http POST /api/user ``` - **Auth Required:** No Registers a new user. #### Authenticate User (Login) ```http POST /api/user/login ``` - **Auth Required:** No Authenticates a user during login. ### Chat Routes | Chat Routes | | | ------------------------------- | ----------------------------------------------------- | | **Access Chat** | `POST /api/chat` | | | - **Auth Required:** Yes (using `protect` middleware) | | | | | **Fetch Chats** | `GET /api/chat` | | | - **Auth Required:** Yes (using `protect` middleware) | | | | | **Create Group Chat** | `POST /api/chat/group` | | | - **Auth Required:** Yes (using `protect` middleware) | | | | | **Rename Group Chat** | `PUT /api/chat/rename` | | | - **Auth Required:** Yes (using `protect` middleware) | | | | | **Remove User from Group Chat** | `PUT /api/chat/groupremove` | | | - **Auth Required:** Yes (using `protect` middleware) | | | | | **Add User to Group Chat** | `PUT /api/chat/groupadd` | | | - **Auth Required:** Yes (using `protect` middleware) | #### Access Chat ```http POST /api/chat ``` - **Auth Required:** Yes (using `protect` middleware) Grants access to a specific chat. #### Fetch Chats ```http GET /api/chat ``` - **Auth Required:** Yes (using `protect` middleware) Fetches all chats. #### Create Group Chat ```http POST /api/chat/group ``` - **Auth Required:** Yes (using `protect` middleware) Creates a new group chat. #### Rename Group Chat ```http PUT /api/chat/rename ``` - **Auth Required:** Yes (using `protect` middleware) Renames an existing group chat. #### Remove User from Group Chat ```http PUT /api/chat/groupremove ``` - **Auth Required:** Yes (using `protect` middleware) Removes a user from a group chat. #### Add User to Group Chat ```http PUT /api/chat/groupadd ``` - **Auth Required:** Yes (using `protect` middleware) Adds a user to a group chat. ### Message Routes | Message Routes | | | ------------------------------ | ----------------------------------------------------- | | **Get All Messages in a Chat** | `GET /api/message/:chatId` | | | - **Auth Required:** Yes (using `protect` middleware) | | | | | **Send Message** | `POST /api/message` | | | - **Auth Required:** Yes (using `protect` middleware) | #### Get All Messages in a Chat ```http GET /api/message/:chatId ``` - **Auth Required:** Yes (using `protect` middleware) Fetches all messages in a chat. #### Send Message ```http POST /api/message ``` - **Auth Required:** Yes (using `protect` middleware) Sends a new message. These API endpoints enable various functionalities in the Chaty social media app, including user registration and authentication, accessing and managing chats, sending and receiving messages, and interacting with group chats. The app leverages Socket.IO for real-time communication between users, facilitating a seamless and engaging user experience. ## Authors - [@JaeAeich](https://github.com/JaeAeich) ## Features - User Registration and Authentication: - Users can register to create an account in the app. - Users can authenticate themselves through login. - Fetching Users: - Users can fetch all users from the app. - Chat Management: - Users can access a specific chat by providing appropriate authorization. - Users can fetch all chats available in the app. - Users can create a new group chat. - Users can rename an existing group chat. - Users can remove a user from a group chat. - Users can add a user to a group chat. - Messaging: - Users can fetch all messages in a specific chat. - Users can send new messages in a chat. - Real-Time Communication: - The app leverages Socket.IO for real-time communication, allowing seamless and instant updates in chats and messages. These features collectively enable users to interact and communicate with each other effectively within the Chaty social media app. With user registration and authentication, users can securely create accounts and access their personalized chat experiences. The app offers versatile chat management, empowering users to create and manage both individual and group chats. Additionally, the messaging functionality facilitates real-time communication, ensuring messages are delivered and received instantly, providing an engaging and interactive user experience. ## Chaty Installation Guide To install and run the Chaty app on your local machine, follow the steps below: ### Prerequisites Before getting started, make sure you have the following installed on your system: - Node.js (v14.x or later) - MongoDB ### Clone the Repository First, clone the Chaty repository to your local machine using Git: ```bash git clone https://github.com/JaeAeich/Chaty.git ``` ### Server Configuration 1. Navigate to the `server` folder: ```bash cd chaty/server ``` 2. Create a `.env` file in the `server` folder with the following content: ```env PORT=4000 MONGO_URI=mongodb+srv://your-mongodb-connection-string JWT_SECRET=your-jwt-secret CLIENT_BASE_URL=http://localhost:5173 ``` Replace `your-mongodb-connection-string` with your actual MongoDB connection string and choose a secure value for `JWT_SECRET`. 3. Install the server dependencies from the root folder: ```bash npm install ``` 4. Run the server in development mode with nodemon: ```bash npm run dev ``` Alternatively, you can run the server without nodemon: ```bash npm start ``` ### Client Configuration 1. Navigate to the `client` folder: ```bash cd chaty/client ``` 2. Create a `.env` file in the `client` folder with the following content: ```env VITE_BACKEND_BASE_URL=http://localhost:4000 ``` 3. Install the client dependencies: ```bash npm install ``` 4. Run the client in development mode: ```bash npm run dev ``` ### Accessing Chaty Once the server and client are running, you can access the Chaty app in your browser by visiting `http://localhost:5173`. Congratulations! You have successfully installed and configured Chaty on your local machine. You can now explore the app's features and functionalities. Note: For production deployment, make sure to set appropriate environment variables and follow best security practices to ensure the app's safety and performance. Enjoy using Chaty for seamless and engaging social interactions! ## Color Reference | Variable | Color Code | | :---------------- | :--------- | | --color-primary | #314357 | | --color-secondary | #456672 | | --color-accent | #e3b587 | | --color-cta | #c98c70 | | --color-bg | #edeee2 | These are the key variables representing the colors used in the Chaty app. Each color is identified by its respective hexadecimal color code, allowing for easy reference and consistency in the app's design. ## Contributing Contributions are always welcome! See `contributing.md` for ways to get started. Please adhere to this project's `code of conduct`. ## License [MIT](https://choosealicense.com/licenses/mit/) ## Screenshots - Login ![Login](./assets/Login.png) - Signup ![Signup](./assets/Signup.png) - Success Login ![Success Login](./assets/SuccessLogin.png) - Chat ![Chat](./assets/Elon.png) - Small Screen ![Small Screen](./assets/SmallTalk.png) - Multi Screen ![Multi Screen](./assets/JaneJohn.png) - Responsive Small screen chats ![Small](./assets/Small.png) - Profile ![Profile](./assets/PFP.png) - Group Setting ![Group Settings](./assets/GroupSetting.png) ## Final Words Thank you for taking the time to explore our project! We hope you found it insightful and valuable. Your support and feedback mean the world to us, and we truly appreciate your interest in our work. If you have any questions, suggestions, or would like to contribute to this project, please don't hesitate to reach out. We believe that collaboration and community involvement are key to creating meaningful and impactful projects. Once again, thank you for being a part of our journey. Happy coding! 🚀
The cutting-edge social media app designed to bring people closer, spark meaningful connections, and revolutionize the way we interact in the digital world
backend,chat,javascript,nodejs,react,socket-io,webdevelopment,hacktoberfest
2023-07-16T06:20:19Z
2023-07-30T18:13:18Z
null
1
4
65
2
1
7
null
MIT
JavaScript
AnnaMihailovna/prettypets-django-react
main
## Проект "PrettyPets" --- ### Описание проекта PrettyPets — социальная сеть для обмена фотографиями любимых питомцев.Проект состоит из бэкенд-приложения на Django и фронтенд-приложения на React. Деплой на удаленный сервер. В PrettyPets можно: * Зарегистрироваться. * Добавить фото питомца. * Удалить питомца. * Подобрать окраску питомца. * Рассказать о достижениях питомца. * Указать год рождения питомца. --- ### В проекте были использованы технологии * Python 3.9 * Django REST * Gunicorn * Nginx * JS * Node.js --- ### Деплой Подключитесь к удалённому серверу ``` ssh -i путь_до_SSH_ключа/название_файла_с_SSH_ключом_без_расширения login@ip ``` Клонируйте проект на сервер ``` git clone git@github.com:AnnaMihailovna/prettypets-django-react.git ``` Переходим в директорию backend-приложения проекта ``` cd prettypets-django-react/backend/ ``` Создаём виртуальное окружение ``` python -m venv venv ``` Активируем виртуальное окружение ``` source venv/bin/activate ``` Обновляем pip в виртуальном окружении ``` pip install --upgrade pip ``` Устанавливаем зависимости ``` pip install -r requirements.txt ``` Из директории, в которой находится файл manage.py применяем миграции ``` python manage.py migrate ``` Создаём суперпользователя ``` python manage.py createsuperuser ``` Собираем статику бэкенда ``` python manage.py collectstatic ``` Из корня проекта скопируем статику бэкенда в системную директорию ``` sudo cp -r /home/yc-user/prettypets-django-react/backend/static_backend/ /var/www/kittygram/ ``` Запускаем веб-сервер разработки Django ``` python manage.py runserver ``` В файле settings.py xxx.xxx.xxx.xxx укажите IP вашего сервера ``` ALLOWED_HOSTS = ['xxx.xxx.xxx.xxx', '127.0.0.1', 'localhost'] ``` В другом окне терминала установите зависимости для фронтенд-приложения. Перейдите в директорию prettypets-django-react/frontend/ и выполните команду ``` npm i ``` Запустите приложение командой ``` npm run start ``` Проверте тестовый запуск в браузере по адресу http://внешний_ip_адрес_сервера:3000 ### Установка и запуск Gunicorn На удалённом сервере при активированном виртуальном окружении проекта ``` pip install gunicorn==20.1.0 ``` Из директории с файлом manage.py ``` gunicorn --bind 0.0.0.0:8000 backend.wsgi ``` Проверим на админке - должна работать без статики ``` http://ваш_публичный_IP:8000/admin/ ``` Остановим и запустим для непрерывной работы. В директории /etc/systemd/system/ создайте файл gunicorn.service и откройте его в Nano ``` sudo nano /etc/systemd/system/gunicorn.service ``` Подставьте в код из листинга свои данные, добавьте этот код без комментариев в файл gunicorn.service и сохраните изменения ``` [Unit] # Это текстовое описание юнита, пояснение для разработчика. Description=gunicorn daemon # Условие: при старте операционной системы запускать процесс только после того, # как операционная система загрузится и настроит подключение к сети. # Ссылка на документацию с возможными вариантами значений # https://systemd.io/NETWORK_ONLINE/ After=network.target [Service] # От чьего имени будет происходить запуск: # укажите имя, под которым вы подключались к серверу. User=yc-user # Путь к директории проекта: # /home/<имя-пользователя-в-системе>/ # <директория-с-проектом>/<директория-с-файлом-manage.py>/. # Например: WorkingDirectory=/home/yc-user/prettypets-django-react/backend/ # Команду, которую вы запускали руками, теперь будет запускать systemd: # /home/<имя-пользователя-в-системе>/ # <директория-с-проектом>/<путь-до-gunicorn-в-виртуальном-окружении> --bind 0.0.0.0:8000 backend.wsgi ExecStart=/home/yc-user/prettypets-django-react/backend/venv/bin/gunicorn --bind 0.0.0.0:8000 backend.wsgi [Install] # В этом параметре указывается вариант запуска процесса. # Значение <multi-user.target> указывают, чтобы systemd запустил процесс, # доступный всем пользователям и без графического интерфейса. WantedBy=multi-user.target ``` Чтобы точно узнать путь до Gunicorn, активируйте виртуальное окружение и воспользуйтесь командой ``` which gunicorn ``` Заново запустите процесс gunicorn.service ``` sudo systemctl start gunicorn ``` Добавьте процесс Gunicorn в список автозапуска операционной системы на удалённом сервере ``` sudo systemctl enable gunicorn ``` ### Установка Nginx Находясь на удалённом сервере, из любой директории ``` sudo apt install nginx -y sudo systemctl start nginx ``` Укажите файрволу, какие порты должны остаться открытыми ``` sudo ufw allow 'Nginx Full' sudo ufw allow OpenSSH ``` Включите файрвол ``` sudo ufw enable ``` Проверьте внесённые изменения ``` sudo ufw status ``` Запустите сборку фронтенд-приложения из директории prettypets-django-react/frontend/ ``` npm run build ``` Скопируйте в системную директорию Nginx (которую он использует по умолчанию для доступа к статическим файлам — /var/www/) содержимое папки .../frontend/build/ ``` sudo cp -r /home/yc-user/prettypets-django-react/frontend/build/. /var/www/taski/ ``` Чтобы фотографии котиков отображались на сайте, создайте директорию media в директории /var/www/kittygram/. Django-приложение будет использовать эту директорию для хранения картинок. В настройках бэкенда для константы MEDIA_ROOT указан путь до созданной директории media. Назначьте текущего пользователя владельцем директории media, чтобы Django-приложение могло сохранять картинки. Для этого используйте команду chown ``` sudo chown -R <имя_пользователя> /var/www/kittygram/media/ ``` Через редактор Nano откройте файл конфигурации веб-сервера ``` sudo nano /etc/nginx/sites-enabled/default ``` Удалите все настройки из файла, запишите и сохраните новые ``` server { listen 80; server_name публичный_ip_вашего_удалённого_сервера; location /api/ { client_max_body_size 20M; # Эта команда определяет, куда нужно перенаправить запрос. proxy_pass http://127.0.0.1:8000; } location /admin/ { client_max_body_size 20M; proxy_pass http://127.0.0.1:8000; } location /media/ { proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:8000; } location / { root /var/www/taski; index index.html index.htm; try_files $uri /index.html; } } ``` Проверьте файл конфигурации на ошибки ``` sudo nginx -t ``` Перезагрузите конфигурацию Nginx ``` sudo systemctl reload nginx ``` В адресную строку браузера введите внешний IP вашего удалённого сервера без указания порта. Команда для просмотра лога последних запросов ``` sudo tail /var/log/nginx/access.log ``` --- ### Попробовать демо-версию * [PrettyPets](https://prettykittygram.hopto.org) --- ### Над проектом работала(бэкенд и деплой) [AnnaMihailovna](https://github.com/AnnaMihailovna/)
🐢🐱🐶Проект "PrettyPets" - приложение для обмена фото любимцев. Деплой на удаленный сервер.
django-rest-framework,gunicorn,javascript,nginx,nodejs,python
2023-06-30T19:07:01Z
2023-08-30T17:19:48Z
null
1
0
11
0
0
7
null
null
JavaScript
the-officialjosh/My-Tutorials
main
# My-Tutorial-Notes-Documentation ## JAVASCRIPT - JONAS SCHMEDTMANN ### [JA01 - JAVASCRIPT FUNDAMENTALS](/courses/JA01.md) ### [JA02 - DEVELOPER SKILLS, DOM AND EVENTS FUNDAMENTALS](/courses/JA02.md) ### [JA03 - JAVASCRIPT BEHIND THE SCENES](/courses/JA03.md) ### [JA04 - DATA STRUCTURES, MODERN OPERATORS AND STRINGS](/courses/JA04.md) ### [JA05 - FUNCTIONS](/courses/JA05.md) ### [JA06 - ARRAYS](/courses/JA06.md) ### [JA07 - NUMBERS, DATES, INTL API AND TIMERS](/courses/JA07.md) ### [JA08 - ADVANCED DOM EVENTS](/courses/JA08.md) ### [JA09 - OBJECT ORIENTED PROGRAMMING (OOP) WITH JAVASCRIPT](/courses/JA09.md) ### [JA10 - OOP, GEOLOCATION (MAPTY)](/courses/JA10.md) ### [JA11 - ASYNCHRONOUS JAVASCRIPT: PROMISES, ASYNC/AWAIT AND AJAX](/courses/JA11.md) ### [JA12 - MODERN JAVASCRIPT DEVELOPMENT: MODULES, TOOLING AND FUNCTIONAL](/courses/JA12.md) ### [JA13 - FORKIFY APP](/courses/JA13.md)
Docs of Tutorials
html-css,javascript,nextjs,reactjs,scss,threejs
2023-06-30T02:54:46Z
2023-07-15T09:14:59Z
null
1
0
67
0
1
7
null
MIT
null
MadaraUchiha-314/rollup-plugin-module-federation
main
# rollup-plugin-module-federation ![Build](https://github.com/MadaraUchiha-314/rollup-plugin-module-federation/actions/workflows/ci.yaml/badge.svg) ![Node version](https://img.shields.io/node/v/rollup-plugin-module-federation) ![NPM package version](https://img.shields.io/npm/v/rollup-plugin-module-federation) A rollup plugin for [module federation](https://github.com/module-federation). ## Install ```sh npm install --save-dev rollup-plugin-module-federation ``` ```sh yarn add --dev rollup-plugin-module-federation ``` ## Usage ```js import federation from 'rollup-plugin-module-federation'; export default { plugins: [ federation({ name: 'rr-random-package', filename: 'my-remote-entry.js', exposes: { './react': 'react', './pqr': './src/pqr.js', './index': './src/index.js', }, shared: { react: {}, 'react-dom': {}, uuid: {}, }, }), ], }; ``` ## Local development ```sh npm install npm run build --workspaces --if-present # Run the http server npm run start # Goto URL: http://localhost:8080/packages/examples/project-a/dist/rollup/esm/ ```
A rollup plugin for module federation
module-federation,rollup,rollup-plugin,javascript,node,nodejs,hacktoberfest
2023-07-06T02:30:56Z
2024-05-23T16:26:55Z
2024-05-23T16:26:55Z
2
35
132
4
0
7
null
MIT
JavaScript
agence-adeliom/adeliom-webcomponents
next
<img src=".github/cover.png" width="100%"> # Adeliom WebComponents A forward-thinking library of web components. - Works with all frameworks 🧩 - Works with CDNs 🚛 - Fully customizable with CSS 🎨 - Includes an official dark theme 🌛 - Built with accessibility in mind ♿️ - Open source 😸 --- Documentation: [webcomponents.adeliom.io](https://webcomponents.adeliom.io) Source: [github.com/agence-adeliom/awc](https://github.com/agence-adeliom/adeliom-webcomponents) --- You can use this documentation to learn how to build AWC from source. You will need Node >= 14.17 to build and run the project locally. **You don't need to do any of this to use AWC!** This page is for people who want to contribute to the project, tinker with the source, or create a custom build of AWC. If that's not what you're trying to do, the [documentation website](https://webcomponents.adeliom.io) is where you want to be. ### What are you using to build AWC? Components are built with [LitElement](https://lit-element.polymer-project.org/), a custom elements base class that provides an intuitive API and reactive data binding. The build is a custom script with bundling powered by [esbuild](https://esbuild.github.io/). ### Forking the Repo Start by [forking the repo](https://github.com/agence-adeliom/adeliom-webcomponents/fork) on GitHub, then clone it locally and install dependencies. ```bash git clone https://github.com/YOUR_GITHUB_USERNAME/awc cd awc npm install ``` ### Developing Once you've cloned the repo, run the following command. ```bash npm start ``` This will spin up the dev server. After the initial build, a browser will open automatically. There is currently no hot module reloading (HMR), as browser's don't provide a way to reregister custom elements, but most changes to the source will reload the browser automatically. ### Building To generate a production build, run the following command. ```bash npm run build ``` ### Creating New Components To scaffold a new component, run the following command, replacing `tag-name` with the desired tag name. ```bash npm run create awc-tag-name ``` This will generate a source file, a stylesheet, and a docs page for you. When you start the dev server, you'll find the new component in the "Components" section of the sidebar. ### Contributing AWC is an open source project and contributions are encouraged! If you're interesting in contributing, please review the [contribution guidelines](CONTRIBUTING.md) first. ## License AWC is available under the terms of the [MIT license](./LICENSE.md).
A collection of professionally designed, every day UI components built on Web standards. Works with all framework as well as regular HTML/CSS/JS.
css,designsystem,html,javascript,lit,ui,ux,webcomponents
2023-07-17T15:15:44Z
2024-04-30T13:59:34Z
2024-04-30T13:59:34Z
4
150
227
3
2
7
null
MIT
TypeScript
simwai/referral-link-inserter
master
## 💜 Referral Link Inserter [![IDE: VS Code](https://img.shields.io/badge/IDE-VS_Code-blueviolet?logo=visual-studio-code)](https://code.visualstudio.com/) [![Style: XO Linter](https://img.shields.io/badge/linter-xo-blueviolet)](https://github.com/xojs/xo) [![License: MIT](https://img.shields.io/badge/License-MIT-mediumpurple.svg)](https://opensource.org/licenses/MIT) This Chrome extension inserts your affiliate tag when you visit Amazon. ### 🛠 Installation To install the extension: https://chrome.google.com/webstore/detail/referral-link-inserter/obaecligagaohlaficpfdplmgfpehcbo Alternatively, you can: - Download the latest relase - Unzip the zip folder `referral-link-inserter.zip`. - Navigate to `chrome://extensions` in your browser - Click "Load unpacked extension" and select the unzipped folder ### 💰 Features The extension will automatically insert your affiliate ID into Amazon search and product pages.<br> You'll start earning commissions on your referrals. ### ⚙️ Configuration The extension options page allows you to configure your affiliate IDs for each supported site. To open the options page: - Right-click on the extension icon and select "Options" or - Navigate to `chrome://extensions` and click "Options" ### 🚫 Limitations This extension may not be suitable for everyone due to several limitations associated with the Amazon Affiliate Program and other factors: - **Personal and Shared Orders:** Commissions are not provided for personal orders or orders made through one's own affiliate link. Additionally, commissions are not earned on orders placed through affiliate links that have been shared with friends or publicly distributed outside of personal websites or social media channels managed by the affiliate. - **Geographical Restrictions:** Residents of certain states or countries where the Amazon Affiliate Program is not supported cannot earn commissions. - **Browser Compatibility:** The extension is currently only available for Google Chrome, limiting users of other browsers such as Firefox, Safari, or Edge. - **Product Eligibility:** Not all products on Amazon are eligible for affiliate commissions, with some categories or specific products excluded from the program. - **Ad Blockers:** The functionality of the extension can be compromised by ad blockers, which may interfere with the insertion and tracking of affiliate links. - **Returned or Cancelled Orders:** Commissions can be revoked if the customer returns or cancels the order, affecting potential earnings. Users should review the Amazon Affiliate Program’s terms and conditions to fully understand these limitations and ensure compliance. ### 💡 TODO - [x] Add unit tests - [ ] Add Firefox support ### 🤝 Contributing Pull requests are welcome! Feel free to open issues for any bugs or ideas. ### 📄 License This project is licensed under the MIT License - see [LICENSE.md](LICENSE.md) for details.
Simple affiliate link injector chrome extension. It inserts the affiliate ID into the Amazon URLs.
affiliate,affiliate-marketing,amazon,chrome-extension,css,html,html5,injection,injector,javascript
2023-07-17T22:47:00Z
2024-04-25T09:58:57Z
2024-04-23T10:13:30Z
1
24
92
1
0
7
null
NOASSERTION
TypeScript
Mhamedshamaei/Shervinet_CMS
master
# Shervinet_CMS Frontend template of shervinet.com website. ![Screenshot](https://s8.uupload.ir/files/shervinet_ik4i.jpg)
Frontend template of shervinet.com website
bootstrap,bootstrap-5-template,business,business-template,css,frontend,html,javascript,template,website
2023-07-19T09:17:01Z
2024-04-08T17:31:03Z
null
1
0
41
0
0
7
null
null
HTML
PabloBona/Math-Magicians
dev
<a name="readme-top"></a> <div align="center"> <br> <h1 style="color:rgb(87, 247, 255);border: 3px solid rgb(87, 247, 255);">Math Magicians</h1> <br> </div> <div style="display: flex; justify-content: center; gap: 10px;"> <img src="./public/screen_1.png" alt="" style="max-width: 300px;" /> <img src="./public/screen_2.png" alt="" style="max-width: 300px;" /> <img src="./public/screen_3.png" alt="" style="max-width: 300px;" /> </div> <!-- TABLE OF CONTENTS --> # 📗 Table of Contents - [📗 Table of Contents](#-table-of-contents) - [📖 Math Magicians (Math-Magicians)](#Math-Magicians) - [🛠 Built With ](#-built-with-) - [Tech Stack ](#tech-stack-) - [Key Features ](#key-features-) - [🚀 Live Demo ](#-live-demo-) - [💻 Getting Started ](#getting-started) - [Install](#-install) - [Usage](#-usage) - [Run tests](#run-tests) - [Deployment](#deployment) - [👥 Authors ](#-author-) - [🔭 Future Features ](#-future-features-) - [🤝 Contributing ](#-contributing-) - [⭐️ Show your support ](#️-show-your-support-) - [🙏 Acknowledgments ](#-acknowledgments-) - [❓ FAQ (OPTIONAL) ](#-faq-optional-) - [📝 License ](#-license-) <!-- PROJECT DESCRIPTION --> <br> # 📖 Math Magicians (Math-Magicians) <a name="Math-Magicians"></a> "Math Magicians" is an interactive React website designed for mathematics enthusiasts. It serves as a Single Page App (SPA) where users can perform basic calculations and explore random quotes related to mathematics. <br> <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> The following stacks were used <details style="color:rgb(87, 247, 255);"> <ul> <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML">HTML</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">Javascript</a></li> <li><a href="hhttps://create-react-app.dev/">Create React App</a></li> </ul> </details> <!-- Features --> <p align="right">(<a href="#readme-top">back to top</a>)</p> ### Key Features <a name="key-features"></a> - **ReactJS library** - **Using JSX syntax** - **Unit test with jest** - **Boostrap** <p align="right">(<a href="#readme-top">back to top</a>)</p> ### 🚀 Live Demo <a name="live-demo"></a> <a href="https://math-magicians-bonpa.netlify.app/">Live Demo</a> <!-- GETTING STARTED --> <br> # 💻 Getting Started <a name="getting-started"></a> Clone this repository to your desired folder: Example commands: ```bash git clone git@github.com:PabloBona/Math-Magicians.git ``` <br> # 📖 Install Install this project's dependencies with: ``` cd Math-Magicians npm install ``` <br> # 📖 Usage To run the project, execute the following command: ```bash npm run 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. <br> # Run tests ```bash npm test ``` <br> # 📖 Run linterns tests If you follow the tutorial above to setup linters then you can run these tests ```$ npx hint . ``` ```$ npx stylelint "**/*.scss" ``` or if you use css then run this instead of the latter command above ```$ npx stylelint "**/*.{css,scss}" ``` <br> # 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!** ### Deployment You can deploy this project using: GitHub Pages or Netlify <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ### 👥 Author <a name="authors"></a> - 👤 **Pablo Bonasera** - GitHub: [@BonPa](https://github.com/PabloBona) - LinkedIn: [Pablo Bonasera](https://www.linkedin.com/in/pablo-bonasera-142327257/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - [ ] **Customizable notifications and alerts** - [ ] **Multilingual support** <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/PabloBona/Math-Magicians/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 you can follow me on github for more. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> - We would like to express our heartfelt gratitude to Microvere for the invaluable learning experience they have provided. The supportive community, dedicated mentors, and remote collaboration opportunities have enhanced my technical skills and prepared me for real-world projects. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FAQ (optional) --> ## ❓ FAQ (OPTIONAL) <a name="faq"></a> - **Are the linters necessary?** - It is a good practice to install and use them as they guide you towards best practice, but yes you can do without. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE --> ## 📝 License <a name="license"></a> This project is [MIT](https://github.com/PabloBona/Math-Magicians/blob/setup/create-react-linterns/MIT.md) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
"Math Magicians" is an interactive React website designed for mathematics enthusiasts. It serves as a Single Page App (SPA) where users can perform basic calculations and explore random quotes related to mathematics.
boostrap,design,javascript,layout,mathematics,react
2023-07-03T19:54:23Z
2023-07-12T21:05:31Z
null
2
7
55
0
0
7
null
null
JavaScript
OguzhanUmutlu/hizzy
main
# Hizzy Hizzy is a React based fullstack modern web framework! # [!!! THIS REPOSITORY HAS BEEN MOVED, YOU CAN VIEW THE LATEST VERSION OF HIZZY BY CLICKING ME !!!](https://github.com/hizzyjs/hizzy) [![](https://img.shields.io/badge/Discord-black?style=for-the-badge&logo=discord)](https://discord.gg/emAhrw3mvM) [![npm](https://img.shields.io/npm/v/hizzy.svg?style=for-the-badge)](https://www.npmjs.com/package/hizzy) # Installation To install Hizzy simply type this: ```bash npx hizzy ``` <!-- TOC --> * [Hizzy](#hizzy) * [Installation](#installation) * [Production Configuration](#production-configuration) * [Built-in addons](#built-in-addons) * [@hizzyjs/database](#hizzyjsdatabase) * [SQLite Support](#sqlite-support) * [MongoDB Support](#mongodb-support) * [MySQL Support](#mysql-support) * [JSON Database Support](#json-database-support) * [YAML Database Support](#yaml-database-support) * [XML Support](#xml-support) * [@hizzyjs/language](#hizzyjslanguage) * [@hizzyjs/authentication](#hizzyjsauthentication) * [Local authentication](#local-authentication) * [Discord authentication](#discord-authentication) * [@hizzyjs/error-overlay](#hizzyjserror-overlay) * [@hizzyjs/api](#hizzyjsapi) * [@hizzyjs/helmet](#hizzyjshelmet) * [@hizzyjs/images](#hizzyjsimages) * [@hizzyjs/requests](#hizzyjsrequests) * [🏎️ Blazingly fast and small-sized! 🏎️](#-blazingly-fast-and-small-sized-) * [Statistics](#statistics) * [JSX Support](#jsx-support) * [⚡ Instant server connection! ⚡](#-instant-server-connection-) * [@server](#server) * [@server/respond](#serverrespond) * [You might ask, why do I have to use `await` keyword for `@server/respond` functions?](#you-might-ask-why-do-i-have-to-use-await-keyword-for-serverrespond-functions) * [@server/join & @server/leave](#serverjoin--serverleave) * [@server/start](#serverstart) * [NOTE: This doesn't work when the development mode is on!](#note-this-doesnt-work-when-the-development-mode-is-on) * [Reason for the note: The @server/start runs when the server starts which is possible when it's production mode](#reason-for-the-note-the-serverstart-runs-when-the-server-starts-which-is-possible-when-its-production-mode) * [CLI](#cli) * [Providing the cd](#providing-the-cd) * [Example:](#example) * [Addon API](#addon-api) * [onLoad()](#onload) * [onEnable()](#onenable) * [onDisable()](#ondisable) * [onClientSideLoad()](#onclientsideload) * [onClientSideRendered()](#onclientsiderendered) * [onClientSideError()](#onclientsideerror) * [Why Hizzy?](#why-hizzy) * [Project history](#project-history) <!-- TOC --> # Production Configuration You might want to turn off `includeOriginalInBuild` for faster build scan. You might want to turn off `autoBuild` to prevent it from rebuilding every time. You should turn `dev` off by setting it to `false`. # Built-in addons ## @hizzyjs/database This addon adds these databases: ### SQLite Support ### MongoDB Support ### MySQL Support ### JSON Database Support ### YAML Database Support ### XML Support ## @hizzyjs/language This addon adds language support to your page! Check the [Language Support Example on GitHub](https://github.com/OguzhanUmutlu/hizzy/tree/main/examples/language) ## @hizzyjs/authentication ### Local authentication Check the [Local Authentication Example on GitHub](https://github.com/OguzhanUmutlu/hizzy/tree/main/examples/local-auth) ### Discord authentication Check the [Discord Authentication Example on GitHub](https://github.com/OguzhanUmutlu/hizzy/tree/main/examples/discord-auth) ## @hizzyjs/error-overlay An addon that makes a popup for errors whenever something doesn't work which helps you maintain your project easily! This feature is not fully done. ## @hizzyjs/api This feature is not fully done. ## @hizzyjs/helmet This addon lets you append things on the `<head>` tag using a custom tag named `<Helmet>`! Example: ```jsx import Helmet from "@hizzyjs/helmet"; export default <> <Helmet> <title>Hello, world!</title> </Helmet> Hello, world! </> ``` Check the [Helmet Example on GitHub](https://github.com/OguzhanUmutlu/hizzy/tree/main/examples/helmet) ## @hizzyjs/images An addon that adds a better progressive load to images that first shows the image's blurred version then the actual image. This feature is not fully done. Check the [Images Example on GitHub](https://github.com/OguzhanUmutlu/hizzy/tree/main/examples/images) ## @hizzyjs/requests This feature is not fully done. # 🏎️ Blazingly fast and small-sized! 🏎️ Hizzy is blazingly fast compared to its competitors! ## Statistics Coming soon... # JSX Support You can use JSX which lets you add HTML/Components inside your code! # ⚡ Instant server connection! ⚡ There are comment decorators in Hizzy that allow you to run specific server-sided functions you want to run! ## @server The `@server` decorator lets client run a function that is run in the server side! An example that logs "Hello, world!" to the server terminal whenever a button is pressed: ```jsx // @server function helloWorld() { console.log("Hello, world!"); } export default <button onClick={helloWorld}></button> ``` And you might be asking yourself... Can't the client see the inside of the server-sided function then? **No! Only thing the client knows is that the server-sided function is called helloWorld! How amazing is that!?** ## @server/respond The `@server/respond` decorator lets client run a function that is run in the server side and get the returned value! An example that adds two numbers and sends them back to the client: ```jsx // @server/respond function secretFunction(a, b) { // Client doesn't know that it's just addition! return a + b; } export default <div>The secret function says {await secretFunction(2, 2)}</div>; ``` ### You might ask, why do I have to use `await` keyword for `@server/respond` functions? The reason is it's not instant in literal sense. Since it uses sockets to run functions, it takes little to no time. But it can't be instant. ## @server/join & @server/leave The `@server/join` decorator will be run when a client joins. The function will be executed from the server side. The `@server/leave` decorator will be run when a client leaves. The function will be executed from the server side. **The clients won't get any information about the functions assigned with these decorators. Not even their names.** An example that tells the server terminal that someone joined or left: ```jsx // @server/join function onSomeoneJoin() { console.log("Someone just joined!"); } // @server/leave function onSomeoneLeave() { console.log("Someone just left!"); } export default <div>What a peaceful page!</div>; ``` ## @server/start The functions assigned with `@server/start` decorator will be run from server side and will run at the beginning of the process. **The clients won't get any information about the functions assigned with this decorator. Not even their names.** An example that logs `I'm alive` to the server terminal when server starts: ```jsx // @server/start function onServerStart() { console.log("I'm alive!"); } export default <div>Hey!</div>; ``` ### NOTE: This doesn't work when the development mode is on! #### Reason for the note: The @server/start runs when the server starts which is possible when it's production mode since every file is built once per process. Unlike production mode, in development mode the files will be built every request, therefore it would have to run the @server/start function every REQUEST! That is usually not what you want. So we disabled it. It will say `Internal server error` to the client.* # CLI All you have to do to is type `hizzy`! This will immediately start your project. ## Providing the cd Normally `hizzy` uses the current directory you are in the terminal, but you can specify the directory as an argument! ``` npx hizzy [root] ``` ### Example: ``` npx hizzy ./myDirectory/myProject ``` # Addon API To create an addon structure you can run the command `npx hizzy --addon-init YourAddonName` ## onLoad() This function is ran immediately after the file is exported. ## onEnable() This function is ran when the addon is enabled. First trigger of this function is when server starts listening. This can be triggered by the `a` shortcut in the CLI which disables and enables all addons. ## onDisable() This function is ran when the addon is enabled. This can be triggered by the `a` shortcut in the CLI which disables and enables all addons. This will be triggered before the termination of the process. ## onClientSideLoad() This function is ran when a client joins the website. **WARNING: This function will be run from the client side therefore you can't use server-sided functions.** For more information check the `injections/jsx.js` file and search for `doAddon(1)`. NOTE: If the client is transferred between pages using Hizzy's `openPage` function or `reloadPage` this won't be run again. This function is only ran when the first request is sent. ## onClientSideRendered() This function is ran when a client has done rendering the page. **WARNING: This function will be run from the client side therefore you can't use server-sided functions.** For more information check the `injections/jsx.js` file and search for `doAddon(2)`. ## onClientSideError() This function is ran when a client has done rendering the page. **WARNING: This function will be run from the client side therefore you can't use server-sided functions.** For more information check the `injections/jsx.js` file and search for `doAddon(3)`. # Why Hizzy? In Turkish "hız" means "speed" in English. We added "zy" at the end to make it easier to pronounce and here you go, Hizzy! People who helped to find the name: mattmatt0990, lebouwski # Project history - Created the project: June 21, 2023 - First public commit: July 13, 2023
Hizzy is a React based fullstack modern web framework!
backend,development,easy,fast,framework,frontend,fullstack,javascript,js,jsx
2023-07-13T12:56:05Z
2023-07-20T15:55:57Z
null
1
0
45
0
0
7
null
MIT
JavaScript
Ralweena/Apartment-Rental-Management-System
main
## Apartment Rental Management System ### Description <p align="justify"> Apartment Rental Management System is based on searching the apartments available for rent in cities. The apartment owner updates details of the apartments available for rent and the customer is updated on these details such as area occupied, rent amount, location and so on. This system is best suitable for both owners as well as tenants and is also a best application in the city place. Tenants can easily search the suitable apartment with their preferred location and the rent amount. It also allows the tenants to pay their rent online. The Apartment Rental System helps to save a lot of time for both parties. Hence this system is best applicable for the above reasons making Apartment Rental an easy process through an online system.</p> ### Technology Used * Front End - HTML, CSS, JavaScript * Back End - Python Flask * Database - MySql ### Requirements The source code of this project is written in Python. So, You'll require the following to run this project * Install libraries and dependencies listed in **requirements.txt** ```bash pip install -r requirements.txt ``` * Install **MYSQL Workbench** * Install **XAMPP** server ### How to Run the Project 1. Fork the repo and open the folder in your VSCode. 2. Copy all the sql commands listed in the **database** folder and run in on **MYSQL Workbench**. 3. Start the following two processes in **XAMPP** once it has been installed and loaded: * **Apache Webserver** - to serve HTTP requests. * **MySQL Server** - the database server. 4. Navigate to main.py file and run the file in VSCode. 5. Click on the link generated to run the project.
A DBMS mini project on Apartment Rental Management System built for management of tasks such as tracking and storing tenant information, collecting rent and managing accounting needs.
css,dbms,html,javascript,mysql-database,python-flask
2023-07-17T05:02:03Z
2023-07-20T05:08:52Z
null
1
0
19
0
9
7
null
null
HTML
Razikus/In-Browser-Tools
main
# In Browser Tools https://ibt.razikus.tech In Browser Tools is a collection of analytics-free, privacy-concerned tools designed to operate directly within your browser. This project is built for users who value privacy and wish to utilize tools without the need for server-side processing or data transmission. Our tools are completely free to use and open-source, making them ideal for educational purposes, quick utilities, or as part of your privacy-focused toolset. SBOM (Software Bill of Material) generated by https://sbom.sh tool ## Features - **Base64 Decoder/Encoder**: Quickly encode or decode your data in Base64 format, all within your browser. - **Offline Password Generator**: Generate strong, secure passwords offline, ensuring your passwords never leave your device. Now supports batch gen, and specifying your own set of keys - **WEBP to JPEG/PNG Converter**: Easily convert WEBP images to JPEG or PNG formats without the need for external tools. - **JSON Viewer**: Beautify and view JSON documents in a clean, user-friendly interface. - **UUID Generator**: UUID v1 v4 and v7 generation - **AVI TO MP4 CONVERTER**: FFMPEG built in - **Round image cropper**: Now there is also ability to crop round images with specified resolution All tools are designed to be easy to use, with a focus on privacy and security. ## Getting Started To use In Browser Tools, simply visit our [website](https://ibt.razikus.tech) or clone this repository to run the tools locally. Our project is built with Vue.js, ensuring a reactive and seamless user experience. ### Developing 1. Clone the repository: ```bash git clone https://github.com/Razikus/In-Browser-Tools.git ``` 2. Navigate to the project directory: ```bash cd In-Browser-Tools ``` 3. Install the dependencies: ```bash npm install ``` 4. Serve the project locally: ```bash npm run serve ``` 5. Open your browser and navigate to `http://localhost:8080`. ## Reporting Issues If you encounter any problems or have a feature request, please submit an issue [here](https://github.com/Razikus/In-Browser-Tools/issues). ## License This project is licensed under the MIT License ## Acknowledgments - Thanks to all contributors who have helped to build and improve In Browser Tools.
Different in browser tools like password generator, base64 decoder and encoder, json preety etc. Without any analytics and stuff like that
browser-tools,ffmpeg-wasm,javascript,offline-first
2023-07-17T13:50:33Z
2024-05-12T19:21:15Z
null
1
0
44
0
0
7
null
MIT
Vue
CarlMurray/flyUX-pp4
main
![Cover image](/readme/cover-img.png) ### Live site: https://flyux.carlmurray.design # Table of Contents - [📄 Project Background](#-project-background) - [👀 Overview](#-overview) - [🔁 Process](#-process) - [❓ Problem Statement:](#-problem-statement) - [🔎 Research](#-research) - [🎨 Design](#-design) - [👨‍💻 Development](#-development) - [📈 Link to the GitHub Project board](#-link-to-the-github-project-board) - [👤 User Stories](#-user-stories) - [🧮 Data Models](#-data-models) - [🪀 Features](#-features) - [💩 CRUD Functionality](#-crud-functionality) - [🔑 Authentication \& Authorisation](#-authentication--authorisation) - [🧭 Navigation](#-navigation) - [🔎 Search](#-search) - [✈️ Flights](#️-flights) - [🗓️ Alternate Dates](#️-alternate-dates) - [💸 Fares](#-fares) - [💼 Baggage Policy](#-baggage-policy) - [🛫 Edit Flights](#-edit-flights) - [👯 Passengers](#-passengers) - [💳 Checkout](#-checkout) - [✅ Confirmation](#-confirmation) - [📜 Bookings](#-bookings) - [❌ Cancel Booking](#-cancel-booking) - [👥 Edit Passengers](#-edit-passengers) - [🌐 Blog](#-blog) - [🤔 About](#-about) - [🛣️ Roadmap](#️-roadmap) - [🪲 Bugs](#-bugs) - [⚙️ Technologies Used](#️-technologies-used) - [💾 Core Development Technologies](#-core-development-technologies) - [📚 Libraries, Frameworks and Packages](#-libraries-frameworks-and-packages) - [🐍 Python/Django Packages](#-pythondjango-packages) - [🖥️ Infrastructural Technologies](#️-infrastructural-technologies) - [🧪 Testing](#-testing) - [🤖 Automatic Testing](#-automatic-testing) - [⚒️ Manual Testing](#️-manual-testing) - [🛰️ Overview](#️-overview) - [🧪 General Testing](#-general-testing) - [🏠 Homepage \& Search Testing](#-homepage--search-testing) - [✈️ Flight Search Results Testing](#️-flight-search-results-testing) - [💵 Payment \& Confirmation Testing](#-payment--confirmation-testing) - [🔒 Authorisation Testing](#-authorisation-testing) - [🚦 Lighthouse Testing](#-lighthouse-testing) - [📱 Responsiveness Testing](#-responsiveness-testing) - [✅ Code Validation](#-code-validation) - [🖥️ Deployment](#️-deployment) - [📦 Local Deployment](#-local-deployment) - [💜 Heroku Deployment](#-heroku-deployment) - [📐 Environment Variables](#-environment-variables) - [👋 Credits](#-credits) # 📄 Project Background ### 👀 Overview - This Django web development project is a continuation of a UX Design project I completed during my Diploma in UX Design with the UX Design Institute which goes through the full UX process from user research all the way through to prototyping and handover. - The end result was a user-friendly flight booking flow which was informed by user research and prototyped to a medium fidelity in Figma. - Revisiting the project a year later, I am now using it as a foundation to build upon and bring it from Figma prototype, to a fully functioning Django-based full-stack web application, combining my passions for user-centric design and web development to build a holistic solution. **[See here for the full UX Design case study](https://carlmurray.design/p/cmurray/03678e7f)** # 🔁 Process ### ❓ Problem Statement: > Your client is a start-up airline. They’re looking to create an online experience that is fast, easy and intuitive: one that’s based on a deep understanding of their target users. ### 🔎 Research <details> - Competitive benchmarking was carried out to better understand what current industry leaders are doing and to understand common conventions and user expectations from a flight booking flow. - Usability testing of existing flows were carried out with users on the Aer Lingus, Ryanair and EasyJet websites to observe user behaviour, mental models, positives and pain points. - This research data was used to inform my solution, which aimed to provide a simple, straight-forward, upsell-free and easy-to-use flight booking flow. **[See here for the full UX Design case study](https://carlmurray.design/p/cmurray/03678e7f)** </details> ### 🎨 Design <details> - The design process began with sketching out low-fidelity wireframes to explore different layout options and to get a feel for the flow. - The wireframes were then translated into a [medium-fidelity prototype](https://www.figma.com/proto/1lcdpwiJdrfa5DN0flygbf/Project10?type=design&node-id=2-3&t=7HxbLkrQd03aCuJy-1&scaling=scale-down&page-id=0%3A1&starting-point-node-id=2%3A3&show-proto-sidebar=1&mode=design) in Figma. - Handover documentation was created to provide a detailed overview of the design and to provide guidance for the development process. - The design was informed by the research data and aimed to provide a simple, straight-forward, upsell-free and easy-to-use flight booking flow. - Branding was kept minimal and the design was kept clean and simple to allow for easy navigation and to avoid overwhelming the user with too much information. - The logo, typeface and colour scheme were chosen to reflect the brand's values of simplicity, speed and efficiency. ![Colour palette](/readme/palette.png) **[See here for the full UX Design case study](https://carlmurray.design/p/cmurray/03678e7f)** </details> ### 👨‍💻 Development <details> - The development process was carried out using an Agile methodology with a focus on iterative development and continuous improvement. - The project was managed using a GitHub Project board with user stories and tasks. - User Stories were sized using T-shirt sizing (XS, S, M, L, XL) and prioritised based on the MoSCoW method (Must have, Should have, Could have, Won't have). #### 📈 [Link to the GitHub Project board](https://github.com/users/CarlMurray/projects/3/views/3) #### 👤 User Stories 1. As a user, I want to search for flights based on the selected departure airport, destination airport, and date, so that I can view the available flight options. 2. As a user, I want to see a list of available flights after performing a search, including relevant details such as flight number, departure time, arrival time, and price, so that I can choose a suitable flight. 3. As a user, I want to checkout quickly and securely on the site, so that I can finalise my booking. 4. As a user, I want to provide my personal information (e.g. name, email, phone number) during the booking process, so that I can receive information about the flight. 5. As a user, I want to review the booking details before finalising the booking, so that I can ensure everything is correct. 6. As a user, I want to confirm the booking and receive a confirmation message or email, so that I know my flight has been successfully booked. 7. As an admin, I want to view and update the details of a specific flight booking, including passenger information and booking status, so that I can handle customer inquiries and make necessary changes. 8. As an admin, I want to manage user accounts, including creating, editing, and disabling user profiles, so that I can maintain control over site access and user privileges. 9. As an admin, I want to log in to an admin panel securely, so that I can access the site's administrative features. 10. As an admin, I want to manage the list of flights, including adding, editing, and deleting flight details, so that I can update flight schedules and availability. 11. As an admin, I want to manage the list of airports, including adding, editing, and deleting airport entries, so that I can ensure accurate and up-to-date information. 12. As a user, I want to create an account so that I can keep track of and edit my existing bookings. 13. As a user I want to explore blog posts to get travel inspiration for my next trip. </details> ### 🧮 Data Models <details> The data models for the project are shown below: ![Database schema](/readme/dbdiagram.png) - Users app: - `User` - custom user model which extends the Django `AbstractUser` model. Default username field is replaced with email field. <br> - Core app: - `Flight` - represents a flight. Contains origin, destination, outbound date, flight number, aircraft, departure time, arrival time and price. - `Booking` - represents a booking. Contains user, trip email, flight(s), fare(s), booking reference number, booking date, total price and status. - `Passenger` - represents Passengers associated with a Booking. Contains first name, last name and Booking id. - `Airport` - represents an airport. Contains name, IATA code, locality, region and country. - `Aircraft` - represents aircraft flow for a given flight. Contains aircraft model/type, identification and number of seats. Note: The Aircraft model was originally implemented with the intention of using it to implement seat selection functionality and options for seating and fares configurations. However, this was not implemented due to time constraints and potential for scope creep. <br> - Blog app: - `BlogPost` - represents a blog post. Contains title, image, content, date created and content rendered which is required to render content created with a Markdown field. The Markdown field was added to the admin panel to allow for content formatting/styling. <br> </details> --- <br> <br> <br> --- # 🪀 Features ### 💩 CRUD Functionality <details> - User CRUD functionality is primarily related to `Booking`s. - Create: Users create a Booking by going through the full user flow. A `Booking` is created once the user completes checkout. - Read: Users can view their created `Booking`s and relevant `Booking` details when logged in. - Update: Users can edit a `Booking` by changing `Passenger` information for that `Booking`. - Delete: Users can cancel a `Booking` which deletes it from the database. - Admin CRUD functionality exists for all Models and is done from the Django Admin dashboard. </details> ### 🔑 Authentication & Authorisation <details> - Users can create an account from the Signup page. - Users can login from the Login page. - Authorisation is required to reach certain pages such as Bookings, Passenger Details and Checkout. Requesting these pages while unauthprised will redirect users to the Login page. - If not logged in by the time a user reaches the Passenger Details page, a modal shows on screen with the Signup form. Users can also click the Login link at the bottom of the form instead, and be redirected to the Passenger Details page on successful authentication. <details> <summary>Signup page</summary> ![Screenshot of Signup page](/readme/signup.jpeg) </details> <details> <summary>Login page</summary> ![Screenshot of Login page](/readme/login.jpeg) </details> <details> <summary>Signup modal</summary> ![Screenshot of Signup modal](/readme/signup-modal.jpeg) </details> </details> ### 🧭 Navigation <details> - Primary navigation is located in the header and is present on all pages. - A hamburger menu is present on mobile devices and expands to show the primary navigation links. <details> <summary>Navigation on homepage</summary> ![Screenshot of homepage ](/readme/homepage.jpeg) </details> </details> ### 🔎 Search <details> - The search form is located on the homepage and allows users to search for flights by entering their origin, destination, trip type, dates and number of passengers. - The search form is validated on the front-end and back-end to ensure that the data entered is valid and that the search can be performed. - If the search is valid, the user is redirected to the Flights page where they can view the search results. - If the search is invalid, an error message is shown. <details> <summary>Homepage with search form</summary> ![Screenshot of homepage](/readme/homepage.jpeg) </details> </details> ### ✈️ Flights <details> - The Flights page shows the search results for the user's search query. - If there are no results, an info message is shown prompting the user to try an alternate date. - If there are results, the results are shown in a card format with the outbound and return flights shown in separate cards. - Once flights have been selected, the CTA button is enabled and the user can proceed to the next step in the booking flow. Selected flight numbers are stored in session storage and are used to populate the Order Summary page. <details> <summary>Flights</summary> ![Screenshot of Flights page](/readme/flights.jpeg) </details> </details> #### 🗓️ Alternate Dates <details> - The alternate dates feature allows users to view flight results for alternate dates to their original search query. - The feature works by sending an AJAX request (via htmx) to the server with the new date, and the server responds with the new flight data for that date, and new date options for the alternate date selector. - The new flight data is then loaded into the page and the click event listeners are re-attached to the new flight cards so that they expand when clicked, to show the fares. - It is not possible to select a date that is in the past. - It is not possible to select a date that is before the outbound date if the trip type is return. </details> #### 💸 Fares <details> - The fares are shown in a card format with the outbound and return fares shown in separate cards. - The user can click on a fare card to expand it and show the fare details. - The user can select a fare by clicking the button on the fare card. - Selected fare information is stored in session storage and is used to populate the Order Summary page. <details> <summary>Fares</summary> ![Screenshot of Fares](/readme/flights-fares.jpeg) </details> </details> #### 💼 Baggage Policy <details> - Links to view the airline's baggage policy are shown on the fare cards. - Clicking the link opens a modal with the baggage policy information. - The modal can be closed by pressing ESC or clicking outside of the modal. <details> <summary>Baggage Policy Modal</summary> ![Screenshot of baggage policy modal](/readme/baggage-modal-screenshot.png) </details> </details> #### 🛫 Edit Flights <details> - The user can edit their flight selection by clicking the "Edit" button on the fare card. - This reloads the previous flight search results and allows the user to select new flights. <details> <summary>Edit Flights</summary> ![Screenshot of Edit Flights](/readme/flights-fares.jpeg) </details> </details> ### 👯 Passengers <details> - The Passengers form is shown after the user has selected their flights. - The form is pre-populated with the number of passengers selected in the search form. - If logged in, the form is pre-populated with the user's details. - The "Confirm email" field is not pre-populated and must be entered by the user as a security and error prevention measure. <details> <summary>Passengers form</summary> ![Screenshot of Passengers form](/readme/passengers.jpeg) </details> </details> ### 💳 Checkout <details> - The Checkout page shows the Order Summary and the Payment Details form. - The Order Summary is populated with the flight and fare information stored in session storage. - For the purposes of this project, the Payment Details form is a mockup and does not process any payments. The form is lightly validated on the front-end using the Payform library with some minor modification to allow for dummy card data to be entered. <details> <summary>Checkout page</summary> ![Screenshot of Checkout page](/readme/checkout.jpeg) </details> </details> ### ✅ Confirmation <details> - The Confirmation page shows the user's booking reference number and a confirmation message. - A CTA button is shown which allows the user to view their bookings. <details> <summary>Confirmation page</summary> ![Screenshot of Confirmation page](/readme/confirmation.jpeg) </details> </details> ### 📜 Bookings <details> - The Bookings page shows a list of the user's bookings. - An Edit button is shown for each booking which allows the user to edit the booking's passengers. - The Booking detail page shows the booking's details and the passenger details. <details> <summary>Bookings page</summary> ![Screenshot of Bookings page](/readme/bookings.jpeg) </details> </details> #### ❌ Cancel Booking <details> - The user can cancel a booking by clicking the "Cancel Booking" button on the Booking detail page. - This deletes the booking from the database by sending an AJAX request to the server and redirects the user to the Bookings page. A confirmation dialog is shown to the user to confirm that they want to cancel the booking. <details> <summary>Cancel Booking</summary> ![Screenshot of Cancel Booking](/readme/booking-cancel.jpeg) </details> </details> #### 👥 Edit Passengers <details> - The user can edit a booking's passengers by clicking the "Edit Passengers" button on the Booking detail page. - This sends an AJAX request (via htmx) to the server and loads the Passengers form with the booking's passenger data pre-populated. - The user can then edit the passenger data and submit the form to update the booking's passenger data, or cancel the edit and return to the Booking detail page. </details> ### 🌐 Blog <details> - The Blog is basic in design and is not a focus of this project. - The Blog page shows a list of blog posts which were generated using the ChatGPT. - The Blog detail page shows the blog post's title, image and content. - New blog posts can be added via the Django Admin dashboard. <details> <summary>Blog page</summary> ![Screenshot of Blog page](/readme/blog.jpeg) </details> </details> ### 🤔 About <details> - The About page shows a brief description of the project and the technologies used. <details> <summary>About page</summary> ![Screenshot of About page](/readme/about.jpeg) </details> </details> --- <br> <br> <br> # 🛣️ Roadmap <details> <details> <summary>Implement seat selection as per original design</summary> ![Screenshot of seat selection design](/readme/seat-selection.png) </details> <details> <summary>Implement 'Extras' screen for seat selection, baggage selection, car hire and insurance as per original design.</summary> ![Screenshot of extras selection](/readme/extras-screen.png) </details> <details> <summary>Build out flights page to show prices in alternate date selector, sort options, cart and edit search</summary> ![Search results screen](/readme/flight-results.png) </details> > Add password reset and "Remember me" login option --- </details> --- <br> <br> <br> # 🪲 Bugs <details> 1. When styling the flight search result cards, there was some difficulty in adding a transition to animate the expansion of the card when clicked, to show the fares. It was found that it is not possible to transition from `display:hidden`, nor is it possible to transition from `height:0` to `height:auto`. A workaround was implemented by setting `max-height:0` with `overflow:hidden` then using JavaScript to add `max-height:100rem` (or any other large value) along with `transition:all` to animate the card expansion and collapse. 2. The "alternate date selector" on the flight results page works by sending an AJAX request (via htmx) when an alternate date is clicked, and responding with HTML with the new flight data for the given date. When the new HTML is loaded from the response, the click event listeners need to be re-attached to the new flight card elements so that they expand when clicked, to show the fares. However, when initially trying to implement this re-attachment, an issue arose where the flight cards would not expand every second time an alternate date was selected. Following some troubleshooting, it was found that the click event listeners were compounding, thus negating each other (i.e. as if a user clicked the card twice in rapid succession). Using `console.log` and Chrome Dev Tools for debugging enabled me to see which events were firing so that the issue could be identified and solved by defining the click handler function outside of the event listner function. [Relevant Stack Overflow thread.](https://stackoverflow.com/questions/41720943/rebind-javascript-events-and-addeventlistener-fires-twice) 3. The `Flight`s table contains 90,000 rows of data and when implementing the `Booking`s CRUD functionality, there were severe issues experienced particularly in the admin panel when trying to view/edit `Booking`s which resulted in indefinite loading times as the `Flight`s data was loaded. Django has a number of built-in solutions for this issue and a solution was implemented by defining `search_fields` and `autocomplete_fields` in the `ModelAdmin` configurations for the `Flight` and `Booking` models. [Django Documentation Reference](https://docs.djangoproject.com/en/4.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.autocomplete_fields) 4. When testing the site on mobile, a bug was identified where the date input field placeholder text would not display. Following some research and troubleshooting, it was found that this is a known issue with Flatpickr and a workaround was found as [referenced in this JSfiddle](https://jsfiddle.net/Sova12309/7bmpy9jc/9/). <details> <summary>Code Snippet Implemented to fix bug #4</summary> ```css .flatpickr-mobile:before { content: attr(placeholder); color: #9ca3af; width: 100%; } .flatpickr-mobile:focus[value]:not([value=""]):before { display: none; } input[type="hidden"][value]:not([value=""]) + .flatpickr-mobile:before { display: none; } ``` </details> <br> 5. When testing the alternate date selection feature, a bug was identified where the "No flights on selected date" error message would not disappear during the transition between a newly selected alternate date. Additionally, if the fares container was expanded for a flight, it would remain visible during the request when selecting a new date. The loading indicator would display during the request, but would push the error message/fares container down. The intended behaviour was for all content - including flights, fares and error messages - to be hidden during a request, and for the loading indicator to display. Some time was spent troubleshooting the `htmx` implementation, however it was found that all that needed to be done was add `classList.add('hidden')` to these elements when an alternate date was clicked, as I had done for the flight cards already in the earlier stages of development. This was a simple fix and a reminder to always ensure code is clean and well documented, as I had already forgotten how I had implemented this functionality on the flight cards by the time I was reaching the latter stages of development. <details> <summary>Screenshot of bug #5</summary> ![Screenshot of bug](/readme/no-flights-bug.png) </details> 6. When testing the site on mobile, a bug was identified where when clicking on the search form input fields (origin, destination, dates), the keyboard displayed which was not intented as the user must select from the dropdown menu/date picker. This was solved by adding `readonly` to the input fields. Future iterations of the site will allow for user keyboard input, however this was not implemented due to time constraints and potential for scope creep. 7. Fixing bug #6 resulted in a new bug where a user could submit the search form without entering any data. This was solved by adding a simple piece of logic which removes the `readonly` attribute before validating the form, to check that the input values are valid before submitting. <details> <summary>Code snippet added to fix bug #7</summary> ```javascript // SEARCH FORM VALIDATION const validateForm = function (e) { e.preventDefault(); // NEW CODE SNIPPET ADDED TO FUNCTION document.querySelectorAll("input").forEach((input) => { input.removeAttribute("readonly"); }); ... // REST OF FUNCTION... ... } ``` </details> <br> 8. Performance issues were identified with slow page loading speeds noted when accessing a user's Bookings page. Django Debug Toolbar helped to identify inefficient database queries which were causing the performance issues. Queries were optimised by using `select_related` which brought the total load time from 4800ms to 120ms - a significant improvement. </details> --- <br> <br> <br> # ⚙️ Technologies Used This section outlines the various technologies used throughout the project and the purpose each serves. ## 💾 Core Development Technologies <details> - [Django](https://www.djangoproject.com/) used as a full-stack framwork for developing the app. - [JavaScript](https://www.ecma-international.org/publications-and-standards/standards/ecma-262/) used for client-side interaction and validation. - [HTML](https://html.spec.whatwg.org/)/[CSS](https://www.w3.org/Style/CSS/Overview.en.html) + [Django Template Language](https://docs.djangoproject.com/en/4.2/ref/templates/language/) used for building out site pages. </details> ## 📚 Libraries, Frameworks and Packages <details> - [Tailwind CSS](https://tailwindcss.com/) - used to style elements throughout the site. - [Flowbite](https://htmx.org/) - a Tailwind-based open-source library; used very sparingly for small number of minor components in the site (radio select, dropdown select) - [htmx](https://htmx.org/) - an open-source lightweight library used to fetch and load content dynamically via AJAX requests. Utilised specifically for fetching new `Flight` data and `Passenger`s edit form. - [Flatpickr](https://flatpickr.js.org/) - a JavaScript library which provides the date picker styles and functionality on the Homepage. - [Payform](https://github.com/jondavidjohn/payform) - a JavaScript library used for formatting the Payment Details form inputs. </details> ## 🐍 Python/Django Packages <details> - [Gunicorn](https://pypi.org/project/gunicorn/) - provides HTTP server. - [psycopg2](https://pypi.org/project/psycopg2/) - provides PostgreSQL connection. - [Pillow](https://pypi.org/project/Pillow/) - used for image processing (Model ImageField). - [Whitenoise](https://pypi.org/project/whitenoise/) - used for serving static files. - [Coverage](https://pypi.org/project/coverage/) - used for testing and analysis. - [Django Markdown Field](https://pypi.org/project/django-markdownfield/) - adds a markdown-compatible text field to admin panel (for BlogPost model). - [Black](https://pypi.org/project/black/) - A PEP8 compliant code formatter. - [Django Debug Toolbar](https://django-debug-toolbar.readthedocs.io/en/latest/) - used for debugging. - [Django Storages](https://django-storages.readthedocs.io/en/latest/) and [Boto3](https://pypi.org/project/boto3/) - used for storing static files and media files on AWS S3. </details> ## 🖥️ Infrastructural Technologies <details> - [PostgreSQL](https://www.postgresql.org/) (via Digital Ocean) - used for database. - [Heroku](https://www.heroku.com/) - used for hosting the application. - [AWS S3](https://aws.amazon.com/s3/) - used for storing static files and media files. </details> </details> --- <br> <br> <br> # 🧪 Testing ## 🤖 Automatic Testing <details> - Automated unit tests were written for core back-end functionality of the app to test data validation and integrity, templates used, HTTP status codes, user input etc. - 35 tests were written in total. - The [`Coverage`](https://pypi.org/project/coverage/) package was used to assist in guiding test requirements. - 100% coverage was achieved on the `core` models and views. - Future plans to write unit tests for coverage on `blog` and `users` apps. <details> <summary>Test coverage report</summary> ![Coverage report](/readme/test-coverage.png) </details> </details> ## ⚒️ Manual Testing ### 🛰️ Overview <details> - Responsiveness was tested as per below table (go to section: [Responsiveness](#-responsiveness-testing)) - All HTML files were passed through the W3C validator with no errors - All JavaScript files were passed through JSHint with no errors present. - The website was tested on major browsers including Chrome, Safari, Firefox and Edge. - All user flows were tested in depth including navigating through the booking flow, viewing blog content, entering search queries, clicking CTAs and links, and form submission. - All forms were tested to ensure validation was present and that forms could be submitted without error - Lighthouse was used to test for Performance, Accessibility, Best Practices and SEO and adjustments were made to improve test results. - WAVE was used to test for accessibility issues and adjustments were made to improve test results. </details> --- ### 🧪 General Testing <details> <summary>Expand test detail</summary> | Test | Action | Success Criteria | | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | | Homepage loads | Navigate to website URL | Page loads < 3s, no errors | | Links | Click on each Navigation link, CTA, button, logo, footer link | Correct page is loaded/correct action performed, new tab opened if applicable | | Form validation | Enter data into each input field, ensure only valid data is accepted | Form doesn't submit until correct data entered, error message shown | | Responsiveness | Resize viewport window from 320px upwards with Chrome Dev Tools. Test devices as detailed in [Responsiveness Testing](#-responsiveness-testing) | Page layout remains intact and adapts to screen size as intended | | Lighthouse | Perform Lighthouse test on each page for the primary user flow (Booking process) | Score of > 89 on Performance, Accessibility, Best Practices | | Browser compatibility | Test links, layout, appearance, functionality and above Tests on Chrome, Safari, Firefox and Edge. BrowserStack used to test various mobile/large format devices with recent browser versions. | Website looks and functions as intended and passes all tests above | </details> --- ### 🏠 Homepage & Search Testing <details> <summary>Expand test detail</summary> | Test | Action | Success Criteria | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Origin/Destination selection | - Click Origin/Destination fields. | - Drop down menu opens with correct data.<br>- Text input disabled. <br>- Dropdown closes on click outside. <br>- Correct selection added to field. | | Trip type selection | - Select trip type (return/one-way) | - One-way trip hides return date field. <br>- Return trip shows return date field. | | Date selection | - Click date field | - On click, show date picker.<br>- Dates in the past disabled.<br>- Dates after 01-07-2024 disabled.<br>- Correct selection added to field. | | Passenger selection | - Click passengers field | - Drop down menu displays with up to 8 passengers | | Form submission | - Fill in form and click submit button | - Form submitted<br>- Flight results page loaded with correct data | | Validation | - Select same origin and destination<br>- Select return date before selected outbound date<br>- Leave fields blank | - Field validation message shown if same origin and destination<br>- Field validation message shown if return date before outbound date<br>- Field validation messages shown for blank fields<br>- Form does not submit until data is valid | </details> --- ### ✈️ Flight Search Results Testing <details> <summary>Expand test detail</summary> | Test | Action | Success Criteria | | --------------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | Flight results | - Review flight results | - Correct flight data shown | | Alternate dates | - Select alternate dates for outbound/return flights | - Correct flight data fetched<br>- Correct dates added to selector<br>- Error message shown if same/invalid dates selected | | Fare selection | - Select a fare | - Fares container expands on click<br>- Correct fare data shown<br>- Fare/flight selection works as intended | | Edit flight | - Edit a flight selection | - When edit button clicked, flight results show and new flight can be selected | | Confirm flights | - Select flights and confirm | - When confirmed, date added to session storage and request sent | </details> --- ### 💵 Payment & Confirmation Testing <details> <summary>Expand test detail</summary> | Test | Action | Success Criteria | | --------------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | Flight results | - Review flight results | - Correct flight data shown | | Alternate dates | - Select alternate dates for outbound/return flights | - Correct flight data fetched<br>- Correct dates added to selector<br>- Error message shown if same/invalid dates selected | | Fare selection | - Select a fare | - Fares container expands on click<br>- Correct fare data shown<br>- Fare/flight selection works as intended | | Edit flight | - Edit a flight selection | - When edit button clicked, flight results show and new flight can be selected | | Confirm flights | - Select flights and confirm | - When confirmed, date added to session storage and request sent | </details> --- ### 🔒 Authorisation Testing <details> <summary>Expand test detail</summary> | Test | Action | Success Criteria | | --------------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | --- | | Flight results | - Review flight results | - Correct flight data shown | | Alternate dates | - Select alternate dates for outbound/return flights | - Correct flight data fetched<br>- Correct dates added to selector<br>- Error message shown if same/invalid dates selected | | Fare selection | - Select a fare | - Fares container expands on click<br>- Correct fare data shown<br>- Fare/flight selection works as intended | | Edit flight | - Edit a flight selection | - When edit button clicked, flight results show and new flight can be selected | | Confirm flights | - Select flights and confirm | - When confirmed, date added to session storage and request sent | | </details> --- ### 🚦 Lighthouse Testing <details> - All pages were tested using Lighthouse with the primary goals of identifying performance and accessibility issues and ensuring adherance to best practices. - The Lighthouse test results for each step of the `core` user flow are shown below: <details> <summary>Homepage</summary> ![Homepage Lighthouse test](/readme/Lighthouse-homepage.png) </details> <details> <summary>Flights</summary> ![Flights Lighthouse test](/readme/Lighthouse-flights.png) </details> <details> <summary>Passengers</summary> ![Passengers Lighthouse test](/readme/Lighthouse-passengers.png) </details> <details> <summary>Checkout</summary> ![Checkout Lighthouse test](/readme/Lighthouse-summary.png) </details> <details> <summary>Bookings Overview</summary> ![Bookings Lighthouse test](/readme/Lighthouse-bookings.png) </details> <details> <summary>Booking Detail</summary> ![Booking Detail Lighthouse test](/readme/Lighthouse-booking-detail.png) </details> </details> --- ### 📱 Responsiveness Testing <details> - Testing for responsiveness was conducted using Chrome Dev Tools and ResponsivelyApp. - The website was tested extensively on a range of emulated mobile, tablet and large format screen sizes in both portrait and landscape orientations. <details> <summary>Responsiveness test results</summary> ![Responsiveness testing with ResponsivelyApp](/readme/responsive-testing.png) </details> | Device | iPhone SE | iPhone X | iPhone 12 Pro | iPhone 13 Pro Max | iPhone 14 Pro Max | iPad | iPad Air | iPad Pro | Macbook Pro | | ------------------ | ----------- | ----------- | ------------- | ----------------- | ----------------- | ------------ | ------------ | ------------- | ------------ | | **Resolution** | **375x667** | **375x812** | **390x844** | **414x76** | **414x896** | **768x1024** | **820x1180** | **1024x1366** | **1440x900** | | Render | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | | Layout | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | | Functionality | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | | Links | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | | Images | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | | Portrait/Landscape | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | </details> --- ### ✅ Code Validation <details> - All HTML pages were checked with the [W3C Markup Validation Service](https://validator.w3.org/) with no major errors present. Errors were present for `htmx` attributes, however these are valid and necessary for the functionality of the site. There were also duplicate IDs present in the HTML, however these are also valid and necessary for the functionality of the site. - All JavaScript files were passed through [JSHint](https://jshint.com/) with no errors present. - All custom coded Python files were formatted with a PEP8 complaint formatter - [Black](https://pypi.org/project/black/). - HTML Validation Examples: - [Homepage](https://validator.w3.org/nu/?doc=https%3A%2F%2Fflyux.carlmurray.design%2F) - [Search Results](https://validator.w3.org/nu/?doc=https%3A%2F%2Fflyux.carlmurray.design%2Fsearch_results%2F%3Fcsrfmiddlewaretoken%3D8KBZVKvX5lSOnxG31kPxxvzRddpEYACScsdbbPRenaPjeZT3OdKDnNFBofnKkoF4%26trip_type%3Dreturn%26origin%3DDublin%2B%2528DUB%2529%26destination%3DCork%2B%2528ORK%2529%26outbound_date%3D2023-08-30%26return_date%3D2023-08-31%26passengers%3D1) - [Checkout](https://validator.w3.org/nu/?doc=https%3A%2F%2Fflyux.carlmurray.design%2Fcheckout) - [Blog](https://validator.w3.org/nu/?doc=https%3A%2F%2Fflyux.carlmurray.design%2Fblog) </details> <br> <br> <br> # 🖥️ Deployment <details> #### 📦 Local Deployment 1. Clone the repository from GitHub by clicking the "Code" button and copying the URL. 2. Open your preferred IDE and open a terminal session in the directory you want to clone the repository to. 3. Type `git clone` followed by the URL you copied in step 1 and press enter. 4. Install the required dependencies by typing `pip install -r requirements.txt` in the terminal. 5. Note: The project is setup to use environment variables. You will need to set these up in your local environment. See [Environment Variables](#environment-variables) for more information. 6. Connect your database of choice and run the migrations by typing `python manage.py migrate` in the terminal. 7. Create a superuser by typing `python manage.py createsuperuser` in the terminal and following the prompts. 8. Optional: Fixtures for Flight, Airport and Aircraft models are included in the project in the `fixtures` directory. To add pre-populated data to the database, run `python manage.py loaddata fixtures/[fixture_name].json`. 9. Run the app by typing `python manage.py runserver` in the terminal and opening the URL in your browser. #### 💜 Heroku Deployment 1. Login to the Heroku dashboard and create a new app. 2. Connect your GitHub repository to your Heroku app. 3. In the Settings tab, ensure that the Python Buildpack is added. 4. Set environment variables in the Config Vars section of the Settings tab. 5. In the Deploy tab, enable automatic deploys from your GitHub repository. 6. Click the "Deploy Branch" button to deploy the app. 7. Once the app has been deployed, click the "Open App" button to view the app. 8. If using S3, you will need to set up an S3 bucket and add the environment variables to your Heroku app (see tutorial [here](https://testdriven.io/blog/storing-django-static-and-media-files-on-amazon-s3/) for reference.) #### 📐 Environment Variables - For local deployment, you will need to create a `.env` file in the root directory of the project and set the environment variables in this file. - For Heroku deployment, you will need to set the environment variables through the Heroku CLI or through the Heroku dashboard under 'Config Vars'. - You need to define the following variables: - If using a Postgres database: - `DATABASE_URL` - the URL for your Postgres database. - `NAME` - the name of your database. - `USER` - the username for your database. - `PASSWORD` - the password for your database. - `HOST` - the host for your database. - `PORT` - the port for your database. - Django settings: - `SECRET_KEY` - the secret key for your Django project. - `DEBUG` - set to `True` for development, `False` for production. - If using S3: - `USE_S3` - set to `True` to use S3, `False` to use local storage. - `AWS_ACCESS_KEY_ID` - your AWS access key ID. - `AWS_SECRET_ACCESS_KEY` - your AWS secret access key. - `AWS_STORAGE_BUCKET_NAME` - the name of your AWS S3 bucket. </details> <br> <br> <br> --- # 👋 Credits <details> - [Unsplash](https://unsplash.com/) - used for sourcing Blog photographic images. - [ChatGPT](https://openai.com/chatgpt) - used for generating all Blog text content. - [Favicon.io](https://favicon.io/) - used to create favicon. - [Payform](https://github.com/jondavidjohn/payform) - used for Payment Details input formatting. - [Mockaroo](https://www.mockaroo.com/) - used for creating model data. </details>
A flight booking flow built using Django, htmx, JavaScript and Tailwind CSS
airline,booking,django,flights,htmx,javascript,tailwind-css,ux,ux-design,ux-research
2023-07-08T18:59:48Z
2023-10-08T17:01:34Z
null
1
0
200
0
2
7
null
null
Python
PunGrumpy/image-logger
main
# `🖼️` Image Logger ## `📝` Description This is a simple image logger that logs images to a file and sending them to a discord webhook. ## `📚` How to use ### `📦` Requirements - Node.js v20.0.0 or higher - NPM v7.0.0 or higher - PNPM v6.0.0 or higher ### `📥` Installation ```bash pnpm install ``` ### `⚙️` Configuration Create a `config.json` you can use the `config.example.json` as a template. ```json { "webhooks": [ { "name": "NAME OF WEBHOOK", "url": "URL OF WEBHOOK" } ], "image": [ { "name": "NAME OF IMAGE", "path": "URL OF IMAGE or PATH OF IMAGE" // src/assets/IMAGE_NAME.png }, { "name": "NAME OF IMAGE", "path": "URL OF IMAGE or PATH OF IMAGE" // src/assets/IMAGE_NAME.png } ] } ``` You can also use `enviroment variables` to configure the project. ```env HEALTHCHECK_USER_AGENT=USER AGENT FOR HEALTHCHECK # Edit on Dockerfile ``` and then update your environment variables on your machine. ```bash export HEALTHCHECK_USER_AGENT="USER AGENT FOR HEALTHCHECK" ``` > **Note**: You can add as webhooks url on `config.json` as you want. ### `🖼️` Preparing images 1. Create a folder called `assets` or whatever you want in the [src](./src/) folder. 2. Add your images to the folder. 3. Add the images path to the `config.json` file. ### `📝` Post Image You can `POST` images to the `/image` endpoint. ## `🚌` Deploying ### `💻` Local ```bash pnpm start ``` ### `🐳` Docker ```bash docker compose up -d ``` ### `▲` Vercel You can using the [Vercel](https://vercel.com/) platform to deploy this project. > **Note**: Don't forget to add the `config` and `image` to the project before deploying. ## `📝` API ### `🖼️` Post Image ```bash curl -X POST -H "Content-Type: application/json" -d '{"image": "IMAGE URL", "imageName": "IMAGE NAME"}' http://localhost:3000/image ``` ## 📝 License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
🖼️ This is a simple image logger that logs images to a file and sending them to a discord webhook.
image-logger,javascript
2023-07-13T02:25:58Z
2024-04-12T11:27:49Z
null
1
2
72
0
6
7
null
MIT
JavaScript
mittal0802/urbanStyle
master
# UrbanStyle - Where Fashion Meets Comfort! UrbanStyle is a modern and user-friendly React-based e-commerce application that provides a seamless online shopping experience for fashion enthusiasts. With simplified categories, secure authentication using Firebase, real-time database powered by Firebase, and secure payments through Stripe, UrbanStyle is the ultimate destination for trendy shoppers. ![alt text](https://i.ibb.co/Bfk7bW5/Ecommerce.png) ## Features - **Simplified Categories**: Easily explore a curated selection of fashion products, including clothing, footwear, accessories, and more. - **User Authentication**: Sign up and sign in securely using Firebase authentication. Enjoy personalized features such as wishlists and order history. - **Real-time Database**: Our application utilizes Firebase's real-time database to ensure the latest product information and user data are always available. - **Secure Payment Processing**: Shop with confidence using Stripe's secure payment gateway, supporting various payment methods. - **Responsive Design**: Enjoy a seamless shopping experience on all devices, from desktops to smartphones. ## Future Plan 1. **Detailed Product Page**: Enhance the shopping experience with detailed product pages featuring size options, color choices, product descriptions, and customer reviews. 2. **Product Filters**: Implement advanced filtering options to allow users to narrow down product searches based on various criteria such as price range, category, brand, and more. 3. **Payment through Crypto Wallet**: Explore the integration of cryptocurrency payments, providing users with an alternative and secure method to complete their purchases. ## Installation and Usage 1. Clone the repository: ```bash git clone https://github.com/your-username urbanstyle.git cd urbanstyle ``` 2. Install dependencies: ```bash npm install ``` 3. Configure Firebase and Stripe: - Create a Firebase project and obtain the necessary configuration details. - Set up a Stripe account and retrieve your API keys. 4. Start the development server: ```bash npm start ``` 5. Open your browser and visit `http://localhost:3000` to access UrbanStyle. ## Contributing We welcome contributions to UrbanStyle! If you find a bug or have an idea for a new feature, please open an issue or submit a pull request. Happy shopping with UrbanStyle!
Discover the ultimate fashion experience with UrbanStyle. Our React-based e-commerce app offers a sleek interface, simplified categories, and easy navigation. Sign in securely using Firebase, explore real-time product updates, and shop confidently with Stripe payments. Stay stylish with UrbanStyle – your go-to fashion destination.
ecommerce-react,ecommerce-website,javascript,reactjs,styled-components
2023-07-15T08:31:30Z
2023-11-06T10:08:41Z
null
1
1
49
0
6
7
null
MIT
JavaScript
Choaib-ELMADI/supplier-aitmgoun
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 # 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.
Supplier | Aitmgoun is an E-commerce website built using Next.js 13, Sass and MongoDb Atlas. Now I'm trying to learn how to use Stripe for payments.
ecommerce,javascript,nextjs,typescript,mongodb,prisma
2023-07-14T18:48:10Z
2023-07-14T19:20:02Z
null
1
0
44
0
0
7
null
null
TypeScript
CesarHerr/math_magicians_v2
dev
<a name="readme-top"></a> <div align="center"> <h3><b>Math Magician</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) - [💻 Getting Started](#getting-started) - [Setup](#setup) - [Prerequisites](#prerequisites) - [Install](#install) - [Usage](#usage) - [Run tests](#run-tests) - [Deployment](#triangular_flag_on_post-deployment) - [👥 Authors](#authors) - [🔭 Future Features](#future-features) - [🤝 Contributing](#contributing) - [⭐️ Show your support](#support) - [🙏 Acknowledgements](#acknowledgements) - [📝 License](#license) <!-- PROJECT DESCRIPTION --> # 📖 [Math Magician] <a name="about-project"></a> **[Math Magician]** is a website for all fans of mathematics. It is a Single Page App (SPA) that allows users to: - Make simple calculations. - See some quotes. ## 🛠 Built With <a name="built-with"></a> ``` 1.- React 2.- Javascript. ``` ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML">HTML</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">JavaScript</a></li> <li><a href="https://react.dev/">React</a></li> </ul> </details> <!-- Features --> ### Key Features <a name="key-features"></a> ``` - Understand how to use medium-fidelity wireframes to create a UI. ``` <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LIVE DEMO --> ## 🚀 Live Demo <a name="live-demo"></a> - https://cesarherr.github.io/math_magicians_v2/ <p align="right">(<a href="#readme-top">back to top</a>)</p> <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: ``` - Code Editor. - Git and Github account. - Web browser. ``` ### Setup Clone this repository to your desired folder: ``` cd my-folder git clone https://github.com/CesarHerr/math_magicians_v2 ``` ### Install Install this project with: ``` You Don't need install this project ``` ### Usage To run the project, execute the following command: ``` Double click on the HTML file, open it in your browser. ``` ### Run tests To run tests, run the following command: Create an operational Calculator. ``` no test ``` ### Deployment You can deploy this project using: [Implementation](https://github.com/microverseinc/curriculum-react-redux/blob/main/math-magicians/sneak_peek.md) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ## 👥 Authors <a name="authors"></a> 👤 **César Herrera** - GitHub: [@CesarHerr](https://github.com/CesarHerr) - Twitter: [@Cesarherr2](https://twitter.com/Cesarherr2) - LinkedIn: [CesarHerr](https://www.linkedin.com/in/cesarherr/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - Improve responsive Design. - Add an Hamburger button. <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 and you think is useful to someone please share it <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> I would like to thank team of microverse and the micronauts for hitting me up with new knowledge. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FAQ (optional) --> <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>
"Math magicians" is a website for all fans of mathematics. It is a Single Page App (SPA) for make simple calculations. Read a random math-related quote, building with React.
javascript,react
2023-07-02T20:39:05Z
2023-07-11T06:59:23Z
null
1
5
32
0
0
7
null
MIT
JavaScript
MozamelJawad/Capstone-Project
main
# Capstone-Project <a name="readme-top"></a> <!-- 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 --> # 📖 Capstone-Project <a name="about-project"></a> **Capstone-Project** is developed in HTML, CSS, JavaScript, and Bootstrap framework and is about the innovative summit of Techlife development company which provides various information about Techlife. This project also showcases my skills as a developer. ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li><a href="https://rubyonrails.org/"> HTML <br> CSS </a> </li> </ul> </details> ## 🚀 Live Demo <a name="live-demo"></a> features - [Live Demo link](https://MozamelJawad.github.io/Capstone-Project/) ## Project Descriptive Video <a name="desc-video"></a> - [Project Descriptive Video link](https://www.loom.com/share/5258d00339164b3b938bf7740e017379) ## <!-- Features --> ### Key Features <a name="key-features"></a> - **Added the styles for header** <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: ### Setup Clone this repository to your desired folder: https://github.com/MozamelJawad/Capstone-Project ### Install Install this project with: ```sh cd Capstone-Project npm install ``` ### Usage To run the project, execute the following command: > npm install ### Run tests > npx hint . ### Deployment Project can be deployed by using the gh-pages and other web platforms. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ## 👥 Authors <a name="authors"></a> 👤 **Mozamel Jawad** - GitHub: [@githubhandle](https://github.com/MozamelJawad) - Twitter: [@twitterhandle](https://twitter.com/mozameljawad) - LinkedIn: [LinkedIn](https://www.linkedin.com/in/mozamel-jawad-2b4421111/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - [ ] **Portfolio** - [ ] **Mobile Version** - [ ] **Desktop Version** <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/MozamelJawad/Capstone-Project/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, give a ⭐️ <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> - I would like to thank from Microverse - Thanks To [Cindy Shin](https://www.behance.net/adagio07) For the Original Design of 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>
Capstone-Project is developed in HTML, CSS, JavaScript, and Bootstrap framework and is about the innovative summit of Techlife development company which provides various information about Techlife. This project also showcases my skills as a developer.
css,html,javascript
2023-07-03T16:51:01Z
2023-07-07T04:22:39Z
null
1
1
41
0
0
7
null
MIT
HTML
Madu-de/how-to-www
main
![Logo](./logo.svg) ## Inhaltsverzeichnis ### [1. Kapitel - Einführung](1.%20Kapitel/1.%20Kapitel.md) - [1.0 Wer bin ich?](./1.%20Kapitel/1.0%20Wer%20bin%20ich.md) - [1.1 Was ist dieses Buch?](./1.%20Kapitel/1.1%20Was%20ist%20dieses%20Buch.md) - [1.2 Was ist das Internet?](./1.%20Kapitel/1.2%20Was%20ist%20das%20Internet.md) - [1.3 Techstack HTML, CSS und Javascript](./1.%20Kapitel/1.3%20Techstack%20HTML,%20CSS%20und%20Javascript.md) - [1.4 Benötigte Software](./1.%20Kapitel/1.4%20Benötigte%20Software.md) - [1.5 Was tun bei Problemen?](./1.%20Kapitel/1.5%20Was%20tun%20bei%20Problemen.md) ### [2. Kapitel - HTML](./2.%20Kapitel/2.%20Kapitel.md) - [2.0 Was ist HTML + Entstehungsgeschichte](2.%20Kapitel/2.0%20Was%20ist%20HTML%20+%20Entstehungsgeschichte.md) - [2.1 Die erste Website](./2.%20Kapitel/2.1%20Die%20erste%20Website.md) - [2.2 HTML Tags und Attribute](./2.%20Kapitel/2.2%20HTML%20Tags%20und%20Attribute.md) - 2.3 Das HTML Grundgerüst - 2.4 Die wichtigstem HTML Elemente ### 3. Kapitel - CSS - 3.0 Was ist CSS + Entstehungsgeschichte - 3.1 Die 3 Einbindungsmöglichkeiten - 3.2 Die CSS Syntax - 3.3 Selection von Elementen über ids und classes - 3.4 CSS Regeln - 3.5 Pseudoelemente - 3.6 Die meistverwendetsten Regeln - 3.7 CSS Einheiten - 3.8 Responsive Design mit Mediaquerys ### 4. Kapitel - Javascript - 4.0 Was ist Javascript + Entstehungsgeschichte - 4.1 Grundlagen von Javascript - 4.1.0 Das "Hello World"-Programm - 4.1.1 Variablen - 4.1.2 Operatoren - 4.1.3 Verzweigungen - 4.1.4 Auslagerung von Code mit Funktionen + Callbacks - 4.1.5 Arrays - 4.1.6 Schleifen - 4.2 Objekte - 4.2.0 Das Document-Object-Model (DOM) - 4.2.1 Das Window-Objekt - 4.2.2 Das Navigation-Objekt - 4.2.3 Das Console-Objekt - 4.3 Objektorientierung - 4.3.0 Was ist Objektorientierung? - 4.3.1 Klassen - 4.3.2 Zugreifbarkeit von Daten aus Klassen - 4.3.3 Instanzen - 4.3.4 Vererbung - 4.4 Devtools ### 5. Kapitel - Versionsverwaltung mit Git - 5.0 Was ist Git + Entstehungsgeschichte - 5.1 Installation von Git - 5.2 Was ist ein Repository? - 5.3 Was ist ein Commit? - 5.4 Was ist ein Branch? - 5.5 Was ist ein Merge? - 5.6 Der GitFlow - 5.7 Github - 5.7.0 Push, Pull und Clone - 5.7.1 Was sind Issues? - 5.7.2 Was sind Pull Requests? - 5.7.3 Was sind Github Actions? - 5.7.4 Die Pflege eines Repositorys ## In Zukunft eventuell ### 6. Kapitel - Angular ### 7. Kapitel - NestJS ### 8. Kapitel - Datenbanken ### ...
Dieses Repository stellt mein Buch "How-To-WWW" in Markdown-Dateien komplett kostenlos bereit! Hier erkläre ich ziemlich alles über die Webentwicklung. Warum? Weil ich daran Spaß habe, dies meine Leidenschaft ist und viele Bekannte, die sich das Gleiche aneignen möchten, häufig mir die gleichen Fragen stellen, die ich hier beantworten möchte!
anfanger,buch,css,free,html,javascript,leitfaden,lernen,world-wide-web,www
2023-07-18T11:25:47Z
2023-10-15T21:20:50Z
null
1
0
25
0
0
6
null
GPL-3.0
HTML
LiveWithCodeAnkit/NextJS13-Listing
master
# Next.js Web App This is a web application built with Next.js that fetches data from a JSON file using Redux. The app provides a user interface for displaying a collection of series and movies. It includes various features and functionalities to enhance the user experience. ## Features - **Data Filtering and Sorting:** The app filters the entries based on the release year attribute, only displaying those with a value greater than or equal to 2010. The filtered entries are sorted in ascending alphanumeric order based on the title attribute. - **Pagination:** The app includes pagination to display a limited number of entries per page, improving performance and user experience. - **Hover Animations:** On hover, the app provides an image zoom effect for enhanced visibility. The card box border color changes, providing a visual cue to the user. - **Year Label:** Each entry is accompanied by a label that displays the year of the series or movie, making it easy for users to identify the release year. - **Dynamic Title Component and Sticky Title Bar:** The title component in the app is dynamic, adapting based on the selected entry or page. The title bar remains sticky at the top of the page, ensuring it is always visible to the user. - **Responsive Design:** The web app has a responsive design, ensuring optimal viewing and usability across different devices and screen sizes. ## Getting Started Follow the instructions below to get a copy of the project up and running on your local machine. ### Prerequisites - Node.js (version X.X.X) - npm (version X.X.X) ### Installation 1. Clone the repository: ```bash git clone https://github.com/your-username/nextjs-web-app.git
This is a web application built with Next.js that fetches data from a JSON file using Redux. The app provides a user interface for displaying a collection of series and movies. It includes various features and functionalities to enhance the user experience.
api,flexbox,html-css-javascript,javascript,json,loader,nextjs,nextjs13,pagination,reactjs
2023-07-06T16:29:37Z
2023-07-08T05:58:12Z
null
1
0
7
0
0
6
null
null
JavaScript
keerti1924/Responsive-Restaurant-Website
main
null
The restaurant website is a creative and responsive restaurant website. It is very well decorated theme which will make your website building easier.
javascript,landing-page,bootstrap5,css,html,responsive-website,restaurant-website,template
2023-07-07T09:34:18Z
2023-07-09T10:05:30Z
null
1
0
3
0
3
6
null
null
HTML
PabloBona/bookstore-react-app
dev
<a name="readme-top"></a> <div align="center"> <br> <h1 style="color:rgb(87, 247, 255);border: 3px solid rgb(87, 247, 255);">BookStore</h1> <br> </div> <!-- TABLE OF CONTENTS --> # 📗 Table of Contents - [📗 Table of Contents](#-table-of-contents) - [📖 Bookstore-React-App](#bookstore-react-app) - [🛠 Built With ](#-built-with-) - [Tech Stack ](#tech-stack-) - [Key Features ](#key-features-) - [🚀 Live Demo ](#-live-demo-) - [💻 Getting Started ](#getting-started) - [Install](#-install) - [Usage](#-usage) - [Run tests](#run-tests) - [Deployment](#deployment) - [👥 Authors ](#-author-) - [🔭 Future Features ](#-future-features-) - [🤝 Contributing ](#-contributing-) - [⭐️ Show your support ](#️-show-your-support-) - [🙏 Acknowledgments ](#-acknowledgments-) - [❓ FAQ (OPTIONAL) ](#-faq-optional-) - [📝 License ](#-license-) <!-- PROJECT DESCRIPTION --> <br> # 📖 Bookstore-React-App (bookstore-react-app) <a name="bookstore-react-app"></a> The Bookstore is a website that allows you to display a list of books, add a book and remove a book!ics. <br> <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> The following stacks were used <details style="color:rgb(87, 247, 255);"> <ul> <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTML">HTML</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">Javascript</a></li> <li><a href="hhttps://create-react-app.dev/">Create React App</a></li> </ul> </details> <!-- Features --> <p align="right">(<a href="#readme-top">back to top</a>)</p> ### Key Features <a name="key-features"></a> - **ReactJS library** - **Using JSX syntax** - **Unit test with jest** - **Boostrap** <p align="right">(<a href="#readme-top">back to top</a>)</p> ### 🚀 Live Demo <a name="live-demo"></a> <a href="https://deluxe-faloodeh-f1de44.netlify.app/">Live Demo</a> <!-- GETTING STARTED --> <br> # 💻 Getting Started <a name="getting-started"></a> Clone this repository to your desired folder: Example commands: ```bash git clone git@github.com:PabloBona/bookstore-react-app.git ``` <br> # 📖 Install Install this project's dependencies with: ``` cd bookstore-react-app npm install ``` <br> # 📖 Usage To run the project, execute the following command: ```bash npm run 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. <br> # Run tests ```bash npm test ``` <br> # 📖 Run linterns tests If you follow the tutorial above to setup linters then you can run these tests ```$ npx hint . ``` ```$ npx stylelint "**/*.scss" ``` or if you use css then run this instead of the latter command above ```$ npx stylelint "**/*.{css,scss}" ``` <br> # Available Scripts In the project directory, you can run: ### `npm run eject` **Note: this is a one-way operation. Once you `eject`, you can't go back!** ### Deployment You can deploy this project using: GitHub Pages or Netlify <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ### 👥 Author <a name="authors"></a> - 👤 **Pablo Bonasera** - GitHub: [@BonPa](https://github.com/PabloBona) - LinkedIn: [Pablo Bonasera](https://www.linkedin.com/in/pablo-bonasera-142327257/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - [ ] **Customizable notifications and alerts** - [ ] **Multilingual support** <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/PabloBona/bookstore-react-app/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 you can follow me on github for more. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> - We would like to express our heartfelt gratitude to Microvere for the invaluable learning experience they have provided. The supportive community, dedicated mentors, and remote collaboration opportunities have enhanced my technical skills and prepared me for real-world projects. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FAQ (optional) --> ## ❓ FAQ (OPTIONAL) <a name="faq"></a> - **Are the linters necessary?** - It is a good practice to install and use them as they guide you towards best practice, but yes you can do without. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE --> ## 📝 License <a name="license"></a> This project is [MIT](https://github.com/PabloBona/bookstore-react-app/blob/feature/setup%26components/MIT.md) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
The Bookstore is a website that allows you to display a list of books, add a book and remove a book!
api-rest,boostrap,javascript,localstorage
2023-07-14T00:18:00Z
2023-08-04T02:51:59Z
null
1
7
55
0
1
6
null
null
JavaScript
HopefulHeart2020/MERN-Stack-Projects
master
null
collection of some projects developed using MERN
css,express,html,javascript,meterial-ui,mongodb,nodejs,react
2023-07-04T20:48:59Z
2023-03-12T13:37:57Z
null
2
0
85
0
0
6
null
null
JavaScript
Harshdev625/NewsSphere
main
# NewsSphere <!-- Description --> NewsSphere is a web application that provides users with the latest news from around the world. The app utilizes the NewsAPI to gather news articles. The key features of NewsSphere include advanced filtering options and infinite scrolling functionality, which enable users to seamlessly browse through a virtually endless stream of news articles. # Installation <!-- Before running your site --> To run the web application locally, you need to install Node.js on your device. Once installed, follow these steps: <!--Ordered List--> 1. Clone the repository:`git clone https://github.com/Harshdev625/NewsSphere` 2. Create an account on [News API](https://newsapi.org/) 3. Create a .env file in the root folder. 4. In the `.env`, create a variable `REACT_APP_NEWS_API='Your Api Key'`. Replace `'Your API Key'` with your actual API key. 5. Now you are ready to start running the application. Use the following commands: - `npm install` (to install all the required dependencies) - `npm run start` (to start the application) 6. NewsSphere is now running on localhost. <!-- Images --> # Tech Stack Used ![HTML](https://github.com/Harshdev625/NewsSphere/assets/98793412/85c9a347-3e69-428a-8348-042e2908232c) ![CSS](https://github.com/Harshdev625/NewsSphere/assets/98793412/e0b0d16f-0954-486a-ba80-07cac0d29364) ![javascript](https://github.com/Harshdev625/NewsSphere/assets/98793412/989b10d2-efe2-43d9-9873-87379af40ef8) ![bootstrap](https://github.com/Harshdev625/NewsSphere/assets/98793412/16312f73-7fd5-48c0-98ff-8fa79f19e3e9) ![React](https://github.com/Harshdev625/NewsSphere/assets/98793412/e2c2644e-76a7-484c-ba77-055a12371d5a) <!--Preview--> # Preview https://github.com/Harshdev625/NewsSphere/assets/98793412/0fa00122-f4c7-43f9-86b2-86e16f8589e9 # Contributing Contributions to the NewsSphere are welcome! If you encounter any bugs or issues or have ideas for improvements, please open an issue on the repository. Pull requests with enhancements are also appreciated. <p align='center'> (If you liked the project, give it a star 😃) </p>
NewsSphere is a web application that provides users with the latest news from around the world. The app utilizes the NewsAPI to gather news articles. key features of NewsSphere are its advanced filtering options and infinite scrolling functionality, which enables users to seamlessly browse through a virtually endless stream of news articles .
booottsrap-5,infinite-scroll,loader,newsapi,react,axios,javascript
2023-07-06T07:31:36Z
2023-08-10T12:24:34Z
null
1
2
9
0
1
6
null
null
JavaScript
AK016/AK016.github.io
main
# Portfolio This repository contains the source code and assets for my personal portfolio website. The website showcases my skills, projects, and contact information. ## Live Demo Check out the live version of my portfolio website: [AK](https://ak016.github.io/) ![Demo](https://github.com/AK016/AK016.github.io/assets/123861375/e0f6d4fd-cfa6-4e8b-9d1d-1a38424118cd) ## Features - Responsive design for optimal viewing on various devices - Smooth scrolling navigation with active section highlighting - Dynamic job title animation - Skills and projects displayed in an appealing grid layout - Contact information provided for easy communication ## Technologies Used - HTML5 - CSS3 - JavaScript - jQuery ## Usage 1. Clone the repository: `git clone https://github.com/AK016/AK016.github.io.git 2. Open the `index.html` file in your web browser. 3. Explore the different sections of the portfolio website. 4. Click on the navigation links to scroll to the corresponding sections. 5. Contact me using the provided contact information. ## License This project is licensed under the [MIT License](LICENSE). ## Contact If you have any questions or feedback, feel free to reach out to me: - Email: akshaykadam9010@gmail.com - LinkedIn: https://www.linkedin.com/in/akshay-kadam-8444b81ab/ - Phone: +91 9686315358
This repository contains the source code and assets for my personal portfolio website. The website showcases my skills, projects, and contact information.
css3,html5,javascript,portfolio
2023-07-10T12:48:59Z
2023-12-14T16:20:21Z
null
1
0
188
0
0
6
null
null
HTML
caojianping/tsx-open-platform
main
# tsx-open-platform open-platform开放平台集成SDK,封装了各大平台jsapi通用方法,目前包含了钉钉、飞书等平台。 ## 安装 Using npm: ```bash $ npm install tsx-open-platform ``` Using yarn: ```bash $ yarn add tsx-open-platform ``` Using pnpm: ```bash $ pnpm add tsx-open-platform ``` ## API ### 1. 相关接口 文件:platform.interface.ts ```ts /** * 开放平台选项接口 */ export interface IOpenPlatformOptions { // 扩展字段:签名地址 signatureUrl: string; } /** * 开放平台接口 */ export interface IOpenPlatform { // 开放平台类型 type: OpenPlatformTypeEnum; // 是否准备就绪 isReady: boolean; // 配置选项 options: IOpenPlatformOptions | null; /** * 初始化 * @param options 初始化参数选项 */ init(options?: IOpenPlatformOptions): Promise<boolean>; /** * 授权码 * @param isHash 页面是否为哈希方式 */ authCode(isHash?: boolean): Promise<string>; /** * 扫码 * @param type 扫码类型 * @param barCodeInput 是否支持手动输入条形码 */ scanCode( type?: DingdingScanTypeEnum | string[], barCodeInput?: boolean ): Promise<IDingdingScanResult | IFeishuScanResult>; } ``` 文件:dingding.interface.ts ```ts /** * 钉钉鉴权信息接口 */ export interface IDingdingSignature { // 微应用ID agentId: string; // 企业ID corpId: string; // 生成签名的时间戳 timeStamp: string; // 自定义固定字符串 nonceStr: string; // 签名 signature: string; } /** * 钉钉授权码结果接口 */ export interface IDingdingAuthResult { // 授权码 code: string; } /** * 钉钉扫码结果接口 */ export interface IDingdingScanResult { // 扫码内容 text: string; } ``` 文件:feishu.interface.ts ```ts /** * 飞书鉴权信息接口 */ export interface IFeishuSignature { // 应用ID appId: string; // 生成签名的时间戳 timestamp: string; // 自定义固定字符串 nonceStr: string; // 签名 signature: string; } /** * 飞书扫码结果接口 */ export interface IFeishuScanResult { // 扫码结果 result: string; // 错误消息 errMsg: string; } ``` ### 2. 相关枚举 ```ts /** * 开放平台类型枚举 */ export const enum OpenPlatformTypeEnum { // 钉钉 Dingding = 0, // 飞书 Feishu = 1, } /** * 钉钉扫码类型枚举 */ export const enum DingdingScanTypeEnum { // 全部 All = 'all', // 二维码 QrCode = 'qrCode', // 条形码 BarCode = 'barCode', } ``` ## 示例 public.html ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <link rel="icon" href="/favicon.ico" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Vite App</title> <!-- 钉钉jsapi_sdk --> <script src="https://g.alicdn.com/dingding/dingtalk-jsapi/2.13.42/dingtalk.open.js"></script> <!-- 飞书jsapi_sdk --> <script type="text/javascript" src="https://lf1-cdn-tos.bytegoofy.com/goofy/lark/op/h5-js-sdk-1.5.15.js"></script> <!-- 备注:如果所有平台的jssdk引入都开放时,那么工厂创建方法需要指定平台枚举:new OpenPlatformFactory().getInstance(OpenPlatformTypeEnum.Dingding) --> </head> <body> <div id="app"></div> <script type="module" src="/src/main.ts"></script> </body> </html> ``` ```html <template> <div> <h1>开放平台功能测试</h1> <p> <button @click="authCode">获取应用的免登授权码</button> </p> <p> <button @click="scanCode">调用扫码功能</button> </p> </div> </template> ``` ```ts import { defineComponent, onMounted } from 'vue'; import { OpenPlatformFactory, DingdingScanTypeEnum, IOpenPlatform } from '@agilines/open-platform'; export default defineComponent({ name: 'App', components: {}, setup() { const openPlatformNames = ['钉钉平台', '飞书平台']; let openPlatform: IOpenPlatform | null = null; onMounted(() => { // 钉钉调用测试 const factory = new OpenPlatformFactory(); console.log('onMounted factory:', factory); // const instance: IOpenPlatform | null = factory.getInstance(OpenPlatformTypeEnum.Dingding); const instance: IOpenPlatform | null = factory.getInstance(); console.log('onMounted instance:', instance); if (instance) { instance.init(); } openPlatform = instance; }); /** * 授权码 */ const authCode = async () => { try { const result = await openPlatform?.authCode(); alert(` 授权码调用平台:${openPlatformNames[openPlatform?.type || 0]}\r\n 授权码调用结果:${JSON.stringify(result, null, 2)} `); } catch (error: any) { alert('error:' + JSON.stringify(error, null, 2)); } }; /** * 扫码 */ const scanCode = async () => { try { const result = await openPlatform?.scanCode(DingdingScanTypeEnum.All); alert(` 扫码调用平台:${openPlatformNames[openPlatform?.type || 0]}\r\n 扫码调用结果:${JSON.stringify(result, null, 2)} `); } catch (error: any) { alert('error:' + JSON.stringify(error, null, 2)); } }; return { authCode, scanCode }; }, }); ``` ## 内网穿透工具 ### 1. 钉钉 ```bash $ npm install dingtalk-design-cli@latest -g $ ding ngrok --subdomain xyz --port 8080 ``` 详细使用方式见:https://open.dingtalk.com/document/resourcedownload/http-intranet-penetration
open-platform开放平台集成SDK。
javascript,typescript
2023-07-05T12:14:59Z
2023-07-05T12:19:52Z
null
1
0
2
0
0
6
null
MIT
TypeScript
luisbocanegra/kwin-panel-auto-hide
main
# Panel Auto Hide > [!IMPORTANT] > **This project is no longer being maintained** > > Now that Plasma 6 has been released with Dodge Window feature builtin, I have no need for this anymore. If anyone need to have this on Plasma 5 feel free to fork and fix it or start a new one. A KWin script that hides Plasma panels when there are maximized windows (all/top/bottom/left/right). [demo](https://github.com/luisbocanegra/kwin-panel-auto-hide/assets/15076387/63ca62d2-0325-4e42-99f2-9cc87b125d7d) ## Why? *Why not?* * I like to have a panel on a clean desktop but to stay away if I maximize * There is windows can cover but panel still shows behind translucent/blurred windows and I don't like that * Windows can cover sometimes doesnt show when hovering if maximized windows is present * To replicate [Latte Dock](https://github.com/KDE/latte-dock)'s "dodge" mode ## Some notes * This had only been tested on single/double monitor setups and can only handle a single window as of now * **Panel on screen edge between two monitors does not auto hide**, this is a Plasma [BUG:351175](https://bugs.kde.org/show_bug.cgi?id=351175) * Primary monitor must be the left one! > If the right monitor is set as primary it will toggle panels on the opposite screen??? I could not find a solution for this due to my lack of knowledge on how Plasma and KWin scripting work but if someone knows how let me know or open a PR :) * I am a newbie so expect messy code and bugs :lady_beetle: ## Features ### Current * [x] Configurable which panels to hide (`top`, `bottom`, `left`, `right`) * [x] Toggles auto hide only on screen with visible maximized window * [x] Unhides panel on minimize of maximized window * [x] Hides panel on unminimize of maximized window * [x] Whitelist mode * [x] Virtual desktop switching support * [x] Configurable window class blacklist * [ ] Handle multiple windows on same screen * [x] Minimizing/maximizing stacked windows (partially) * [ ] Handle tiled windows * [x] Multi monitor support * [x] Handle windows position relative to the screen they are on * [ ] Handle windows switching between screens (`Alt`+`F3`>`Move to Screen`) * [x] Show on Peek at desktop * [x] Dodge mode (hide when a window enters panel area) * [x] Dodge on panels set to dodge (only for panels with auto-hide enabled) ### May be added * [ ] ? ## Installing Download it from [KDE Store](https://store.kde.org/p/2063197) or use `KWin Scripts` > `Get New Scripts`/`Discover` > `Plasma Addons` > `search` > `panel auto hide` ## Building Just clone the repo. `make` commands have been set up to do all the things. * `make build` - Build the `.kwinscript` file * `make clean` - Remove the `.kwinscript` file * `make install` - Install the script to your Plasma * `make uninstall` - Uninstall the script from your Plasma * `make debug` - See `print()` outputs (unfortunately shows all kwin scripts on your system and does not update in real time) ## How does it work (*or at least tries to*)? 1. When a window is created/maximized/unmaximized it gets on which iscreen it is 2. Then calls `org.kde.plasmashell /PlasmaShell evaluateScript` using `callDBus` with passed screen and window properties 3. The plasma script loops through all panels 1. Checks if the panel screen property is the same as the window one 2. If it is then toggles between `autohide` and `windowsbelow` depending on the window maximized state 4. The dodge mode works by listening for windows geometry chanages 1. If a windows enters the area of a panel that can hide and has dodge mode enabled, the panel will be hidden 2. When the window leaves the panel area the panel is restored 5. The reason for using `windowsbelow` is because: * Tiled windows using shortcuts automatically enter the panel, making it dodge as intended * Dodge movement seems smoother * Switching from `autohide` to `windowscover` doesnt bring the panel back without hovering it first ## Contributing PRs are welcome! ## Credits & Resources * Based on (but not forked from) [fin444/truely-maximized](https://github.com/fin444/truely-maximized) * Config ui file was adapted from [zeroxoneafour/polonium](https://github.com/zeroxoneafour/polonium) * [This tubbadu's reddit comment on how to toggle panels auto hide](https://www.reddit.com/r/kde/comments/zmd2zq/comment/j0q4rks/?utm_source=share&utm_medium=web2x&context=3)
A KWin script that hides Plasma panels when there are maximized windows
autohide,javascript,kde,kwin,kwin-script,panel
2023-07-16T06:34:39Z
2024-03-03T08:41:15Z
2023-07-18T08:08:21Z
1
6
25
0
0
6
null
GPL-3.0
JavaScript
rhpo/Luna
main
###### NOTE: This README.md file temporarily placeholdes the repo, please be patient for the author to document Luna and refer to the code below at the meanwhile. # Luna 🌙 &nbsp;&horbar;&nbsp; A High-Level Programming language. <div align="center"> <br> <!--img src="/assets/logo-styles/luna-noborders.png#gh-dark-mode-only" width="140"> <img src="/assets/logo-styles/luna-noborders.png#gh-light-mode-only" width="140"--> <img src="/assets/logo-styles/luna-noborders.png" width="140"> <h3 align="center">Luna</h3> <p align="center"> <strong>Luna: </strong> An <strong>elegant</strong>, versatile programming language with efficient scripting capabilities, built in <img src="https://cdn-icons-png.flaticon.com/512/5968/5968381.png" width="16" align="center"/> TypeScript for simplicity and productivity in both general programming and automation tasks 🤖.</p> <a href="https://github.com/rhpo/luna/tree/main/docs"><strong>Explore the docs »</strong></a> <br> <a href="https://rhpo.github.io/luna/releases/">Get Releases</a> · <a href="https://rhpo.github.io/luna/examples/">View Examples</a> · <a href="https://github.com/rhpo/luna/issues">Report Bug</a> · <a href="mailto:luna@ramey.ml">Request Feature</a> <br> <br> <p> <a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a> <a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a> </p> <div align="center"> [![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url] [![Linkedin][linkedin-shield]][linkedin-url] [![Discord][discord-shield]][discord-url] <p> <!--a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a--> <a href="https://www.npmjs.com/package/lunascript"><img src="https://img.shields.io/npm/v/lunascript.svg?maxAge=3600" alt="npm version" /></a> <a href="https://www.npmjs.com/package/lunascript"><img src="https://img.shields.io/npm/dt/lunascript.svg?maxAge=3600" alt="npm downloads" /></a> </p> </div> </div> <details align="left"> <summary>Table of Contents</summary> <ol> <li> <a href="#news">📰 News</a> </li> <li> <a href="#about-the-project">🔍 About The Project</a> </li> <li><a href="#why-choose">🤔 Why Luna?</a></li> <li> <a href="#getting-started">🛠️ Getting Started</a> <ul> <li><a href="#nodejs">🌿 NodeJS</a></li> <li><a href="#web">🌐 Web Browsers (VanillaJS)</a></li> </ul> </li> <li><a href="#usage">✋ Usage</a></li> <li><a href="#cdn">📕 CDN</a></li> <li><a href="#exaples">🕹️ Code Examples</a></li> <li><a href="#docs">📖 Documentation</a></li> <li><a href="#api">📚 API</a></li> <li><a href="#license">📜 License</a></li> <li><a href="#contact">👋 Contact</a></li> <li><a href="#about-author">👤 About the Author</a></li> </ol> </details> <hr> <br> <h2 name="news">&bull; 📰 News</h2> + ✅ Added support for __asyncronous__ ``lambda`` expressions. + ✅ Added "use" statements: ``use(external as custom) from 'file.lnx'`` + ✅ Improved **speed & performance** ⚡. + ✅ Added ``embed`` statements, you can now **embed** code from *other files* inside your main file: ``embed "path/to/file.ln";`` + ✅ Added TapStatements, to execute files without the need to import (performance optimisation): ``tap "exec/this/code.ln";`` <br> _____ <br> <h2 name="about-the-project">&bull; 🔍 About The Project</h2> **Luna** is a high-level programming language. It is designed to provide an elegant and productive coding experience for developers. Luna offers a clean and intuitive syntax, making it easier to write efficient and readable code. The language supports a variety of programming paradigms, including procedural, object-oriented, and functional programming styles. Luna is built with a focus on simplicity and productivity, aiming to streamline the development process and enhance developer experience. It provides powerful abstractions and built-in libraries to facilitate common programming tasks. Luna is an interpreted programming language, which means that code written in Luna is executed directly by an interpreter rather than being compiled into machine code. Here's a high-level overview of how Luna works: 1. **Parsing**: When you write Luna code, the interpreter first parses it to understand its structure and syntax. This involves breaking the code into tokens and building an abstract syntax tree (AST) representation. 2. **Semantic Analysis**: After parsing, Luna performs semantic analysis. This phase involves analyzing the AST to enforce language rules and perform type checking. The interpreter verifies that the code follows the correct usage of variables, functions, and types, ensuring its correctness. 3. **Execution**: Once the code passes semantic analysis, the Luna interpreter begins executing the code line by line. It evaluates expressions, assigns values to variables, and executes control flow statements such as conditionals and loops. During execution, Luna can interact with input and output streams, read from files, and perform other operations as needed. 4. **Runtime Environment**: Luna provides a runtime environment that includes built-in functions, libraries, and data structures. Developers can utilize these features to perform common tasks without having to implement them from scratch. Luna's interpreter handles the execution of code dynamically, allowing for flexibility and quick development cycles. This dynamic nature makes it suitable for scripting tasks and rapid prototyping. It also supports concurrency and asynchronous programming using mechanisms like coroutines or event-driven programming. Overall, Luna aims to provide an elegant and productive programming experience, enabling developers to write clean and expressive code while leveraging the power of the underlying interpreter to execute their programs efficiently. <h2 name="why-choose">&bull; 🤔 Why Luna?</h2> **Most developers choose us because of the <u>Following Reasons:</u>** + Luna offers a clean and intuitive syntax that promotes readability and ease of understanding. + The language prioritizes simplicity and productivity, allowing developers to write code more efficiently. + Luna provides powerful abstractions and built-in libraries, reducing the need for extensive boilerplate code. + It supports multiple programming paradigms, including procedural, object-oriented, and functional programming. + Luna's focus on elegance and flexibility makes it an excellent choice for building a wide range of applications, from web development to system programming. <br> <h2 name="why-choose">&bull; 🤖 How does Luna 🌙 function?</h2> Luna's functioning follows a precise sequence: first, the written code undergoes **tokenization**, breaking it into individual tokens. These tokens are then **parsed** to form *statements*, which are organized into an **Abstract Syntax Tree (AST)**. This AST is then preprocessed, embedding any inline code fragments. The interpreter then steps in, evaluating the AST and executing the embedded code, resulting in a final result object known as a **Runtime Value**. This sequential process ensures that the code's logic is accurately understood, processed, and executed, producing the desired outcomes in Luna's unique programming environment. <div align="center"> ### Luna Diagram representing the Architecture Overview <img src="https://github.com/rhpo/Luna/assets/69460661/6f390f7f-8a43-41c9-9765-6ec50fbf8b47" width="700"> </div> ### Red flags 🚩: **Luna** is 7.28x slower than **Python** (exactly 7.28060546875x) Relation between the runtime of Luna $(t_{l})$ and the runtime of Python $(t_{p})$ and the Luna-Python Time Scalar $(\Delta_{l,p} \approx 7.28060546875)$ Like so: $t_{p}(t_{l}) = \Delta_{l,p} * t_{l}$ Luna has a max of recursive function call of $n = 2428 \pm \Delta R, \ \ \Delta R \in \mathbb{Z}, \ \ |\Delta R| \approx 50$ OR $(\frac{11}{100})$ of the max recursive call of JS (the motherlang). **UPDATE** 🔥: When **Compiled**, **Luna** gets **20x faster** than *Python* ⚡! <br> <br> ____ <h1 name="getting-started">&bull; 🛠️ Getting Started</h1> <strong name="nodejs"> &nbsp;&nbsp;🛠️ Install the Luna API 🌙</i> : </strong> <br><br> ```console luna:~$ npm i -g lunascript # Installation (API & CLI)... luna:~$ luna --help # Show Help Menu... ``` <strong name="web"> &nbsp;&nbsp;🌐 API <strong>&bull; TypeScript</strong></strong> <br><br> ```ts import { Luna, ... } from 'lunascript'; let script = ` name = input("What's your name? "); print("Hello, {name}!") `; let luna = new Luna(); let output = luna.run(lunascript); console.log(output); // object {RuntimeValue} ``` <br> <h1 name="examples">&bull; 🕹️ Code Examples</h1> #### ✱ Functions in Luna: ```rust fn read book { print("Reading {book}...") } read("Luna Docs") # Reading Luna Docs... ``` #### ✱ Functions with default values: ```rust fn sum x=(1) y=(1) { if isdef x && isdef y: x + y else null } print(sum(2, 4)) # 6 ``` #### ✱ Constant Definition: ```rust # Defining a constant pi: const = 3.141 fn area r { pi * r ** 2 } print(area(2)) ``` #### ✱ Reactivity in Luna: ```rust # Reactivity a = "foo" b: react<a> = lambda { a.replace("o", '') } print(b) # "f" a = "Hellooo" # // Reactivity... b's function got triggered print(b) # "Hell" ``` #### ✱ Anonymous functions Assignment: ```rust # User defined function: fn sum x y { x + y } # Function assigned to variable sum = fn sum x y { x + y } # Anonymous function: a = lambda x y { x + y } # OR: Add a colon after the fn keyword ':' a = fn: x y { x + y } # Inline function: fn sum x y: x + y # Inline anonymous function: sum = lambda x y: x + y # OR: sum = fn: x y: x + y # Anonymous function without arguments: f = lambda: print('hello!') f = fn::print('hello!') ``` #### ✱ Actions in Luna 🌙 ```rust # Note: a = "foo" # is same as: a: var = "foo" # Those are called Actions, and the variable's action is "var" by default... # Constant: a: const = 2.718 a = 2 # NameError: Assignment to constant variable 'a'. ``` #### ✱ Use-case of Luna's Reactivity feature: ```rust # Reactivity x = 1 doubled: react<x> = x * 2 x = 2 print(doubled) // Output: `4` ``` #### ✱ Export variables & functions: ```rust // Export function: out fn sum x y { ^^^ return x + y } // Export variable (using the out action): x: out = 5 ^^^ ``` #### ✱ Importing variables & functions: ```rust // Import a module: use "maths.lnx" as math; // Import specific components: use (cos, sin as Sinus, tan, PI as pi) from "math.lnx"; // Modules have extension ".lnx"... // Call a file without importing it: tap "file.ln"; // Embedding a file into the current code (code-preprocessor): embed "file.ln"; ``` #### ✱ Implementing Math in Luna: $$\Huge e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!}$$ ```rust # The Maclaurin series of the exponential function e^x: use (fact as factorial) from "factorial.lnx" fn expo x { precision = 100 result = 0 n = 0 while n < precision { result += x**n / factorial(n) n += 1 } result } print(expo(0)) # 1 ``` #### ✱ Implementing Luna's reactivity with Math: $$\Huge \psi(\theta) = \frac{e^{2\theta}}{log(4\theta)} + \theta^2 + 2\theta!$$ ```rust use (E as e, factorial, Log as log) from "math.lnx"; theta = 1 psi_theta: react<theta> = (e ** 2 * theta) / log(4 * theta) + theta**2 + factorial(2 * theta) print(psi_theta) // Output: `15.2729565249...` theta = 2 print(psi_theta) // Output: `68.4570428413...` ``` <br><br><br> <h1 name="docs">📖 Documentation</h1> You can check **Luna** documentation [here (GitHub)](https://github.com/rhpo/luna/tree/main/docs). <br> <h1 name="api">📚 API</h1> You can check **Luna** *Application Programming Interface* (API) [here (GitHub)](https://github.com/rhpo/luna/tree/main/api). <br> <h1 name="license">📜 Licence (MIT)</h1> *Copyright (c) 2022 Luna (https://www.github.com/rhpo/luna) 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.``` <br> <h1 name="contact">👋 Contact:</h1> <p>&bull; Email &nbsp;&horbar;&nbsp; <a href="mailto:luna@ramey.ml">luna@ramey.ml</a></p> <p>&bull; Phone Number &nbsp;&horbar;&nbsp; <a href="tel:+213553238410">+213 553 23 84 10</a></p> <p>&bull; Discord &nbsp;&horbar;&nbsp; <a href="https://discord.gg/XXa7PpnMbq">(Luna ― High-level programming language)</a></p> <br> <h1 name="about-author">👤 About the author:</h1> <ul> <p>&bull; Name &nbsp;&horbar;&nbsp; Ramy Hadid.</p> <p>&bull; Age &nbsp;&horbar;&nbsp; 18 years old.</p> <p>&bull; Nationality &nbsp;&horbar;&nbsp; 🇩🇿 Algeria.</p> <p>&bull; Linkedin &nbsp;&horbar;&nbsp; <a href="https://www.linkedin.com/in/ramy-hadid-15aa70243/">(Ramy Hadid)</a></p> <p>&bull; Instagram &nbsp;&horbar;&nbsp; <a href="https://www.linkedin.com/in/ramy-hadid-15aa70243/">@ramyhadid</a></p> <p>&bull; Discord &nbsp;&horbar;&nbsp; <a href="https://discord.com/users/751901651622690927">ramy#1539</a></p> <p>&bull; GitHub &nbsp;&horbar;&nbsp; <a href="https://www.github.com/rhpo">@rhpo</a></p> <p>&bull; Email (personal) &nbsp;&horbar;&nbsp; <a href="mailto:me@ramey.ml">me@ramey.ml</a></p> <p>&bull; Programming Languages &nbsp;&horbar;&nbsp; C# &bull; Ruby &bull; TypeScript &bull; Python &bull; LunaScript.</p> </ul> <br> > Written by <a href="https://www.github.com/rhpo">@rhpo</a> with ❤️. [contributors-shield]: https://img.shields.io/github/contributors/rhpo/luna?style=for-the-badge [contributors-url]: https://github.com/rhpo/luna/graphs/contributors [forks-shield]: https://img.shields.io/github/forks/rhpo/luna?style=for-the-badge [forks-url]: https://github.com/rhpo/luna/network/members [stars-shield]: https://img.shields.io/github/stars/rhpo/luna?style=for-the-badge [stars-url]: https://github.com/rhpo/luna/stargazers [issues-shield]: https://img.shields.io/github/issues/rhpo/luna?style=for-the-badge [issues-url]: https://github.com/rhpo/luna/issues [license-shield]: https://img.shields.io/github/license/rhpo/luna?style=for-the-badge [license-url]: https://github.com/rhpo/luna/blob/master/LICENSE [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555 [discord-shield]: https://img.shields.io/discord/1006994262174478377?color=7289da&label=Discord&logo=discord&logoColor=white&style=for-the-badge [discord-url]: https://discord.gg/XXa7PpnMbq [linkedin-url]: https://www.linkedin.com/in/ramy-hadid-15aa70243/
A High-Level dynamically typed versatile language for elegant programming and streamlined scripting.
javascript,language,luna,programming,programming-language,rust,scripting-language,typescript,vanilla-javascript,vanilla-js
2023-07-05T16:44:51Z
2024-03-20T19:19:20Z
null
1
0
98
0
0
6
null
null
TypeScript
sondosaabed/Currency-Converter-Java-Web-Application
main
# Currency-Converter-Java-Web-Application This project used Spring MVC, java web applications on Eclipse to perform tetsing tasks ## Technologies use: please check the pom.XML file the main technologies that you need to run this appplication on the apache server or using the local host, use the sql file to create you database and connect to it , The API used to fetch the data about the rates is the ExchangeRate https://www.exchangerate-api.com/docs/pair-conversion-requests ![image](https://github.com/sondosaabed/Currency-Converter-Java-Web-Application/assets/65151701/c1f5e0bf-4467-48aa-9907-27185cc4c76d) ![image](https://github.com/sondosaabed/Currency-Converter-Java-Web-Application/assets/65151701/f4ad4b12-d678-407f-8cf8-b2d6e5bf5f02) ![image](https://github.com/sondosaabed/Currency-Converter-Java-Web-Application/assets/65151701/f4129474-367d-4b26-8900-5d0552e38574)
This project used Spring MVC, java web applications apache server on Eclipse to perform tetsing tasks
apacheserver,css,currency-converter,html,java,javascript,javawebapp,jsp-servlet,spring-mvc
2023-07-14T12:19:32Z
2023-07-14T20:28:07Z
null
1
0
8
0
0
6
null
MIT
Java
Ashishverma48/Hospital-Management-System-In--Django
master
# Hospital Management ![developer](https://img.shields.io/badge/Developed%20By%20%3A-Ashish%20Verma-red) --- ## screenshots ### Homepage ![homepage snap](https://github.com/Ashishverma48/Hospital-Management-System-in-django/blob/master/static/hospital/images/ScreenShot/home1.png) ![](https://github.com/Ashishverma48/Hospital-Management-System-in-django/blob/master/static/hospital/images/ScreenShot/home3.png) ![](https://github.com/Ashishverma48/Hospital-Management-System-in-django/blob/master/static/hospital/images/ScreenShot/home4.png) ### Admin Dashboard ![dashboard snap](https://github.com/Ashishverma48/Hospital-Management-System-in-django/blob/master/static/hospital/images/ScreenShot/admin.png) ### Invoice ### Doctor list --- ## Functions ### Admin - Signup their account. Then Login (No approval Required). - Can register/view/approve/reject/delete doctor (approve those doctor who applied for job in their hospital). - Can admit/view/approve/reject/discharge patient (discharge patient when treatment is done). - Can Generate/Download Invoice pdf (Generate Invoice according to medicine cost, room charge, doctor charge and other charge). - Can view/book/approve Appointment (approve those appointments which is requested by patient). ### Doctor - Apply for job in hospital. Then Login (Approval required by hospital admin, Then only doctor can login). - Can only view their patient details (symptoms, name, mobile ) assigned to that doctor by admin. - Can view their discharged(by admin) patient list. - Can view their Appointments, booked by admin. - Can delete their Appointment, when doctor attended their appointment. ### Patient - Create account for admit in hospital. Then Login (Approval required by hospital admin, Then only patient can login). - Can view assigned doctor's details like ( specialization, mobile, address). - Can view their booked appointment status (pending/confirmed by admin). - Can book appointments.(approval required by admin) - Can view/download Invoice pdf (Only when that patient is discharged by admin). --- ## HOW TO RUN THIS PROJECT - Install Python(3.7.6) (Dont Forget to Tick Add to Path while installing Python) - Open Terminal and Execute Following Commands : ``` pip install django==3.0.5 pip install Pillow pip install djangorestframework ``` - Download This Project Zip Folder and Extract it - Move to project folder in Terminal. Then run following Commands : ``` py manage.py makemigrations py manage.py migrate py manage.py runserver ``` - Now enter following URL in Your Browser Installed On Your Pc ``` http://127.0.0.1:8000/ ``` ## CHANGES REQUIRED FOR CONTACT US PAGE - In settins.py file, You have to give your email and password ``` EMAIL_HOST_USER = 'youremail@gmail.com' EMAIL_HOST_PASSWORD = 'your email password' EMAIL_RECEIVING_USER = 'youremail@gmail.com' ``` - Login to gmail through host email id in your browser and open following link and turn it ON ``` https://myaccount.google.com/lesssecureapps ``` ## Drawbacks/LoopHoles - Any one can be Admin. There is no Approval required for admin account. So you can disable admin signup process and use any logic like creating superuser. - There should be at least one doctor in hospital before admitting patient. So first add doctor. - On update page of doctor/patient you must have to update password. ## Disclaimer This project is developed for demo purpose and it's not supposed to be used in real application. ## Inspired By -[sumitkumar1503](https://github.com/sumitkumar1503/hospitalmanagement) ## Feedback Any suggestion and feedback is welcome. You can message me on facebook - [Contact on Linkdin](https://www.linkedin.com/in/ashishverma48/) - [Contact on Email](mailto:ashishkv845@gmail.com)
Hospital Management System || Python Django
css,django,django-rest-framework,html5,python,sqlite,bootstrap,javascript
2023-07-13T15:27:17Z
2023-07-22T11:44:09Z
null
2
1
18
0
2
6
null
MIT
HTML
christo-mabbs11/bimbus-docs
master
null
Bimbus AI: a Node.js command line tool utilizing OpenAI's GPT language model APIs for automated code documentation generation, boosting code comprehension, collaboration, and development efficiency. Streamline your workflow and unleash the full potential of your code with Bimbus 🚀✨
ai,ai-tools,auto-comments,auto-documentation,autodoc,automation,cli-documentation,docs,documentation,documentation-generator
2023-06-30T01:42:04Z
2023-08-03T02:36:16Z
null
1
1
99
0
0
6
null
MIT
JavaScript
bohaz/math-magicians
dev
<a name="readme-top"></a> <div align="center"> <h3><b>Math-Magicians</b></h3> </div> # 📗 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) # 📖 Math-Magicians <a name="about-project"></a> **Math-Magicians** It is a Single Page Application that allows users to make simple math operations and read inspirational quotes from an API-Ninja. ![Calc](https://github.com/bohaz/math-magicians/assets/127757182/6a72431f-53e4-4634-8bcc-74af0b34732c) ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li><a href="https://es.react.dev/">React</a></li> </ul> </details> <details> <summary>Client</summary> <ul> <li><a href="https://api-ninjas.com/">Api-Ninja</a></li> </ul> </details> <details> <summary>Client</summary> <ul> <li><a href="https://developer.mozilla.org/es/docs/Web/CSS">CSS3</a></li> </ul> </details> ### Key Features <a name="key-features"></a> - **Best organization** - **Professional documentation** - **Clean coding** - **Team Working** <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🚀 Live Demo <a name="live-demo"></a> - [Live Demo Link](https://ricardo-math-magicians.onrender.com) <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: - Visual Studio Code installed - Npm installed - A GitHub account - Git installed ### Setup Clone this repository to your desired folder: ```sh cd my-folder git clone git@github.com:bohaz/math-magicians.git ``` ### Install Install this project with: -Install Node Modules ```sh npm install ``` ### Usage To run this project, execute the following command: -Start the development server ```sh npm start ``` ### Run tests To run tests, run the following commands: - ESLint linter errors run: ``` npx eslint "**/*.{js,jsx}" ``` -CSS linter errors run: ``npx stylelint "**/*.{css,scss}"`` ### Deployment You can deploy this project using: - Github <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 👥 Authors <a name="authors"></a> 👤 **Ricardo Martínez** - GitHub: [@bohaz](https://github.com/bohaz) - LinkedIn: [Ricardo Martinez](https://www.linkedin.com/in/ricardomart%C3%ADnez%E2%88%B4/) - Portfolio: [Ricardo's Portfolio](https://ricardosportfolio.vercel.app/) <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🔭 Future Features <a name="future-features"></a> - [ ] **[Functionality]** - [ ] **[Content]** <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](https://github.com/bohaz/math-magicians/issues). <p align="right">(<a href="#readme-top">back to top</a>)</p> ## ⭐️ Show your support <a name="support"></a> If you like this project let me know with a STAR! <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🙏 Acknowledgments <a name="acknowledgements"></a> We would like to thaks Microverse for giving us the oportunity to build and contribute in projects like this. <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>
Math-Magicians It is a Single Page Application that allows users to make simple math operations and read inspirational quotes from an API-Ninja.
css3,react,javascript
2023-07-10T22:16:56Z
2024-05-22T19:47:13Z
null
1
6
25
0
0
6
null
MIT
JavaScript
extragoodlabs/security-workshop
trunk
<div align="center"> <img src="images/JumpWireLogo_PurpleBlue.svg" width="600" /> **Secure software demystified** --- </div> <br /> ## 🔒 Secure software demystified: data security practices This is the code repository for a workshop given at [fintech_devcon 2023](https://fintechdevcon.io/full-agenda/) titled **"Secure software demystified: data security practices"** During the workshop, a microservice application will be refactored to improve security, organized around the [OWASP Top10](https://owasp.org/Top10/) categories for web application security risks. We will improve authentication and authorization, encryption in transit, encryption at rest, and monitor for security-related events. | ![](images/owasp-top10-mapping.png) | |:--:| |*OWASP Top 10*| The microservice application contains and an API, a background worker, and a database. It runs in Kubernetes using k3d as the microcluster. The workshop is designed to teach security principles, as opposed to making specific technology choices. Its goal is to help developers improve the security of their applications by implementing zero trust, updating default framework configurations, adding sensitive data protection, and monitoring events for anomalies. ## 👀 Setup Install Docker, k3d and kubectl **tl;dr**: - Install [Docker](https://docs.docker.com/engine/install/) - the workhorse of the stack - Install and configure [k3d](https://k3d.io/v5.5.2/), a lightweight Kubernetes wrapper - Install [kubectl](https://kubernetes.io/docs/tasks/tools/) - for interacting with the Kubernetes API - Install [mkcert](https://github.com/FiloSottile/mkcert) - for local cert generation - Install [jwctl](https://github.com/extragoodlabs/jwctl) - for interacting with the JumpWire API - Deploy the workshop services - (optional) Some extra tools than can be helpful, but aren't required - [jq](https://jqlang.github.io/jq/) - great for formatting JSON output - [nodejs](https://nodejs.org/en) and [yarn](https://classic.yarnpkg.com/lang/en/docs/install/) - not required, but if you want to run the API server locally instead of only in Kubernetes you'll need thse - [rust](https://www.rust-lang.org/tools/install) - same as nodejs, but for the reconciler service ### Overview This application runs as microservices in Kubernetes. To work through the steps locally, we'll be using [Rancher k3s](https://github.com/k3s-io/k3s), a lightweight Kubernetes installation that is "easy to install, half the memory, all in a binary less than 100 MB." k3s, like most Kubernetes distros, only runs on Linux so we'll also run [k3d](https://k3d.io) which wraps k3s in Docker to make it run anywhere. First step is to clone this repo! ```shell git clone git@github.com:jumpwire-ai/fintech-devcon-2023.git cd fintech-devcon-2023/ ``` Install the dependencies above. After installing k3d, create a cluster to use for this workshop. Create a directory to use for kubernetes persistence: ```shell mkdir /tmp/k3dvol ``` And create the actual cluster: ```shell k3d cluster create workshop \ --port 9080:80@loadbalancer \ --port 9443:443@loadbalancer \ --api-port 6443 \ --image=rancher/k3s:v1.26.6-k3s1 \ --volume /tmp/k3dvol:/var/lib/rancher/k3s/storage@all \ --volume "$(pwd)/kubernetes/audit.yaml":'/var/lib/rancher/k3s/server/audit.yaml@server:*' \ --k3s-arg '--kube-apiserver-arg=audit-policy-file=/var/lib/rancher/k3s/server/audit.yaml@server:*' \ --k3s-arg '--kube-apiserver-arg=audit-log-path=/var/log/kubernetes/kube-apiserver-audit.log@server:*' ``` Check that its running! ```shell k3d cluster list # NAME SERVERS AGENTS LOADBALANCER # workshop 1/1 0/0 true ``` After creating the cluster, your Kubernetes config (~/.kube/config) will automatically be updated. To use `kubectl` with the cluster: ```shell kubectl config current-context # k3d-workshop kubectl get pods --all-namespaces # NAMESPACE NAME READY STATUS RESTARTS AGE # kube-system local-path-provisioner-76d776f6f9-9kswj 1/1 Running 0 20m # kube-system coredns-59b4f5bbd5-79tkd 1/1 Running 0 20m # kube-system svclb-traefik-dfba91fb-8257n 2/2 Running 0 19m # kube-system helm-install-traefik-crd-rzjr2 0/1 Completed 0 20m # kube-system helm-install-traefik-sh6bn 0/1 Completed 1 20m # kube-system traefik-57c84cf78d-4nhf8 1/1 Running 0 19m # kube-system metrics-server-68cf49699b-ppfc7 1/1 Running 0 20m ``` Now deploy the services to the cluster: ```shell kubectl apply -f kubernetes/postgres.yaml kubectl rollout status -w statefulset/postgres ./build-deploy api ./build-deploy reconciler ``` The first time running the `build-deploy` for each service could take a few minutes as it needs to pull and build a Docker image and then load it into the Kubernetes cluster. Future deploys will be quicer. Once deployed, the CronJob will trigger and you will see 3 pods (2 running and 1 completed): ```shell kubectl get pods # NAME READY STATUS RESTARTS AGE # postgres-0 1/1 Running 0 2m7s # api-7858bf6dc9-4szjp 1/1 Running 0 65s # reconciler-28204936-kx2z9 0/1 Completed 0 21s ``` ## 🖧 Workshop The microservice application in this workshop starts with a multi-tier architecture that is common to many web applications. It includes an API, background jobs and a database. ![Starting application architecture](./images/fintech_devcon-workshop-arch-start.svg) After making various software and infrastructure changes, the architecture will evolve to include an API gateway, a database gateway, and an observability stack. ![Ending application architecture](./images/fintech_devcon-workshop-arch-end.svg) ## Connecting to the API A service called `api` is created in Kubernetes that listens on port 80 and forwards it to the API service. You can forward a local connection to this service using kubectl: ``` shell kubectl port-forward svc/api 3000:80 # Forwarding from 127.0.0.1:3000 -> 3000 # Forwarding from [::1]:3000 -> 3000 ``` and then in another shell issue a request to the API: ```shell curl -i localhost:3000/ ``` You'll see this result, the header `X-Powered-By: Express` indicates this response is coming from our Express backend app: ```text HTTP/1.1 404 Not Found X-Powered-By: Express Content-Type: application/json; charset=utf-8 Content-Length: 21 ETag: W/"15-3jlv4LtvSUoQruAmr3ef7Px06u0" Date: Mon, 21 Aug 2023 15:04:49 GMT Connection: keep-alive Keep-Alive: timeout=5 {"error":"not found"} ``` ## 📝 Exercises This workshop has the following exercises 1. [A04:2021 Insecure Design](#a012021-insecure-design) 1. [A01:2021 Broken Access Control](#a012021-broken-access-control) 1. [A02:2021 Cryptographic Failures](#a022021-cryptographic-failures) 1. [A05:2021 Security Misconfiguration](#a012021-security-misconfiguration) 1. [A09:2021 Security Logging and Monitoring Failures](#a012021-security-logging-and-monitoring-failures) ### A04:2021 Insecure Design Installing security as layers of architecture allows us to centralize different concerns into a single place, as well as standardize how controls are applied across all backend microservices. As your application's complexity increases, security moves from a concern around individual apps to a concern about the overall architecture. >A new category for 2021 focuses on risks related to design and architectural flaws, with a call for more use of threat modeling, secure design patterns, and reference architectures. As a community we need to move beyond "shift-left" in the coding space to pre-code activities that are critical for the principles of Secure by Design. When your microservices start to proliferate, it becomes harder to ensure that every backend is implementing security controls correctly. Let's lift these controls into their own layer in our architecture as step one. #### Introducing API Gateway An API gateway is an application that sits in front of the API and acts as a single entry point for requests from outside the cluster and routes them to the appropriate backend microservices. It is useful for adding security controls without needing to modify the backend microservices themselves. We'll use an API gateway to handle ingress (incoming) HTTP requests to our cluster, then add request rate limiting, which can protect against credential-stuffing, denial-or-service, and other brute-force attacks. K3s comes with a reverse proxy and HTTP ingress controller called Traefik. It has a library of middleware and plugins for extending the capabilities of the proxy to add gateway functionality. Let's configure the cluster to use the gateway: ```shell kubectl apply -f kubernetes/api-gateway.yaml ``` Now we don't need to port-forward to make requests to our API microservice! You can simply run a curl command to the cluster: ```shell curl -i http://localhost:9080/api/users # HTTP/1.1 200 OK # Content-Length: 20044 # Content-Type: application/json; charset=utf-8 # Date: Wed, 23 Aug 2023 15:32:50 GMT # Etag: W/"4e4c-iChHJ1SEQjA0Es1Jbd0WBH9mWLU" # X-Powered-By: Express # [{"id":0,"credit_card":"342044649251781","currency":"USD","email":"selena_autem@hotmail.com","is_active":true,"country":"NO","num_logins":71,"password_hash":"199ca118cd1528f44faac4a013a92355","username":"arnulfo_consectetur","created_at":"2002-11-23T22:22:10.441Z"}, ... ``` Let's install the [RateLimit](https://doc.traefik.io/traefik/middlewares/http/ratelimit/) middleware, by updating our [kubernetes/api-gateway.yaml](kubernetes/api-gateway.yaml): ```diff // kubernetes/api-gateway.yaml +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: http-ratelimit + namespace: default +spec: + rateLimit: + average: 100 + burst: 50 --- apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: name: strip-api-prefix namespace: default spec: stripPrefix: prefixes: - /api --- apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: api-ingress namespace: default spec: entryPoints: - web routes: - kind: Rule match: PathPrefix(`/api`) services: - name: api port: 80 middlewares: + - name: http-ratelimit - name: strip-api-prefix ``` Let's update configure the cluster to add the new middleware: ```shell kubectl apply -f kubernetes/api-gateway.yaml ``` You can port forward the `traefik` container to view the dashboard: ```shell kubectl get pods -n kube-system -l app.kubernetes.io/name=traefik # NAME READY STATUS RESTARTS AGE # traefik-56cfc7b59f-4xpqd 1/1 Running 0 21s kubectl port-forward -n kube-system deployment/traefik 9000:9000 ``` Now open [http://localhost:9000/dashboard/#/](http://localhost:9000/dashboard/#/) in your browser, and you should see the middleware installed successfully: ![](images/traefik-dashboard.png) <details> <summary>Go deeper</summary> Architecture design can impact the overall security of an application. By adding components that have a specific purpose, we can ensure that security is applied consistently across many microservices while also reducing the complexity of individual applications. As we introduce additional API routes, or background jobs, or even new web applications, the gateways can operate agnostic to the technology being used by microservices. [CWE-501](https://cwe.mitre.org/data/definitions/501.html) lays out the principle of "trust boundaries", which are logical divisions in an application which data moves across. Adding layers that are dedicated to controlling those boundaries give you more control over security. There is also a strategy called "defense in depth". This describes an approach of not relying on a single control to provide security for a large portion of an application. Instead there should be multiple controls enforcing security, so that when one is compromised, an attacker does not gain "keys to the kingdom". By adding gateways to manage connections between different parts of our architecture, we decrease the likelihood that a failure can allow for all data to be stolen. </details> ### A01:2021 Broken Access Control The first risk of the OWASP Top 10 is "Broken Access Control". >Moving up from the fifth position, 94% of applications were tested for some form of broken access control with the average incidence rate of 3.81%, and has the most occurrences in the contributed dataset with over 318k. We will upgrade our API to add both authentication and authorization. While it is common for external APIs to have basic authentication in place, we will also use authentication for internal requests, such as those coming from our background job. The reason for this is to harden our application against "inside threats", where another internal application has been compromised and attackers are using it to exfiltrate data from our APIs. This approach is called "zero trust", and the idea is that no requests received by the API should be trusted, even if it is coming from inside our own cloud or network. In addition to authentication, we will introduce authorization to individual API endpoints. This will give us the ability to generate credentials that only allow a subset of the API functionality to be invoked. Authorization allows us to use the concept of "least privilege", where users or clients are only allowed to perform the operations that they need. It will also let us map API functions to different personas or roles, such as an administrator vs a normal user. #### Introducing JSON Web Tokens JSON Web Tokens, aka JWTs, are most useful for web application auth. They can be validated as authentically generated by our application (as opposed to generated by an attacker), can include information about the client making the request (such as a user id), are fairly tamper-proof, and can be set to expire after some time. Technically speaking, they are semi-structured Javascript Objects (JSON) that gets encoded into a string using base64url. > Here's a sample encoded JWT - [eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c](https://jwt.io) A JWT will be passed in an HTTP request header for all requests made to our API, and the API will validate the JWT before processing the request. Easy! (The only downside is that they are long strings, but other than that pretty perfect for auth). **IMPORTANT NOTE:** Information in a JWT is not secure, and they shouldn't include sensitive information like customer PII. Anyone can easily decode a JWT, just using tools or even the website [https://jwt.io/](https://jwt.io/). JWTs should also be treated like passwords, and not committed into source code or shared publicly. **IMPORTANT NOTE:** Once generated, JWTs remain valid until the expiration time passes. In some scenarios, it may be urgently necessary for you to be able to invalidate particular tokens on the backend server. For example a customer might notify you that they accidentally leaked one of their tokens, and you need to prevent it from being used by someone else. To handle this case, it's useful to have a concept of a "revocation list", or a set of tokens or rules that will deny access, even if the token itself is valid. #### Adding JWT authentication to Express We'll use a NodeJS library `jsonwebtoken` to generate and validate our JWTs. And we'll load a signing secret, used to generate and validate tokens, from an environment variable. Our cluster setup already created the value - in a production deployment you would generate a unique highly random secret for this. You can read the secret using this command: ```shell kubectl get secret api-secrets -o jsonpath="{.data.TOKEN_SECRET}" | base64 --decode # pVNSnxcBPi4mKBfwvPlMHuNc1xyABEIvNcLC0F9fr2zoSJp9BA5FMbu4dbLpyWpm ``` The API service is already configured to read [the environment variable](src/api/config/custom-environment-variables.json) on startup, but it doesn't do anything with it. Let's add some code to our API [index.js](src/api/routes/index.js) to generate tokens for our API. First load the secret from the config: ```diff // src/api/routes/index.js const express = require('express'); +const jwt = require('jsonwebtoken'); const router = express.Router(); +const tokenSecret = require('config').get('token_secret'); router.get('/', function(req, res, next) { res.status(404).json({error: "not found"}); }); module.exports = router; ``` And now an endpoint to generate a JWT - ```diff // src/api/routes/index.js router.get('/', function(req, res, next) { res.status(404).json({error: "not found"}); }); +router.post('/token', function(req, res) { + const claims = { sub: req.body.username } + const token = jwt.sign(claims, tokenSecret, { expiresIn: '6h' }); + + res.json({ token }); +}); module.exports = router; ``` Test it out! ``` shell ./build-deploy api ``` ```shell curl -X POST http://localhost:9080/api/token -H 'Content-Type: application/json' -d '{"username":"myfaveusername"}' # {"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZWJ1c3N5bWFuIiwiaWF0IjoxNjkyNDYyMzUwLCJleHAiOjE2OTI0NjQxNTB9.79AE9f7DVCSGhfi8BC3SMSbbEbRCCf5H-URljMa7xcg"} ``` You can copy the token into [jwt.io](https://jwt.io/) and you should see your username in the payload under the `sub` field. Next, we'll create a middleware for Express to validate a JWT. Let's add a function that can validate a token. In [src/api](src/api/) create a file called `auth.js` - ```javascript // src/api/auth.js const jwt = require('jsonwebtoken'); const logger = require('./logger'); const tokenSecret = require('config').get('token_secret'); const headerRegex = /^Bearer (.+)$/i; const authenticate = (req, res, next) => { const authHeader = req.headers['authorization']; // authorization header is of the format "Bearer token" const token = authHeader && authHeader.match(headerRegex); if (token == null) return res.sendStatus(401) jwt.verify(token[1], tokenSecret, (err, data) => { if (err) { logger.error(err); return res.sendStatus(401); } req.user = data; next(); }); }; module.exports = { authenticate, }; ``` This function will verify that a token is valid: signed by our secret and not expired. It also assigns the token data to a request variable called `user`. We can use this function for endpoints. Let's update the [users.js routes](src/api/routes/users.js) - ```diff // src/api/routes/users.js const express = require('express'); const { models } = require('../database'); +const { authenticate } = require('../auth'); const User = models.user; const router = express.Router(); /* List all users. */ -router.get('/', async function(req, res, next) { +router.get('/', authenticate, async function(req, res, next) { ... /* Get a single user by ID. */ -router.get('/:id', async function(req, res, next) { +router.get('/:id', authenticate, async function(req, res, next) { ... /* Create a new user. */ -router.post('/', async function(req, res, next) { +router.post('/', authenticate, async function(req, res, next) { ... /* Update an existing user by ID. */ -router.put('/:id', async function(req, res, next) { +router.put('/:id', authenticate, async function(req, res, next) { ... /* Delete an existing user by ID. */ -router.delete('/:id', async function(req, res, next) { +router.delete('/:id', authenticate, async function(req, res, next) { ``` Deploy the changes: ```shell ./build-deploy api ``` Now each of these routes will require a valid JWT header to be present in the request to process it. Otherwise it will return a 401 response. We can make the same updates to the endpoints in [transactions.js](src/api/routes/transactions.js). Try a request without a token, and you should see a `401 Unauthorized` response: ```shell curl -i http://localhost:9080/api/users # HTTP/1.1 401 Unauthorized # X-Powered-By: Express # Content-Type: text/plain; charset=utf-8 # Content-Length: 12 # ETag: W/"c-dAuDFQrdjS3hezqxDTNgW7AOlYk" # Date: Mon, 21 Aug 2023 20:35:43 GMT # # Unauthorized ``` Finally, we'll secure the token endpoint using our token secret. We don't want just any John or Jane to be able to generate a token. Typically this endpoint would be secured with another authentication scheme, like a password login. For this exercise we'll just reuse the token signing secret. Add one more authentication middleware method to [auth.js](src/api/auth.js): ```diff // src/api/auth.js const authenticate = (req, res, next) => { //... } +const authenticateRoot = (req, res, next) => { + const authHeader = req.headers["authorization"]; + const token = authHeader && authHeader.match(headerRegex); + + if (token == null || token[1] !== tokenSecret) return res.sendStatus(401); + + next(); +}; + module.exports = { authenticate, + authenticateRoot, }; ``` And use it on the endpoint generating tokens in [index.js](src/api/routes/index.js): ```diff // src/api/routes/index.js const express = require('express'); const jwt = require('jsonwebtoken'); +const { authenticateRoot } = require("../auth"); const router = express.Router(); const tokenSecret = require("config").get("token_secret"); //... -router.post('/token', function(req, res) { +router.post('/token', authenticateRoot, function(req, res) { //... }); ``` Deploy the API for the latest changes: ```shell ./build-deploy api ``` Now we can generate a token by reading the token secret from the Kubernetes secret `api-secrets`: ```shell curl -X POST http://localhost:9080/api/token -H 'Content-Type: application/json' -d '{"username":"debussyman"}' -H "Authorization: Bearer $(kubectl get secret api-secrets -o jsonpath="{.data.TOKEN_SECRET}" | base64 --decode)" ``` And use that token for an authenticated request: ```shell curl -i http://localhost:9080/api/users -H "Authorization: Bearer [ADD TOKEN HERE]" # HTTP/1.1 200 OK # Content-Length: 20044 # Content-Type: application/json; charset=utf-8 # Date: Wed, 23 Aug 2023 15:47:59 GMT # Etag: W/"4e4c-iChHJ1SEQjA0Es1Jbd0WBH9mWLU" # X-Powered-By: Express # [{"id":0,"credit_card":"342044649251781","currency":"USD","email":"selena_autem@hotmail.com","is_active":true,"country":"NO","num_logins":71,"password_hash":"199ca118cd1528f44faac4a013a92355","username":"arnulfo_consectetur","created_at":"2002-11-23T22:22:10.441Z"}, ... ``` #### Adding authorization Now that we have basic authentication in place, the next step is to add authorization. This will allow us to issue tokens that can only access some of the endpoints in our API. First we'll add a list of permissions to the JWT that we generate. Let's update our token - ```diff // src/api/routes/index.js router.post('/token', (req, res) => { - const claims = { sub: req.body.username }; + let permissions = [] + try { + permissions = JSON.parse(req.body.permissions); + } catch {} + const claims = { + sub: req.body.username, + "https://ftdc.jumpwire.io/permissions": permissions + }; const token = jwt.sign(claims, tokenSecret, { expiresIn: '1800s' }); res.json({ token }); }); module.exports = router; ``` Next we'll add an authorization middleware function to `auth.js`. We wrap the middleware function with a parameter, allowing us to specify a permission that must be included in the JWT's user data - ```diff // src/api/auth.js const jwt = require('jsonwebtoken'); const logger = require('./logger'); const tokenSecret = require("config").get("token_secret"); const headerRegex = /^Bearer (.+)$/i; const authenticate = (req, res, next) => { //... }; const authenticateRoot = (req, res, next) => { //... }; +const authorize = (permission) => { + return (req, res, next) => { + const user = req.user; + + if (user && user["https://ftdc.jumpwire.io/permissions"].includes(permission)) { + next(); + } else { + return res.sendStatus(403); + } + }; +}; + module.exports = { authenticate, authenticateRoot, + authorize, }; ``` Now let's update the endpoints that can create or update users to be accessible only to tokens with a `modify:user` permission in [users.js](src/api/routes/users.js) - ```diff // src/api/routes/users.js const express = require('express'); const { models } = require('../database'); -const { authenticate } = require('../auth'); +const { authenticate, authorize } = require('../auth'); const User = models.user; //... /* List all users. */ -router.get("/", authenticate, async (req, res, next) => { +router.get("/", authenticate, authorize("read:user"), async function(req, res, next) { //... /* Get a single user by ID. */ -router.get("/:id", authenticate, async function (req, res, next) { +router.get("/:id", authenticate, authorize("read:user"), async function(req, res, next) { /* Create a new user. */ -router.post('/', authenticate, async function(req, res, next) { +router.post('/', authenticate, authorize("modify:user"), async function(req, res, next) { //... /* Update an existing user by ID. */ -router.put('/:id', authenticate, async function(req, res, next) { +router.put('/:id', authenticate, authorize("modify:user"), async function(req, res, next) { //... /* Delete an existing user by ID. */ -router.delete('/:id', authenticate, async function(req, res, next) { +router.delete('/:id', authenticate, authorize("modify:user"), async function(req, res, next) { ``` Deploy the API to pick up our changes: ``` shell ./build-deploy api ``` Let's first create a token without any permissions: ```shell curl -i -X POST http://localhost:9080/api/token -H 'Content-Type: application/json' -d '{"username":"myfaveusername","permissions":"[]"}' -H "Authorization: Bearer $(kubectl get secret api-secrets -o jsonpath="{.data.TOKEN_SECRET}" | base64 --decode)" ``` Then use that token to call an endpoint. We should get a `403 Forbidden` response ```shell curl -i http://localhost:9080/api/users -H "Authorization: Bearer [ADD TOKEN HERE]" # HTTP/1.1 403 Forbidden # X-Powered-By: Express # Content-Type: text/plain; charset=utf-8 # Content-Length: 9 # ETag: W/"9-PatfYBLj4Um1qTm5zrukoLhNyPU" # Date: Mon, 21 Aug 2023 20:56:00 GMT # # Forbidden ``` That looks golden! Let's generate a token with permissions: ```shell curl -X POST http://localhost:9080/api/token -H 'Content-Type: application/json' -d '{"username":"myfaveusername","permissions":"[\"read:user\",\"modify:user\"]"}' -H "Authorization: Bearer $(kubectl get secret api-secrets -o jsonpath="{.data.TOKEN_SECRET}" | base64 --decode)" ``` Which can be used for requests to our API: ```shell curl -i localhost:9080/api/users -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZWJ1c3N5bWFuIiwiaHR0cHM6Ly9mdGRjLmp1bXB3aXJlLmlvL3Blcm1pc3Npb25zIjpbInJlYWQ6dXNlciIsIm1vZGl0eTp1c2VyIl0sImlhdCI6MTY5MjU3NjI2OSwiZXhwIjoxNjkyNTc4MDY5fQ.-hnjCcQh0rFWkALT2kEaVCD2Mm2bk_Lu2eK0P9jjyp4" ``` The last step is to give our background job a token so that it can call our API! (If you run `kubectl get pods`, you might notice that the reconciler pod is crashing). Let's create another Kubernetes secret with a valid JWT for the reconciler app to use: ```shell APP_TOKEN=$(curl -X POST http://localhost:9080/api/token -H 'Content-Type: application/json' -d '{"username":"debussyman","permissions":"[\"read:user\",\"modify:user\"]"}' -H "Authorization: Bearer $(kubectl get secret api-secrets -o jsonpath="{.data.TOKEN_SECRET}" | base64 --decode)" | jq -r '.token') kubectl create secret generic reconciler-secrets \ --from-literal=APP_TOKEN=$APP_TOKEN ``` Then we'll update our reconciler code to add the token as a HTTP header in [main.rs](src/reconciler/src/main.rs): ``` diff // src/reconciler/src/main.rs use anyhow::{Error, Result}; use config::Config; use itertools::Itertools; use reqwest::blocking::{Client, ClientBuilder}; +use reqwest::header; use serde::Deserialize; use std::collections::HashMap; ... -fn build_client() -> Result<Client> { - let client = ClientBuilder::new().build()?; +fn build_client(token: &String) -> Result<Client> { + let mut headers = header::HeaderMap::new(); + + let value = format!("Bearer {}", token); + let mut header_value = header::HeaderValue::from_bytes(value.as_bytes())?; + header_value.set_sensitive(true); + headers.insert(header::AUTHORIZATION, header_value); + + let client = ClientBuilder::new().default_headers(headers).build()?; Ok(client) } -fn get_user_ids(base_url: &Url) -> Result<Vec<String>> { +fn get_user_ids(base_url: &Url, token: &String) -> Result<Vec<String>> { let mut url = base_url.clone(); url.set_path("/users"); url.set_query(Some("fields=id")); - let body: Response = build_client()?.get(url).send()?.json()?; + let body: Response = build_client(token)?.get(url).send()?.json()?; match body { Response::IdList(id_list) => { @@ -74,10 +82,10 @@ fn get_user_ids(base_url: &Url) -> Result<Vec<String>> { } } -fn get_transaction_amounts(base_url: &Url) -> Result<Vec<Account>> { +fn get_transaction_amounts(base_url: &Url, token: &String) -> Result<Vec<Account>> { let mut url = base_url.clone(); url.set_path("/transactions"); - let body: Response = build_client()?.get(url).send()?.json()?; + let body: Response = build_client(token)?.get(url).send()?.json()?; // ... fn main() -> Result<()> { let config_file = std::env::var("APP_CONFIG_FILE").unwrap_or("settings.json".into()); let config: HashMap<String, String> = Config::builder() .add_source(config::File::with_name(&config_file)) .add_source(config::Environment::with_prefix("APP")) .build()? .try_deserialize()?; println!("settings: {:?}", config); let api_url = config.get("api_url").unwrap(); let base_url = Url::parse(api_url).unwrap(); + let token = config.get("token").unwrap(); - let ids = get_user_ids(&base_url)?; - let accounts = get_transaction_amounts(&base_url)?; + let ids = get_user_ids(&base_url, &token)?; + let accounts = get_transaction_amounts(&base_url, &token)?; reconcile_accounts(ids, accounts); Ok(()) } ``` And load the secret as an environment variable in the chart for the background job [reconciler.yaml](kubernetes/reconciler.yaml): ```diff // kubernetes/reconciler.yaml apiVersion: batch/v1 kind: CronJob metadata: name: reconciler labels: app: reconciler spec: schedule: "*/1 * * * *" concurrencyPolicy: Forbid successfulJobsHistoryLimit: 5 failedJobsHistoryLimit: 10 startingDeadlineSeconds: 10 jobTemplate: spec: template: metadata: labels: app: reconciler spec: containers: - name: reconciler image: ghcr.io/jumpwire-ai/fintech-devcon-reconciler:latest imagePullPolicy: IfNotPresent env: - name: APP_API_URL value: http://api + envFrom: + - secretRef: + name: reconciler-secrets restartPolicy: OnFailure ``` Let's redeploy the reconciler app, and it should recover from crash looping: ```shell ./build-deploy reconciler ``` <details> <summary>Go deeper</summary> Historically, "network segmentation", or separating applications by connectivity via a network, has been considered a practical security technique. For example, a company intranet may allow applications to freely connect to other applications on the same intranet. Like a locked front door of a house, a security team must only ensure that authorized applications or devices connect to this network. That will ensure that malicious actors don't steal data, as they won't be allowed inside. However this approach has been proven to be ineffective in modern environments, as the number and diversity of applications has grown significantly. Just this year, in 2023, we have seen a hack related to a file transfer utility called MOVEIt [leak data](https://en.wikipedia.org/wiki/2023_MOVEit_data_breach) from thousands of organizations. While you may think that your backend environment is straightforward or well protected today, this won't be the case as your company or product scales. Retrofitting hundreds of microservices with inter-service authentication would be a huge undertaking down the road. </details> ### A02:2021 Cryptographic Failures Encryption was invented thousands of years ago to protect information from falling into the wrong hands. It's still pretty useful for this today, as information speeds around the Internet near the speed of light. >Shifting up one position to #2, previously known as Sensitive Data Exposure, which is more of a broad symptom rather than a root cause, the focus is on failures related to cryptography (or lack thereof). Which often lead to exposure of sensitive data. #### Introducing TLS connection encryption For issuing certificates, we'll be setting up [cert-manager](https://cert-manager.io/). This sits in our cluster and issues certificates based on metadata for running services. In a production environment, you would have cert-manager use something like HashiCorp Vault or LetsEncrypt to get valid short-lived certificates, but for this workshop we'll configure it to act as its own certificate authority. ``` shell # setup cert-manager kubectl apply -f kubernetes/cert-manager.yaml # check that the pods are ready kubectl get pods --namespace cert-manager # NAME READY STATUS RESTARTS AGE # cert-manager-cainjector-f57bf6b76-d4rqh 1/1 Running 0 2m29s # cert-manager-6c54667669-g2p7r 1/1 Running 0 2m29s # cert-manager-webhook-79cbc7f748-f66tp 1/1 Running 0 2m29s ``` The first thing you'll need to configure after you've installed cert-manager is an Issuer or a ClusterIssuer. These are resources that represent certificate authorities (CAs) able to sign certificates in response to certificate signing requests. [Install mkcert](https://github.com/FiloSottile/mkcert#installation) if you haven't already. We'll use this to generate a new CA and bootstrap the TLS chain of trust. The CA will be imported into your system trust store and can be removed later with `mkcert -uninstall`. ``` shell mkcert -install # Sudo password: # The local CA is now installed in the system trust store! ⚡️ ``` `mkcert -CAROOT` will print out the location of the CA files. These will remain even if you uninstall the CA from your system store. We then import this CA into Kubernetes for cert-manager to use: ``` shell # inject the CA key and cert as a secret kubectl -n cert-manager create secret generic ca-key-pair \ --from-file=tls.crt="$(mkcert -CAROOT)/rootCA.pem" \ --from-file=tls.key="$(mkcert -CAROOT)/rootCA-key.pem" # secret/ca-key-pair created # also add the CA cert as a secrets for use by any pods kubectl create secret generic ca-cert --from-file=ca.crt="$(mkcert -CAROOT)/rootCA.pem" # secret/ca-cert created # create a ClusterIssuer to use the secret kubectl apply -f kubernetes/ca-clusterissuer.yaml # clusterissuer.cert-manager.io/ca-issuer created # verify the ClusterIssuer kubectl get clusterissuer # NAME READY AGE # ca-issuer True 60s ``` Now we can issue certificates for our services. This will cause cert-manager to issue certificates and store them in Secrets in Kubernetes. Each service will have its own certificate, issued by the same CA. Let's get one for the API gateway: ``` shell kubectl apply -f kubernetes/ingress-certificate.yaml # certificate.cert-manager.io/ingress created ``` Add it to our gateway in [api-gateway.yaml](kubernetes/api-gateway.yaml): ```diff // kubernetes/api-gateway.yaml apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: api-ingress namespace: default spec: entryPoints: - - web + - websecure routes: - kind: Rule match: PathPrefix(`/api`) services: - name: api port: 80 middlewares: - name: http-ratelimit - name: strip-api-prefix + tls: + secretName: ingress-tls ``` And apply: ```shell kubectl apply -f kubernetes/api-gateway.yaml ``` Now try an HTTPS request: ``` shell curl -v https://localhost:9443/api/ # * Trying 127.0.0.1:9443... # * Connected to localhost (127.0.0.1) port 9443 (#0) # * ALPN: offers h2 # * ALPN: offers http/1.1 # * CAfile: /etc/ssl/cert.pem # * CApath: none # * [CONN-0-0][CF-SSL] (304) (OUT), TLS handshake, Client hello (1): # * [CONN-0-0][CF-SSL] (304) (IN), TLS handshake, Server hello (2): # * [CONN-0-0][CF-SSL] (304) (IN), TLS handshake, Unknown (8): # * [CONN-0-0][CF-SSL] (304) (IN), TLS handshake, Certificate (11): # * [CONN-0-0][CF-SSL] (304) (IN), TLS handshake, CERT verify (15): # * [CONN-0-0][CF-SSL] (304) (IN), TLS handshake, Finished (20): # * [CONN-0-0][CF-SSL] (304) (OUT), TLS handshake, Finished (20): # * SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 # * ALPN: server accepted h2 # * Server certificate: # * subject: O=fintech-devcon-jumpwire-workshop # * start date: Aug 23 14:58:06 2023 GMT # * expire date: Aug 30 14:58:06 2023 GMT # * subjectAltName: host "localhost" matched cert's "localhost" # * issuer: O=mkcert development CA; OU=hexedpackets@notmyrealcomputer.local (Not William); CN=mkcert hexedpackets@notmyrealcomputer.local (Not William) # * SSL certificate verify ok. # * Using HTTP2, server supports multiplexing # * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 # * h2h3 [:method: GET] # * h2h3 [:path: /api/] # * h2h3 [:scheme: https] # * h2h3 [:authority: localhost:9443] # * h2h3 [user-agent: curl/7.87.0] # * h2h3 [accept: */*] # * Using Stream ID: 1 (easy handle 0x15280a800) # > GET /api/ HTTP/2 # > Host: localhost:9443 # > user-agent: curl/7.87.0 # > accept: */* # > # * Connection state changed (MAX_CONCURRENT_STREAMS == 250)! # < HTTP/2 404 # < content-type: application/json; charset=utf-8 # < date: Wed, 23 Aug 2023 15:00:04 GMT # < etag: W/"13-ba++C/ABIZmZkDpO1b0jr1uB5S0" # < x-powered-by: Express # < content-length: 19 # < # * Connection #0 to host localhost left intact # {"error":"unknown"} ``` It works! And curl validated the certificate - this is because we set `localhost` as one of the valid domains in the cert, and the CA bundle is installed locally from mkcert. ![or it's magic](https://media.giphy.com/media/12NUbkX6p4xOO4/giphy.gif) You might be thinking that we are all set with encrypting HTTP, but that's not good enough for a security workshop. The HTTP requests within our cluster are still unencrypted! This is happening in both the requests from our gateway to our API backend as well as requests from our reconciler job to our API backend. Let's add HTTP encryption to the API backend. Create another certificate for the Express app to use: ``` shell kubectl apply -f kubernetes/api-certificate.yaml # certificate.cert-manager.io/api created ``` The API service can now mount the certificates in the pod by updating [api.yaml](kubernetes/api.yaml): ```diff // kubernetes/api.yaml app: api spec: ports: - - port: 80 + - port: 443 targetPort: http name: http selector: # ... labels: app: api spec: + volumes: + - name: tls-cert + secret: + secretName: api-tls containers: - name: api image: ghcr.io/jumpwire-ai/fintech-devcon-api:latest imagePullPolicy: IfNotPresent + volumeMounts: + - name: tls-cert + mountPath: /etc/tls + readOnly: true ports: - containerPort: 3000 name: http protocol: TCP env: + - name: TLS_CERT_DIR + value: /etc/tls - name: APP_DB_HOST value: postgres ``` ``` diff // src/api/bin/www var app = require('../app'); var debug = require('debug')('api:server'); -var http = require('http'); +var https = require('https'); +var fs = require('fs'); //... -var server = http.createServer(app); +var certDir = process.env.TLS_CERT_DIR || '/etc/tls'; +var server = https.createServer({ + key: fs.readFileSync(`${certDir}/tls.key`, 'utf8'), + cert: fs.readFileSync(`${certDir}/tls.crt`, 'utf8') +}, app); ``` Deploy the API service with `./build-deploy api`. Requests to the API backend from within our cluster are now broken, none of them are using HTTPS. Let's fix that. First, update the API gateway to use encryption for the backend service in [api-gateway.yaml](kubernetes/api-gateway.yaml): ```diff // kubernetes/api-gateway.yaml # ... spec: stripPrefix: prefixes: - /api +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: ServersTransport +metadata: + name: tls-transport + namespace: default + +spec: + serverName: api + rootCAsSecrets: + - ca-cert --- apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: name: api-ingress namespace: default spec: entryPoints: - websecure routes: - kind: Rule match: PathPrefix(`/api`) services: - name: api - port: 80 + port: 443 + serversTransport: tls-transport middlewares: - name: http-ratelimit - name: strip-api-prefix tls: secretName: ingress-tls ``` Deploy the update and run another curl to make sure it still works: ``` shell kubectl apply -f kubernetes/api-gateway.yaml curl https://localhost:9443/api/ # {"error":"not found"} ``` You may have noticed pods from reconciler are also failing. It is still trying to use HTTP - we need to update it to use HTTPS for its API calls, including validation against the CA. ``` diff // kubernetes/reconciler.yaml imagePullPolicy: IfNotPresent env: - name: APP_API_URL - value: http://api + value: https://api + - name: TLS_CERT_DIR + value: /etc/tls + volumeMounts: + - name: tls-cert + mountPath: /etc/tls + readOnly: true restartPolicy: OnFailure envFrom: - secretRef: name: reconciler-secrets + volumes: + - name: tls-cert + secret: + secretName: ca-cert ``` ``` diff // src/reconciler/src/main.rs use serde::Deserialize; use std::collections::HashMap; +use std::{env, fs::File, io::Read, path::Path}; use url::Url; ... fn build_client(token: &String) -> Result<Client> { ... - let client = ClientBuilder::new().default_headers(headers).build()?; + let cert_dir = env::var("TLS_CERT_DIR")?; + let cert_path = Path::new(&cert_dir).join("ca.crt"); + let mut buf = Vec::new(); + File::open(cert_path)?.read_to_end(&mut buf)?; + let cert = reqwest::Certificate::from_pem(&buf)?; + let client = ClientBuilder::new() + .default_headers(headers) + .tls_built_in_root_certs(false) + .add_root_certificate(cert) + .build()?; Ok(client) } ``` Once again, build and deploy the service: ``` shell ./build-deploy reconciler ``` The next time that the reconciler cron runs, it will connect to the API using HTTPS and will only trust certificates issued by our CA. #### Introducing database connection encryption In addition to encrypting HTTP requests, we need to encrypt requests being made to our database. While it's not on by default, all modern databases support SSL to encrypt their connections. For PostgreSQL, let's update our [chart](kubernetes/postgres.yaml) to add a certificate used for encryption and tell cert-manager to issue it: ``` diff // kubernetes/postgres.yaml labels: app: postgres spec: + volumes: + - name: tls-cert + secret: + secretName: postgres-tls containers: - name: postgres image: ghcr.io/jumpwire-ai/fintech-devcon-postgres:latest .... volumeMounts: - name: data mountPath: /var/lib/postgresql/data + - name: tls-cert + mountPath: /etc/tls + readOnly: true env: - name: POSTGRES_USER value: postgres - name: POSTGRES_PASSWORD value: postgres + - name: TLS_CERT_DIR + value: /etc/tls volumeClaimTemplates: - metadata: name: data ``` <details> <summary>Note on PostgreSQL in Docker</summary> The PostgreSQL Docker image is very particular about permissions and ownership of SSL certs. This can be hard to work with in Kubernetes, which will mount in the files from the secret owned by "root". To workaround this our postgres image has a custom entrypoint script that copies the certs out and chowns them before calling the main entrypoint. You can see the nitty gritty details in [data/entrypoint.sh](data/entrypoint.sh). </details> ``` shell kubectl apply -f kubernetes/postgres-certificate.yaml # certificate.cert-manager.io/postgres created kubectl apply -f kubernetes/postgres.yaml # service/postgres unchanged # statefulset.apps/postgres configured ``` If you have psql installed, you can try port forwarding to the PostgreSQL server and verifying that SSL works: ``` shell # in one shell kubectl port-forward svc/postgres 5432:5432 # Forwarding from 127.0.0.1:5432 -> 5432 # Forwarding from [::1]:5432 -> 5432 # then in another shell psql "postgresql://postgres:postgres@localhost:5432/bank?sslmode=verify-full&sslrootcert=$(mkcert -CAROOT)/rootCA.pem" # psql (15.3, server 15.3) # SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off) # Type "help" for help. # # bank=# ``` Now that PostgreSQL is setup with a TLS certificate, we can configure our application to use ssl mode when connecting by updating the database configuration in [default.js](src/api/config/default.js) ```diff // src/api/config/default.js +const fs = require('fs'); + module.exports = { database: { dialect: "postgres", host: "localhost", port: 5432, database: "bank", username: "postgres", - password: "postgres" + password: "postgres", + dialectOptions: { + ssl: { + ca: fs.readFileSync(`${process.env.TLS_CERT_DIR}/ca.crt`).toString() + } + } }, token_secret: "" } ``` Build and apply the changes - `./build-deploy api`. Once that's done, the API server will be connecting to PostgreSQL over TLS, and verifying the certificate with our CA. #### Introducing JumpWire Um, what is JumpWire? Similar to an API gateway that secures HTTP requests, [JumpWire](https://github.com/extragoodlabs/jumpwire) proxies and examines SQL queries made to a database. It provides access controls - authenticating clients who attempt to connect to the database. It also enforces authorization, by rejecting queries that attempt to access data that the client is not allowed to read or modify. There are also features for encrypting sensitive data, joining data across separate databases, and enterprise goodies like auditing who is accessing what data. What sets JumpWire apart from other access tools is its ability to identify different types, or classifications, of data that are commingled in the same database. Some examples of this are customer names and addresses, credit card numbers, passwords or other secrets, email addresses, etc. This enables devs who use JumpWire the ability to create access permissions based on the classification of data being queried, rather than managing permissions for particular tables or columns. There's not a well defined category for this kind of tool yet, but sometimes it's referred to as a "database firewall". Yet as more applications and analytical tools are connected directly to live databases, there is a growing need for security layers that govern requests and responses being processed by the database. Not unlike an API gateway for backend microservices. We'll deploy JumpWire to act as a firewall between our API service and database. First we'll generate secrets for the engine: ``` shell # Create random secrets. We'll use the token later to interact with the API so we'll store it in on disk. mkdir -p ~/.config/jwctl cat /dev/urandom | base64 | head -c 64 > ~/.config/jwctl/.token kubectl create secret generic jumpwire-secrets \ --from-literal=JUMPWIRE_ENCRYPTION_KEY=$(openssl rand -base64 32) \ --from-literal=JUMPWIRE_ROOT_TOKEN=$(cat ~/.config/jwctl/.token) # secret/jumpwire-secrets created ``` Then we can deploy the image to our Kubernetes cluster. This is already configured to generate a TLS certificate from cert-manager and inject it into the pod, just like we did with our other services. ``` shell kubectl apply -f kubernetes/jumpwire.yaml # certificate.cert-manager.io/jumpwire created # service/jumpwire created # configmap/jumpwire-config created # deployment.apps/jumpwire created # wait for the deployment to be ready kubectl rollout status -w deployment/jumpwire # Waiting for deployment "jumpwire" rollout to finish: 0 of 1 updated replicas are available... # deployment "jumpwire" successfully rolled out ``` Take a look at the [configuration](kubernetes/jumpwire.yaml) for JumpWire. It specifies a couple of interesting things to do with our data. We assign labels to some fields in the `users` tables: ``` yaml credit_card: pci email: pii password_hash: secret ``` Then we define rules around those labels. The rules say that `pci` - which corresponds to the `credit_card` field - will be encrypted, and `secrets` - the `password_hash` field - will get dropped from results. There are exceptions for the rules that we can use later, but right now they will always apply. We have a client defined as well, with an id of `ccf334b5-2d5a-45ee-a6dd-c34caf99e4d4`. Clients in JumpWire can be either dynamically authenticated or issued static credentials. For a service account like our API, we'll issue static credentials. ``` shell # start port forwarding for the JumpWire API kubectl port-forward svc/jumpwire 4443:443 # Forwarding from 127.0.0.1:4443 -> 4443 # Forwarding from [::1]:4443 -> 4443 # Use the jwctl to generate credentials. This will use the token we previously # saved to ~/.config/jwctl/.token jwctl -u https://localhost:4443 client token ccf334b5-2d5a-45ee-a6dd-c34caf99e4d4 # [INFO] Token generated: # # username: 0779b97a-c04a-48f9-9483-22e8b0487de4 # password: SFMyNTY.g2gDaAJtAAAAC29yZ19nZW5lcmljbQAAACRjY2YzMzRiNS0yZDVhLTQ1ZWUtYTZkZC1jMzRjYWY5OWU0ZDRuBgBM10gLigFiEswDAA.Zk31CwFi-ClR2ggAY6KJ7rMNvp5aHK7PXndrE8mCaU8 # Save the login info to a new Kubernetes secret - make sure to use the password from your # deployment, copying the one below will not work! kubectl create secret generic api-postgres-login --from-literal=APP_DB_USERNAME=[ADD USERNAME HERE] --from-literal=APP_DB_PASSWORD=[ADD PASSWORD HERE] # secret/api-postgres-login created ``` Now that the credentials are in a Secret, we'll update our API deployment to use them and connect through JumpWire to the database. ``` diff // kubernetes/api.yaml env: - name: TLS_CERT_DIR value: /etc/tls - name: APP_DB_HOST - value: postgres + value: jumpwire - - name: APP_DB_USERNAME - value: postgres - - name: APP_DB_PASSWORD - value: postgres envFrom: - secretRef: name: api-secrets + - secretRef: + name: api-postgres-login ``` Run `./build-deploy api` to deploy the update. Now when you query the API service, the results will look different. The credit_card field will be encrypted and the password_hash field will have a null value for every user. ``` shell # generate a token for the API service API_TOKEN=$(curl -X POST https://localhost:9443/api/token -H 'Content-Type: application/json' -d '{"username":"debussyman","permissions":"[\"read:user\",\"modify:user\"]"}' -H "Authorization: Bearer $(kubectl get secret api-secrets -o jsonpath="{.data.TOKEN_SECRET}" | base64 --decode)" | jq -r '.token') # curl the API curl -H "Authorization: Bearer $API_TOKEN" https://localhost:9443/api/users | jq '.[:2]' # [ # { # "id": 0, # "credit_card": "jumpwire_AQNwY2kBK0FFUy5HQ00uVjEuNzM0QzEzRTIwN0Y0NkU5NzE2N0U2ODFEQUM1MzA0QTHcmliKjSZ0EYz0MNgt9aGaVcNrsUDdBzRa/fs7SBQYEdDa2CIXEBSqg+k6", # "currency": "USD", # "email": "selena_autem@hotmail.com", # "is_active": true, # "country": "NO", # "num_logins": 71, # "password_hash": null, # "username": "arnulfo_consectetur", # "created_at": "2002-11-23T22:22:10.441Z" # }, # { # "id": 1, # "credit_card": "jumpwire_AQNwY2kBK0FFUy5HQ00uVjEuNzM0QzEzRTIwN0Y0NkU5NzE2N0U2ODFEQUM1MzA0QTEHosM0BkbnHKssxskm+ssCRzNesWAplC7chfSF6GnU8FLI1Jc+AulmR9w7", # "currency": "USD", # "email": "earnestine_ipsam@hotmail.com", # "is_active": true, # "country": "AR", # "num_logins": 33, # "password_hash": null, # "username": "carson_et", # "created_at": "2010-06-02T22:10:45.724Z" # } # ] ``` <details> <summary>Go deeper</summary> It used to be standard to "terminate TLS encryption", or decrypt, HTTP requests at a point when they entered the backend. For example, it was common for a gateway or load balancer to decrypt an HTTP request before sending it to one of the backend clusters. Or when making inter-service requests between microservices, they would only be configured to use unencrypted HTTP. Now that attackers are becoming adept at getting access to internal systems, unencrypted requests can be exploited to steal data. This isn't used just for malicious purposes, the NSA famously exploited this to spy on many companies, including [mighty Google](https://en.wikipedia.org/wiki/Tailored_Access_Operations#QUANTUM_attacks) A common mantra for good security (that is way overused now) is "encrypted in transit and at rest". Using encryption in more places across the stack is both practical, the computational overhead of encryption is less of an impact, and increasingly necessary. </details> ### A05:2021 Security Misconfiguration >Moving up from #6 in the previous edition, 90% of applications were tested for some form of misconfiguration, with an average incidence rate of 4%, and over 208k occurrences of a Common Weakness Enumeration (CWE) in this risk category. With more shifts into highly configurable software, it's not surprising to see this category move up. 208,000 web servers with vulnerabilities is a lot! However that's not surprising, many vulnerabilities are discovered years after a particular version of software has been released. Unless you are paying very close attention, it's not impossible that one of your microservices has a weakness. Let's harden our web server by changing the default configuration and adding additional HTTP response headers. Web servers share information about themselves, which can be used to exploit zero-day vulnerabilties that may be discovered. For example, our API server adds a response header `X-Powered-By: Express` ```shell curl -vv https://localhost:9443/api # * Trying 127.0.0.1:9443... # * Connected to localhost (127.0.0.1) port 9443 (#0) # > GET / HTTP/2 # > host: localhost:3000 # > user-agent: curl/7.81.0 # > accept: */* # > # * Mark bundle as not supporting multiuse # < HTTP/2 200 OK # < x-powered-by: Express ``` This can be easily disabled, add the following configuration to [src/api/app.js](src/api/app.js): ```diff // src/api/app.js // ... const app = express(); app.use(logger('dev')); app.use(express.json()); app.use(express.urlencoded({ extended: false })); app.set('query parser', 'simple'); app.use(cookieParser()); +app.disable('x-powered-by'); ``` We can do better. There are lots of headers related to security, such as directing browsers to use HTTPS or restricting other sites from loading your resources. While many of these settings are used by browsers, they are sensible defaults to set on any web server. Libraries make it easy to configure these settings, and Express has one called `helmet`. Let's update the dependencies in [src/api/package.json](src/api/package.json): ```diff { // ... "dependencies": { "config": "^3.3.9", "cookie-parser": "~1.4.4", "debug": "~2.6.9", "express": "~4.16.1", + "helmet": "~7.0.0", "pg": "^8.11.1", "pino": "^8.15.0", "pino-http": "^8.4.0", "sequelize": "^6.32.1" } } ``` And update our app to use the library: ```diff // src/api/app.js // ... const app = express(); app.use(logger('dev')); app.use(express.json()); app.use(express.urlencoded({ extended: false })); app.set('query parser', 'simple'); app.use(cookieParser()); -app.disable('x-powered-by'); +app.use(helmet()); ``` If cookies were being used by our web application, we would also want to use a library such as [cookie-session](https://github.com/expressjs/cookie-session) to configure them to use HTTPs and only be readable via HTTP and not javascript. One thing that trips up devs is the `Content-Security-Policy` header. Trying to read one is tricky, it's a long list of keywords and urls. But this is a powerful header, as you can very granularly define where content on the page can be loaded from, which offers protection against all kinds of malicious attacks that try to hijack your visitors. Just keep in mind the header follows the following format: ``` [content type] 'self' [list of valid hosts for content type]; [repeat] ``` This is a [handy resource](https://content-security-policy.com/) listing content types and examples. <details> <summary>Go deeper</summary> One overlooked aspect of how attackers operate is "filtering". This is when attackers will narrow a list of targets by ones they believe will be easier to exploit. They try to do this with little effort, with automated scans, looking for known vulnerabilities that have not been patched. By default, web servers send information about their technology and version. If a server version is known to be vulnerable, it makes for an easy target. Additionally, absence of security headers in an HTTP response can indicate that a server has not been hardened. </details> ### A09:2021 Security Logging and Monitoring Failures An important tool for security is being able to observe how our systems are operating, and correlating events that may indicate attempts at malicious activity. >Security logging and monitoring came from the Top 10 community survey (#3), up slightly from the tenth position in the OWASP Top 10 2017. Logging and monitoring can be challenging to test, often involving interviews or asking if attacks were detected during a penetration test. Logging, and observability in general, is a deep topic with many approaches, tools, and vendors. In a security context, one aspect that's critical is aggregating access events into a single location. Even just starting with manual reviews gives a decent foundation that can be built on over time. We'll use the EFK stack to aggregate our logs: - Elasticsearch stores, indexes, and searches logs - Fluentd watches for new logs and events and sends them to Elasticsearch - Kibana visualizes our searches and can help us monitor activity in the cluster that may correspond to security incidents In our setup, fluentd will run on every Kubernetes node and tail the logs of every pod. It will attach metadata to the log context (IP address, pod name, etc) before forewarding them. This mostly works out of the box - the full setup is in [kubernetes/efk-manifests.yaml](kubernetes/efk-manifests.yaml). ``` shell # everything will be created under a new namespace, `logging` kubectl apply -f kubernetes/efk-manifests.yaml # namespace/logging created # service/elasticsearch created # statefulset.apps/elasticsearch created # service/kibana created # configmap/kibana created # deployment.apps/kibana created # serviceaccount/fluentd created # clusterrole.rbac.authorization.k8s.io/fluentd created # clusterrolebinding.rbac.authorization.k8s.io/fluentd created # daemonset.apps/fluentd created kubectl -n logging port-forward service/kibana 5601:5601 # Forwarding from 127.0.0.1:5601 -> 5601 # Forwarding from [::1]:5601 -> 5601 ``` Kibana is now accessible at [http://localhost:5601](http://localhost:5601). When you connect in your browser, Kibana will prompt you to "Create data view". ![](images/kibana-init.png) Click that button and enter a pattern to view our indexes in Elasticsearch. Set the Name to `logs` and the `Index pattern` to `logstash-*`. This will match the daily rotated logs indexes coming in from fluentd. ![](images/kibana-index.png) Click `Save data view to Kibana` and you'll be redirected to the logs view you created. All of our logs for Kubernetes is available and can be filtered by labels. Let's take a look at an API log event - set the search bar to `kubernetes.labels.app : api and res.statusCode : 200`. Click the toggle on the left side of an event to view all the details about it (there may be more than one page in the details panel). ![](images/kibana-details.png) Whoops! Our logs include all of the HTTP request headers - including the JWT! There are two approaches we can take to solve this. Either make the logs very minimal and explicitly set context we care about, or block specific pieces of context from being included. There are pros and cons for each; for HTTP headers we (usually) know what keys are sensitive, so taking the latter approach makes sense. Many logging frameworks support some form of redaction or filtering, and the library we're using [does as well](https://getpino.io/#/docs/redaction). We'll update the config to redact any authorization request headers: ``` diff // src/api/app.js const app = express(); -app.use(loggerMiddleware({ logger })); +app.use(loggerMiddleware({ + logger, + redact: ['req.headers.authorization'], +})); ``` Deploy that and make a new request, or wait for the CronJob to fire. Kibana will now have the value `[REDACTED]` instead of the bearer token. ![](images/kibana-redacted.png) The logs can be really useful but they are a bit noisy right now. Let's narrow it down to just security related events. Clear the search bar first for a clean start, then, hit the plus icon in the top left to add a filter. Choose `module` for the field name with an operator of `is` and a value of `auth`. Click "Add filter" - now the dashboard only shows events coming from our auth.js module! It's still a bit noisy, so let's choose which fields to show. For each field in the left, you can click the plus button to add it as an event column. Do this for `msg`, `kubernetes.labels.app`, `kubernetes.pod_name`, and `user` - now our dashboard is ready to go. ![](images/kibana-filtered.png) <details> <summary>Go deeper</summary> There are a lot more interesting events you can define to turn this basic dashboard into a security machine. A good starting place is the Kubernetes [audit log](https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/). This is ingested by fluentd already and gives you insight into what users or services are doing on the Kubernetes control plane. Kibana can also define rules for generating alerts. This is a great way to bootstrap a basic SIEM - it won't have all of the power of a dedicated SIEM, but it's a fairly simple way to get something usable quickly. For more info, check out [Kibana's documentation](https://www.elastic.co/guide/en/kibana/current/alerting-getting-started.html). </details>
A simple microservice application used in a workshop on security at fintech_devcon 2023
api,background-jobs,javascript,k3s,kubernetes,microservice,rust,security,security-hardening
2023-07-12T19:59:12Z
2023-09-05T20:24:55Z
null
2
0
121
0
0
6
null
MIT
JavaScript
Mohcen2311/car-showcase-app-recreation
main
## Details This project is part of [jsmastery course](https://www.youtube.com/watch?v=pUNSHPyVryU) on Next and Typescript. Follow him for more of such content on **Webdev**. ## API the API throughout this project is [RapidAPI cars](https://rapidapi.com/apininjas/api/cars-by-api-ninjas), it provides a rich dataset of cars with many useful features that can be exploited for a lot of use cases! # Authentication I have added the authentication part to the original website. Although I have not exploited it, it can be developed to allow users to add their preferred cars or even their own cars to the website. To ease up development and learn more about **Next-Auth**, I have used **Google Auth API** to handle authentication. ## What I have learned: This mini-project allowed me to learn and boost my skills in the follwing: - Next - Typescript - Tailwind CSS - Google Auth API ## Getting Started First, run the development server: ```bash npm run dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. **N.B:** Make sure to create your own *.env* file and fill it with your own credentials.
This is a web app built using Next, Typescript and Mongo DB. It consists of a car showcase website with the ability of searching and filtering cars based on fuel, gas, year and other cool features. It exploits RapidCar API to populate the website with all those cool cars !
googleauth,javascript,nextjs,tailwindcss,typescript
2023-07-05T18:16:27Z
2023-07-05T19:12:58Z
null
1
0
4
0
0
6
null
null
TypeScript
pedrop-dev/chess-game
master
# Chess Game This is an online chess game project built with JavaScript, React, Sass, Python, and Flask. This project allows users to play chess against AI-powered bots or challenge other players online. It features a sleek dark mode UI, user authentication with login and registration, and even includes a game analysis feature to review and learn from your matches. ![Captura de tela 2023-10-15 194702](https://github.com/pedrop-dev/chess-game/assets/92335472/c5ee4f16-2df0-49ca-933a-2d8957f5bfab) ## Features + **Dark Mode:** Enjoy a visually pleasing and comfortable gaming experience with the dark mode feature, reducing eye strain during long gameplay sessions. + **Login and Register:** Securely create an account or log in using the authentication system, allowing you to keep track of your progress and engage with other players online. + **Play Against Bot:** Sharpen your skills by playing against AI-powered bots of varying difficulty levels. Test your strategies and improve your gameplay. + **Online Multiplayer:** Challenge your friends or players from around the world to intense chess matches. Show off your strategic prowess and climb the global leaderboard. + **Game Analysis:** After each match, review the game analysis feature to see a detailed breakdown of your moves and the AI's moves. Learn from your mistakes and discover new strategies. ## Technologies Used + **Frontend:** The frontend is developed using JavaScript and React. The user interface is designed with Sass to create a modern and responsive layout. + **Backend:** The backend is powered by Python and Flask. It handles user authentication, game logic, and communication between players during online matches. ## Installation and Setup **Clone the repository:** ``` git clone https://github.com/pedrop-dev/chess-game.git ``` **Navigate to the project directory:** ``` cd chess-game ``` **Install frontend dependencies:** ``` npm install ``` **Install backend dependencies:** ``` cd api pipenv install pipenv shell ``` **Configure frontend server** Write a .env file in the root of the project ``` VITE_API_BASE_URL=http://localhost:5000 ``` **Run the frontend development server:** ``` npm run dev ``` **Configure Backend Server** Write a .env file with the following content in the api directory ``` FRONTEND_DOMAIN=http://localhost:5173 FLASK_SECRET_KEY=super-secret-key MAIL_USERNAME=email-with-app-password-configured@example.com MAIL_PASSWORD=16-digit-app-password ``` **Run the backend server:** ``` pipenv shell python app.py ``` Access the application in your browser at http://localhost:5173. ## Contributing Contributions are welcome! Whether you're an experienced developer or just starting, you can help make this project even better. Fork the repository, create a new branch, and submit your pull requests. ## License This project is licensed under the MIT License. Ready to elevate your chess game? Dive into this engaging gameplay, challenge opponents online, and improve your strategy with the game analysis feature. Start playing today and become a chess master! For any inquiries, contact us at heitorrdpp@gmail.com or pedroh.ps0102@gmail.com. ## Colaborators [Pedro Henrique](https://www.linkedin.com/in/pedroh-ps/) <br> [Heitor Prado](https://www.linkedin.com/in/heitor-prado-99767227b/)
Chess game multiplayer / bot
chess,flask,javascript,python,react,sass
2023-07-13T22:24:09Z
2024-02-20T18:26:38Z
null
2
0
86
0
2
6
null
MIT
JavaScript
VladimirAlbrekht/Timer
main
# Timer Таймер обратного отсчета(Дни/часы/минуты/секунды). [Посмотреть можно здесь](https://codepen.io/VladimirAlbrekht/pen/ZEVeXam) ## Цель: Создать собственный таймер обратного отсчета, который в дальнейшем может быть использован в новых проектах. ## Использованныe технологии: * HTML * CSS * JS ## При использовании данного кода не забудьте: * Изменить дату окончания вашей акции в переменной 'endDate' * Изменить стили для соответсвия вашему дизайну * Если вы используете собственные классы. То не забудьте заменить их в файле 'index.js' ![Скриншот таймера](./images/timer.png)
Создан таймер обратного отсчета (Дни/часы/минуты/секунды)
css,html,javascript,timer
2023-07-20T13:38:03Z
2023-09-10T02:09:25Z
null
1
0
9
0
0
5
null
null
JavaScript
rahuljindal1/node-interview-questions
main
# Node-interview-questions ## Table of Contents ### Event-Emitters | No. | Questions | | --- | ----------------- | | 1 | [What are Event Emitters?](#what-are-event-emitters) | | 2 | [How to pass data with event emitters in Node.js?](#how-to-pass-data-with-event-emitters-in-nodejs) | | 3 | [How to handle errors with event emitters in Node.js?](#how-to-handle-errors-with-event-emitters-in-nodejs) | | 4 | [What is the role of error events in EventEmitter?](#what-is-the-role-of-error-events-in-eventemitter) | | 5 | [How to handle multiple event listeners in Node.js?](#how-to-handle-multiple-event-listeners-in-nodejs) | | 6 | [How to remove event listeners in Node.js?](#how-to-remove-event-listeners-in-nodejs) | | 7 | [What is the difference between `removeListener` and `removeAllListeners` in event emitters?](#what-is-the-difference-between-removelistener-and-removealllisteners-in-event-emitters) | | 8 | [What is the difference between the `on` and `once` methods in event emitters?](#what-is-the-difference-between-the-on-and-once-methods-in-event-emitters) | | 9 | [How can you implement custom event emitters in Node.js?](#how-can-you-implement-custom-event-emitters-in-nodejs) | | 10 | [What are the core features of EventEmitter?](#what-are-the-core-features-of-eventemitter) | | 11 | [Explain the concept of event propagation in event emitters?](#explain-the-concept-of-event-propagation-in-event-emitters) | | 12 | [An example of using EventEmitter in a real-world scenario?](#an-example-of-using-eventemitter-in-a-real-world-scenario) | | 13 | [What kind of applications can we create using the event system?](#what-kind-of-applications-can-we-create-using-the-event-system) | | 14 | [What are memory leaks in event emitters, and how to prevent them?](#what-are-memory-leaks-in-event-emitters-and-how-to-prevent-them) | | 15 | [Explain the difference between EventEmitter and streams in Node.js?](#explain-the-difference-between-eventemitter-and-streams-in-nodejs) | | 16 | [What are the limitations or performance considerations when using EventEmitter?](#what-are-the-limitations-or-performance-considerations-when-using-eventemitter) | | 17 | [What is event batching?](#what-is-event-batching) | | 18 | [What is the maximum number of listeners that can be attached to a single event emitter instance?](#what-is-the-maximum-number-of-listeners-that-can-be-attached-on-a-single-event-emitter-instance) | | 19 | [How event emitters are different from Pub/Sub queues like SQS (Amazon Simple Queue Service)?](#how-event-emitters-are-different-from-pubsub-ques-like-sqs--amazon-simple-queue-service-) | ### Streams | No. | Questions | | --- | --------- | | 1. | [What are streams in Node.js?](#what-are-streams-in-nodejs) | | 2. | [What is the purpose of using streams in Node.js?](#what-is-the-purpose-of-using-streams-in-nodejs) | | 3. | [What are the different types of streams?](#what-are-the-different-types-of-streams) | | 4. | [How do you create a readable stream in Node.js?](#how-do-you-create-a-readable-stream-in-nodejs) | | 5. | [How do you create a writable stream in Node.js?](#how-do-you-create-a-writable-stream-in-nodejs) | | 6. | [How can you pipe data from a readable stream to a writable stream in Node.js?](#how-can-you-pipe-data-from-a-readable-stream-to-a-writable-stream-in-nodejs) | | 7. | [What is the difference between flowing and non-flowing modes in streams?](#what-is-the-difference-between-flowing-and-non-flowing-modes-in-streams) | | 8. | [When to use flowing or non-flowing modes?](#when-to-use-flowing-or-non-flowing-modes) | | 9. | [How do you handle errors in streams?](#how-do-you-handle-errors-in-streams) | | 10. | [How do you transform data using Transform stream?](#how-do-you-transform-data-using-transform-stream) | | 11. | [How do you handle backpressure in Node.js streams?](#how-do-you-handle-backpressure-in-nodejs-streams) | | 12. | [How do you chain multiple streams together?](#how-do-you-chain-multiple-streams-together) | | 13. | [What is the difference between `pipe()` and `pipeline()` method in streams?](#what-is-the-difference-between-pipe-and-pipeline-method-in-streams) | | 14. | [What are the built-in stream modules provided by Node.js?](#what-are-the-built-in-stream-modules-provided-by-nodejs) | | 15. | [How do you handle end-of-stream events in Node.js?](#how-do-you-handle-end-of-stream-events-in-nodejs) | | 16. | [How do you handle large files using streams?](#how-do-you-handle-large-files-using-streams) | | 17. | [How do you consume and produce streams in an HTTP server in Node.js?](#how-do-you-consume-and-produce-streams-in-an-http-server-in-nodejs) | | 18. | [How do you create a duplex stream in Node.js?](#how-do-you-create-a-duplex-stream-in-nodejs) | | 19. | [What are examples of built-in Duplex streams in Node?](#what-are-examples-of-built-in-duplex-streams-in-node) | ### Multi Threading | No. | Questions | | --- | --------- | | 1. | [What is multithreading, and why is it important in Node.js?](#what-is-multithreading-and-why-is-it-important-in-nodejs) | | 2. | [How to calculate the number of threads in Node.js?](#how-to-calculate-the-number-of-threads-in-nodejs) | | 3. | [How does Node.js handle concurrency by default, without multithreading?](#how-does-nodejs-handle-concurrency-by-default-without-multithreading) | | 4. | [Can you explain the difference between multithreading and multiprocessing?](#can-you-explain-the-difference-between-multithreading-and-multiprocessing) | | 5. | [What are the limitations or potential issues when using multithreading in Node.js?](#what-are-the-limitations-or-potential-issues-when-using-multithreading-in-nodejs) | | 6. | [What are the different ways to achieve multithreading in Node.js?](#what-are-the-different-ways-to-achieve-multithreading-in-nodejs) | | 7. | [How can we create and manage worker threads in Node.js?](#how-can-we-create-and-manage-worker-threads-in-nodejs) | | 8. | [How does communication between the main thread and worker threads occur in Node.js?](#how-does-communication-between-the-main-thread-and-worker-threads-occur-in-nodejs) | | 9. | [What are the best practices for using worker thread in Node.js?](#what-are-the-best-practices-for-using-worker-thread-in-nodejs) | | 10. | [Explain how the cluster module works in Node.js and how it relates to multithreading?](#explain-how-the-cluster-module-works-in-nodejs-and-how-it-relates-to-multithreading) | | 11. | [What are the differences between worker threads and the cluster module in Node.js?](#what-are-the-differences-between-worker-threads-and-the-cluster-module-in-nodejs) | | 12. | [What are some real-world use cases where multithreading in Node.js has been beneficial?](#what-are-some-real-world-use-cases-where-multithreading-in-nodejs-has-been-beneficial) | | 13. | [What are the considerations for sharing data between multiple threads in Node.js?](#what-are-the-considerations-for-sharing-data-between-multiple-threads-in-nodejs) | | 14. | [How to implement atomic operations while multithreading in Node.js?](#how-to-implement-atomic-operations-while-multithreading-in-nodejs) | | 15. | [What are the performance implications of using multithreading in Node.js?](#what-are-the-performance-implications-of-using-multithreading-in-nodejs) | ## What are Event Emitters? In Node.js, an event emitter is a core module that allows you to implement the publisher-subscriber pattern. It implements the observer pattern, where objects (event emitters) can emit named events, and other objects (event listeners or subscribers) can listen to those events and react accordingly. ```javascript const EventEmitter = require('events'); // Create an instance of EventEmitter const myEmitter = new EventEmitter(); // Register an event listener myEmitter.on('myEvent', (arg1, arg2) => { console.log('Event occurred with arguments:', arg1, arg2); }); // Emit an event myEmitter.emit('myEvent', 'Hello', 'World'); ``` ## How to pass data with event emitters in Node.js? You can pass data along with event emitters by passing additional arguments to the `emit()` method. Here's an example: ```javascript const EventEmitter = require('events'); const myEmitter = new EventEmitter(); myEmitter.on('myEvent', (data) => { console.log('Received data:', data); }); myEmitter.emit('myEvent', 'Hello, World!'); ``` ## How to handle errors with event emitters in Node.js? You can use an `error` event followed by an Error object as an argument to handle the errors. You can listen to this event and handle any errors that occur. Here's an example: ```javascript const EventEmitter = require('events'); const myEmitter = new EventEmitter(); myEmitter.on('error', (error) => { console.error('An error occurred:', error); }); myEmitter.emit('error', new Error('Something went wrong!')); ``` ## What is the role of error events in EventEmitter? In EventEmitter, error events play a crucial role in handling and propagating errors that occur within event listeners. The role of error events can be summarized as follows: 1. **Error Propagation:** When an unhandled error occurs within an event listener function, the EventEmitter class will emit an 'error' event. This mechanism enables the error to be propagated to the parent emitter or any other error event listeners registered for that emitter. 2. **Default Error Handling:** If no listeners are explicitly registered for the `'error'` event on an EventEmitter instance, Node.js will treat it as an unhandled exception and display the error message and stack trace on the console. This default behavior helps identify and debug errors that are not handled explicitly. 3. **Error Listener Registration:** You can define custom error handling logic by registering an event listener for the `'error'` event on an EventEmitter instance. This listener will be invoked whenever an error event is emitted, allowing you to handle the error gracefully, log it, or perform any necessary cleanup operations. 4. **Preventing Uncaught Exceptions:** Having an error listener for the `'error'` event can prevent unhandled exceptions from crashing the application. By handling the error within the error event listener, you can gracefully recover or terminate the application in a controlled manner. By handling error events appropriately, you can effectively manage and respond to errors that occur within event listeners and prevent unhandled exceptions from crashing your application. ## How to handle multiple event listeners in Node.js? You can attach multiple event listeners to an event using the `on()` or `addListener()` methods. Each listener will be invoked when the event is emitted. Here's an example: ```javascript const EventEmitter = require('events'); const myEmitter = new EventEmitter(); const listener1 = () => { console.log('Listener 1'); }; const listener2 = () => { console.log('Listener 2'); }; const listener3 = () => { console.log('Listener 3'); }; myEmitter.on('myEvent', listener1); myEmitter.on('myEvent', listener2); myEmitter.addListener('myEvent', listener3); myEmitter.emit('myEvent'); ``` ## How to remove event listeners in Node.js? The `removeListener()` method can remove a specific event listener. Here's an example: ```javascript const EventEmitter = require('events'); const myEmitter = new EventEmitter(); const listener = () => { console.log('Event emitted!'); }; myEmitter.on('myEvent', listener); myEmitter.emit('myEvent'); // Event emitted! myEmitter.removeListener('myEvent', listener); myEmitter.emit('myEvent'); // No output ``` ## What is the difference between `removeListener` and `removeAllListeners` in event emitters? The `removeListener(eventName, listener)` method and the `removeAllListeners(eventName)` method in event emitters have different purposes: 1. `removeListener(eventName, listener)`: - This method removes a specific event listener attached to an event. - It takes two arguments: the `eventName` (string) and the `listener` (function) that was previously attached. - When called, it removes the specified `listener` function from the event's listener array. - Only the specific listener provided will be removed if multiple listeners are attached to the event. - Only one occurrence will be removed if the same listener function is attached multiple times. - Nothing happens if no listener function matches the provided listener. 2. `removeAllListeners(eventName)`: - This method removes all event listeners attached to a specific event. - It takes one argument: the `eventName` (string) from which all listeners should be removed. - When called, it removes all listener functions associated with the specified event, effectively clearing all event listeners for that event. - If no event name is provided, it removes all listeners for all events associated with the event emitter instance. - After calling `removeAllListeners()`, the event emitter will no longer emit any events associated with the provided event name. In summary, `removeListener()` removes a specific listener from an event, while `removeAllListeners()` removes all listeners associated with a particular event or all events. ## What is the difference between the `on` and `once` methods in event emitters? The `on(eventName, listener)` and `once(eventName, listener)` methods in event emitters have differences in how they handle event listeners: - `on(eventName, listener)`: - The `on()` method attaches a persistent event listener to an event. - It takes two arguments: the `eventName` (string) and the `listener` (function) to be executed when the event is emitted. - The listener function will be invoked every time the event is emitted. - Even if the event is emitted multiple times, the listener will be called for each occurrence. Example: ```javascript const EventEmitter = require('events'); const myEmitter = new EventEmitter(); const eventListener = () => { console.log('Event emitted!'); }; myEmitter.on('myEvent', eventListener); myEmitter.emit('myEvent'); // Event emitted! myEmitter.emit('myEvent'); // Event emitted! ``` - `once(eventName, listener)`: - The `once()` method attaches a one-time event listener to an event. - It takes two arguments: the `eventName` (string) and the `listener` (function) to be executed when the event is emitted. - The listener function will be invoked only for the first occurrence of the event. - After the listener is invoked, it is automatically removed from the event emitter so that it won't be called again for subsequent occurrences of the event. Example: ```javascript const EventEmitter = require('events'); const myEmitter = new EventEmitter(); const eventListener = () => { console.log('Event emitted!'); }; myEmitter.once('myEvent', eventListener); myEmitter.emit('myEvent'); // Event emitted! myEmitter.emit('myEvent'); // No output ``` To summarize, `on()` attaches a persistent event listener that is called every time the event is emitted, while `once()` attaches a one-time event listener that is automatically removed after the first occurrence of the event. ## How can you implement custom event emitters in Node.js? In Node.js, you can implement custom event emitters by creating a class that extends the built-in EventEmitter class. Here are the steps to implement a custom event emitter: ```javascript const EventEmitter = require('events'); class MyEmitter extends EventEmitter { performTask() { console.log('Performing a task...'); // Emit an event when the task is complete this.emit('taskComplete'); } } // Create an instance of the custom emitter const myEmitter = new MyEmitter(); // Register an event listener myEmitter.on('taskComplete', () => { console.log('Task completed!'); }); // Perform the task myEmitter.performTask(); ``` In this example, the custom `MyEmitter` class extends the `EventEmitter` class. It adds a `performTask` method that emits a `'taskComplete'` event. An event listener is registered using the on method to execute when the `'taskComplete'` event is emitted. When you run this code, it will output the following: ```arduino Performing a task... Task completed! ``` ## What are the core features of EventEmitter? The core features of EventEmitter in Node.js are as follows: 1. **Event Registration:** EventEmitter allows you to register event listeners for specific events using the `on` or `addListener` method. 2. **Event Emission:** You can emit events using the `emit` method. When an event is emitted, all registered listeners are invoked synchronously. 3. **Multiple Listeners:** EventEmitter supports multiple listeners for the same event. You can register various listeners for an event, which will all be executed when the event is emitted. 4. **Event Removal:** EventEmitter provides methods to remove event listeners. The `off` or `removeListener` method allows you to remove a specific listener for an event, while the `removeAllListeners` method removes all listeners for a particular event or all events. 5. **Error Handling:** EventEmitter includes built-in error handling. If an error event is emitted and no listener is registered for that event, Node.js will throw an error and display the stack trace. 6. **Inheritance:** EventEmitter can be extended to create custom event emitters. It lets you define events and behavior specific to your application or module. 7. **Asynchronous Event Handling:** EventEmitter can handle synchronous and asynchronous event listeners. Asynchronous listeners can be registered using the `once` method, which automatically removes the listener after it has been invoked. 8. **Memory Management:** EventEmitter manages memory efficiently by using weak references for event listeners. It means that if there are no other references to a listener, it will be garbage collected. ## Explain the concept of event propagation in event emitters In the context of EventEmitter in Node.js, event propagation refers to propagating events from an emitting object to its parent or containing objects. However, it's important to note that EventEmitter does not have built-in support for event propagation like some other frameworks or libraries. By default, EventEmitter operates within a single object or module, where events are emitted and listened to within that specific context. When an event is emitted, all the registered listeners are invoked in the order they were added. The event propagation is limited to this scope. We can create a custom event emitter that allows event propagation by forwarding events from a child object to its parent object. ```javascript const EventEmitter = require('events'); class ParentEmitter extends EventEmitter { constructor() { super(); this.child = new ChildEmitter(); // Forward the child event to the parent this.child.on('childEvent', (data) => { this.emit('parentEvent', data); }); } } class ChildEmitter extends EventEmitter { doSomething() { // Emitting an event in the child object this.emit('childEvent', 'Hello from child!'); } } // Create an instance of the parent emitter const parentEmitter = new ParentEmitter(); // Register an event listener in the parent parentEmitter.on('parentEvent', (data) => { console.log('Parent event received:', data); }); // Perform an action in the child object, which triggers event forwarding to the parent parentEmitter.child.doSomething(); ``` ```arduino Parent event received: Hello from child! ``` ## An example of using EventEmitter in a real-world scenario? Imagine you're building a chat application where users can send messages to each other. You want to notify all connected clients in real-time whenever a new message arrives. First, you would require the `events` module in Node.js, which provides the EventEmitter class: ```javascript const EventEmitter = require('events'); ``` Next, you can create an instance of the EventEmitter class: ```javascript const chatEmitter = new EventEmitter(); ``` Let's say you have a WebSocket server that handles incoming chat messages. Whenever a new message arrives, you can emit an event using the `chatEmitter` instance: ```javascript // WebSocket server handling incoming chat messages websocketServer.on('message', (message) => { // Process the message and obtain the relevant data (e.g., sender, content) // Emit an event with the message data chatEmitter.emit('newMessage', { sender, content }); }); ``` In another part of your application, you might have code responsible for sending these messages to connected clients: ```javascript // Code that sends messages to connected clients chatEmitter.on('newMessage', (message) => { // Send the message to all connected clients in real-time websocketServer.send(message); }); ``` ## What kind of applications can we create using the event system? Event-based systems are incredibly versatile and can be used to build various applications. Here are a few examples: 1. **Real-time applications:** Event-driven architectures are well-suited for building real-time applications, such as chat applications, collaborative tools, and multiplayer games. The system can emit events when relevant actions occur, and connected clients can receive those events in real time, enabling instant updates and synchronization. 2. **Microservices and distributed systems:** Event-driven architectures are often employed in microservices and distributed systems to enable loose coupling and scalability. Services can communicate with each other by emitting events, allowing for asynchronous and decoupled communication between different components. 3. **IoT (Internet of Things) applications:** Event-driven systems are commonly used in IoT applications, where sensors and devices generate events that trigger actions or notifications. For example, an innovative home system could emit events when a door is opened, a temperature threshold is exceeded, or a motion is detected. 4. **Workflow automation:** Event-based systems can be used to automate workflows and orchestrate the execution of tasks. Each step in the workflow can emit events to signal the completion or status change, allowing subsequent steps to react accordingly. It is often used in business process automation, job scheduling, and task coordination systems. 5. **Logging and monitoring:** Event-driven architectures can be valuable in logging and monitoring applications. Events can be emitted for system events, errors, or performance metrics. Monitoring tools or logging services can then consume these events, providing real-time insights, alerts, or generating reports. 6. **Event sourcing and CQRS:** Event-driven architectures are the foundation of event sourcing and Command Query Responsibility Segregation (CQRS) patterns. Event sourcing captures every state change as an event, which can be used to rebuild the system's state at any given time. CQRS separates the read and write operations, using events to update the read models asynchronously. ## What are memory leaks in event emitters, and how to prevent them? - **Unremoved Event Listeners:** ```javascript const EventEmitter = require('events'); const emitter = new EventEmitter(); function eventListener() { console.log('Event occurred!'); } emitter.on('event', eventListener); // Oops! Forgot to remove the event listener // emitter.removeListener('event', eventListener); // The 'eventListener' function will still be held in memory // even if it's no longer needed, causing a memory leak ``` To prevent a memory leak in this example, call `emitter.removeListener('event', eventListener)` when the listener is no longer required. - **Global EventEmitter Instances:** ```javascript const EventEmitter = require('events'); const globalEmitter = new EventEmitter(); function eventListener() { console.log('Event occurred!'); } globalEmitter.on('event', eventListener); // The globalEmitter instance may be kept alive indefinitely, // preventing associated objects from being garbage collected ``` To prevent a memory leak in this example, avoid using global EventEmitter instances and instead, manage the scope and lifetime of the EventEmitter appropriately. - **Avoiding Multiple Registrations:** ```javascript const EventEmitter = require('events'); const emitter = new EventEmitter(); function eventListener() { console.log('Event occurred!'); } emitter.on('event', eventListener); emitter.on('event', eventListener); // Duplicate registration // The eventListener will be called twice when the 'event' occurs, // which may lead to unexpected behavior and potential memory leaks ``` To prevent duplicate registrations and the associated risks, ensure that event listeners are registered only once: ```javascript emitter.on('event', eventListener); // Before registering the event listener, check if it's already registered if (!emitter.listenerCount('event', eventListener)) { emitter.on('event', eventListener); } ``` - **Cyclic Reference:** ```javascript const EventEmitter = require('events'); class MyObject { constructor() { this.emitter = new EventEmitter(); this.emitter.on('event', this.eventHandler.bind(this)); // Creating a cyclic reference } eventHandler() { console.log('Event occurred!'); // Perform some action with this.emitter or MyObject instance } cleanup() { this.emitter.removeListener('event', this.eventHandler); this.emitter = null; // Break the cyclic reference } } const obj = new MyObject(); // When the MyObject instance is no longer needed, call the cleanup method obj.cleanup(); ``` In this example, the `eventHandler` function is bound to this using bind(this), ensuring it maintains a reference to the `MyObject` instance. However, this also creates a cyclic reference between the `MyObject` and the `EventEmitter` instance. To break the cyclic reference, the `cleanup` method is introduced. It removes the event listener using `removeListener` and sets `this.emitter` to null, allowing the `MyObject` instance and the `EventEmitter` to be garbage collected properly. ## Explain the difference between EventEmitter and streams in Node.js In Node.js, both `EventEmitter` and streams are essential for handling events and data. While they serve similar purposes, there are some key differences between the two: 1. Event Emitter: - The `EventEmitter` class is a core module in Node.js that allows you to handle and propagate events within an application. - It follows the observer pattern, where objects can subscribe to events and be notified when they occur. - Events are emitted using the `emit` method and can be listened to using the `on` or `addListener` methods. - `EventEmitter` is typically used for handling custom events or building event-driven architectures. - It provides flexibility in creating and managing events but does not handle data streaming or buffering. 2. Streams: - Streams are a built-in mechanism in Node.js for efficiently handling large amounts of data in a streaming fashion. - Streams represent a sequence of data that can be read from or written asynchronously, chunk by chunk. - There are several streams, such as Readable, Writable, Duplex, and Transform, each serving a specific purpose. - Streams are often used for tasks like reading from or writing to files, compressing or decompressing data, network communication, and more. - They provide backpressure handling, which allows the stream consumer to control the rate at which data is consumed to prevent overwhelming the system. In summary, `EventEmitter` is primarily used for handling events and notifications within an application, whereas streams are used for processing and manipulating data in a streaming manner. While `EventEmitter` deals with events and their subscribers, streams handle data transfer in a controlled, chunk-by-chunk way, allowing for efficient processing of large datasets. ## How does EventEmitter differ from the callback pattern in Node.js? 1. Callback Pattern: - The callback pattern is a common way of handling asynchronous operations in Node.js, where a function accepts a callback function as an argument. - The callback function is called once the asynchronous operation completes, providing the result or an error. - Callbacks are typically used for one-time notifications or single asynchronous operations. - When using callbacks, a single callback function usually handles the result or error from the asynchronous operation. - Callbacks are often used in scenarios with a single expected response from an asynchronous operation. - Example use cases include file operations, network requests, and database queries. In summary, the EventEmitter handles multiple asynchronous events in an event-driven architecture, allowing multiple listeners to respond independently. On the other hand, the callback pattern is a way to handle a single asynchronous operation by providing a callback function to be executed once the process completes. ## What are the limitations or performance considerations when using EventEmitter? - **Memory Usage:** EventEmitter uses memory to store event listeners and their associated data. If you have many listeners or emit events frequently, it can consume significant memory. It is essential in scenarios involving long-lived emitters or listeners, as they can accumulate memory over time. It's important to properly manage and remove unnecessary listeners to avoid excessive memory usage. ```javascript const EventEmitter = require('events'); // Create an instance of EventEmitter const myEmitter = new EventEmitter(); // Attach a listener that consumes memory myEmitter.on('event', () => { // Some memory-intensive operation const data = Buffer.alloc(1024 * 1024); // Allocating 1MB buffer // ... }); // Emit the 'event' multiple times for (let i = 0; i < 1000; i++) { myEmitter.emit('event'); } ``` In this example, we attach a listener to the 'event' event that allocates a 1MB buffer every time it's triggered. If this event is emitted frequently or if there are multiple events with such memory-intensive listeners, it can lead to excessive memory usage, potentially causing performance issues or even out-of-memory errors. - **Event Loop Blocking:** EventEmitter is synchronous by default, meaning that when an event is emitted, all listeners for that event will be executed synchronously before the control is returned to the emitter. If any of the listeners take a significant amount of time to execute, it can block the event loop and impact the performance of other operations in your application. To mitigate this, ensure that your event listeners are designed to execute quickly and consider using asynchronous patterns within the listeners if necessary. ```javascript const EventEmitter = require('events'); // Create an instance of EventEmitter const myEmitter = new EventEmitter(); // Attach a listener that blocks the event loop myEmitter.on('event', () => { // Long-running operation while (true) { // ... } }); // Emit the 'event' myEmitter.emit('event'); console.log('This line may never be reached!'); ``` In this example, we attach a listener to the 'event' event that runs an infinite loop. When the event is emitted, the loop will block the event loop, preventing the execution of subsequent code. It can lead to poor performance and unresponsive behavior in your application. - **Error Handling:** If an error occurs within an event listener, EventEmitter will throw an exception. If not handled properly, this can crash your application. It's essential to wrap your event listeners in try-catch blocks to address potential errors and prevent them from propagating to the EventEmitter and crashing your application. - **Garbage Collection:** EventEmitter relies on JavaScript's garbage collection to clean up unused event listeners. If listeners are not adequately removed or references to them are not cleared, they can continue consuming memory even if they are no longer needed. It is crucial to remove event listeners when they are no longer required or when the associated objects are no longer in use. ```javascript const EventEmitter = require('events'); // Create an instance of EventEmitter const myEmitter = new EventEmitter(); function setupListener() { myEmitter.on('event', () => { console.log('Event received!'); }); } // Call the setupListener function setupListener(); // Emit the 'event' myEmitter.emit('event'); ``` In this example, we define a listener for the 'event' event inside the setupListener function. When setupListener is called, the listener is attached to the EventEmitter. However, if the listener is no longer needed or the setupListener function is called multiple times, new listeners will be added to the EventEmitter without removing the previous ones. It can lead to memory leaks as the unused listeners are not garbage collected. It's essential to remove event listeners when they are no longer needed. - **Performance Optimization:** If you have performance-critical scenarios, such as emitting many events or having a significant number of listeners, you may need to optimize your code. Techniques like reducing unnecessary event emissions, using event batching or throttling, and optimizing listener execution can improve the overall performance of your application. ## What is event batching? Event batching in event emitters refers to grouping multiple events and emitting them as a batch rather than emitting each event individually. It can provide performance benefits by reducing the overhead of emitting individual events and optimizing event processing. Here's an example to illustrate event batching in event emitters: ```javascript const EventEmitter = require('events'); // Create an instance of EventEmitter const myEmitter = new EventEmitter(); // Batch events and emit them after a certain interval function batchEvents(events) { setTimeout(() => { // Emit the batched events for (const event of events) { myEmitter.emit(event.type, event.data); } }, 1000); // Emit every second } // Generate some events to be batched const eventsToBatch = [ { type: 'event1', data: 'Data for event 1' }, { type: 'event2', data: 'Data for event 2' }, { type: 'event3', data: 'Data for event 3' }, ]; // Batch the events batchEvents(eventsToBatch); ``` In this example, The batchEvents function takes an array of events and emits them as a batch after a fixed interval. By passing the events to be batched, we avoid emitting them individually. Once the interval elapses, the batched events are emitted separately, allowing multiple listeners to respond accordingly. Event batching reduces overhead and optimizes event processing, especially in scenarios with many events or frequent emissions. ## What is the maximum number of listeners that can be attached on a single event emitter instance? In Node.js, the default maximum number of listeners that can be attached on event emitter instance is 10. This number can be modified using the `setMaxListeners` method with the number of listeners you want to modify it with Additionally, you can set the maximum number of listeners to an unlimited value by passing 0 as the argument to `setMaxListeners`, effectively removing the limit on the number of listeners. ## How event emitters are different from Pub/Sub ques like SQS ( Amazon Simple Queue Service )? Event emitters and publish/subscribe (pub/sub) queues, such as Amazon Simple Queue Service (SQS), have some similarities but serve different purposes and have distinct characteristics. Here are the key differences between event emitters and pub/sub queues: 1. **Communication Model**:- Event Emitter follows a rather direct communication model, where there will be an emitter that will emit some message, and that message will be received by some subscribed listeners. While, In Pub/Sub queues, publishers publish messages to a queue or topic, and subscribers receive messages from these queues or topics. 2. **Message Persistence**:- Pub/Sub queues, like SQS, persists message in the queue until they are not consumed by the subscribers or deleted explicitly. Queues allow subscribers to consume messages at their own pace. In contrast, event emitters do not persist messages by default; if there are no active listeners when the message is published, the message will get lost. 3. **Message Ordering**:- Pub/sub queues, such as SQS, often guarantee message ordering within a single queue, while event emitters do not provide inherent ordering guarantees. 4. **Scalability and Decoupling**:- Pub/sub queues like SQS are designed to handle high-throughput scenarios and provide decoupling between publishers and subscribers. Publishers and subscribers can operate independently and at different rates. Although they can be used for asynchronous communication, event emitters are often more tightly coupled since they directly trigger listeners within the same process. 5. **Message Delivery**:- Pub/sub queues, such as SQS, typically support reliable delivery guarantees. Messages are stored durably and can be delivered reliably to subscribers during failures. Event emitters within a single process do not provide built-in mechanisms for reliable message delivery, as they rely on direct function calls and do not persist messages. ## What are streams in Node.js? In Node.js, streams are a crucial concept that allows efficient data flow handling. Streams are objects that facilitate the reading or writing of data sequentially, in small chunks, rather than loading the entire data into memory at once. This approach is beneficial when dealing with large files or network communications. Node.js provides several types of streams, categorized into four main categories: Readable, Writable, Duplex, and Transform streams. ```javascript const fs = require('fs'); // Create a readable stream from a file const readableStream = fs.createReadStream('source.txt'); let data = ''; // Variable to store the accumulated data // Handle the 'data' event to process the data chunks readableStream.on('data', (chunk) => { console.log('Received chunk of data:', chunk); data += chunk; }); // Handle the 'end' event when the stream has finished reading readableStream.on('end', () => { console.log('Finished reading the data.'); console.log('Final data:', data); }); // Handle the 'error' event if any error occurs during reading readableStream.on('error', (err) => { console.error('An error occurred while reading the stream:', err); }); ``` In this example, we create a readable stream using `fs.createReadStream()` to read the contents of a file named 'source.txt'. We then handle three events: 1. **The 'data' event:** This event is emitted when a new chunk of data can be read from the stream. In the event handler, we log the received chunk to the console. 2. **The 'end' event:** This event is emitted when the stream has finished reading all the data. In the event handler, we log a message indicating that the data reading is complete. 3. **The 'error' event:** This event is emitted if any error occurs during the stream reading process. In the event handler, we log the error to the console. ## What is the purpose of using streams in Node.js? 1. **Memory Efficiency:** Streams enable you to process data in smaller chunks instead of loading the whole dataset into memory. You can process it incrementally, making it possible to handle the large dataset which might not fit entirely into the memory. 2. **Performance and Speed:** By processing the data in smaller chunks, the overall speed of the application can be increased. It is because streams allow for asynchronous processing, which means that while one chunk of the data is being processed, the next chunk can be moved into the pipeline. This will minimize the waiting time for the data to be read from sources or written to external sources. 3. **Backpressure and Flow Control:** Streams provide a mechanism for handling backpressure. Backpressure can occur if the reading side of a stream is slower than the writing side. Streams allow you to control the data flow, ensuring that the data is processed optimally and preventing overwhelming the system or causing data loss. 4. **Compatibility and Modularity:** Streams are designed to be composable and modular. This makes it easier to chain or combine them to perform complex data processing tasks involving data transformation, filtering, or manipulation. 5. **File I/O and Network Operations:** Streams are particularly useful when dealing with file I/O operations or network protocols. They allow you to efficiently read or write files, transmit data over network sockets, or process data from various sources such as HTTP requests or databases. ## What are the different types of streams? 1. **Readable Streams:** Readable streams allow you to read data from a source, such as a file or an HTTP request. They emit events like "data" when new data is available and "end" when there is no more data to be read. 2. **Writable Streams:** Writable streams allow you to write data to a destination, such as a file or an HTTP response. You can write data to a writable stream using the `write()` method, and it will be buffered and eventually flushed to the underlying resource. 3. **Duplex Streams:** Duplex streams are both readable and writable. They allow you to both read and write data. For example, a TCP socket ( Database connection ) is a duplex stream because you can send and receive data over the socket. 4. **Transform Streams:** Transform streams are a particular type of duplex stream that can modify or transform the data as it flows through the stream. You can think of them as a combination of readable and writable streams with an intermediate processing step. They are commonly used for data compression, encryption, or parsing tasks. ## How do you create a readable stream in Node.js? In Node.js, you can create a readable stream using the `Readable` class from the built-in `stream` module. Here's an example of how to create a readable stream: ```javascript const { Readable } = require('stream'); // Create a custom readable stream by extending the Readable class class MyReadableStream extends Readable { constructor(data) { super(); this.data = data; } // Implement the _read method to push data to the stream _read() { // Read and push data to the stream const chunk = this.data.pop(); if (chunk) { this.push(chunk); } else { // End the stream when there is no more data this.push(null); } } } // Usage const data = ['Hello', 'World', '!']; const readableStream = new MyReadableStream(data); // Read data from the stream readableStream.on('data', (chunk) => { console.log(chunk.toString()); }); // Handle the end of the stream readableStream.on('end', () => { console.log('End of stream'); }); ``` In this example, we create a custom readable stream `MyReadableStream`, by extending the `Readable` class. The `_read` method is implemented to push data to the stream using the `push` method. When there is no more data, we push `null` to indicate the end of the stream. We then create an instance of `MyReadableStream` with an array of data. The `data` event is emitted whenever there is new data available in the stream, and the `end` event is emitted when there is no more data. You can replace the logic inside `_read` with your own data source, such as reading from a file or making asynchronous calls to retrieve data, depending on your use case. ## How do you create a writable stream in Node.js? ```javascript const { Writable } = require('stream'); // Create a custom writable stream by extending the Writable class class MyWritableStream extends Writable { constructor() { super(); // Initialize any necessary state or variables } // Implement the _write method to handle incoming data _write(chunk, encoding, callback) { // Process the incoming data chunk console.log('Received data:', chunk.toString()); // Call the callback function to signal the completion of processing the chunk callback(); } } // Usage const writableStream = new MyWritableStream(); // Write data to the stream writableStream.write('Hello, '); writableStream.write('World!'); writableStream.end(); // Signal the end of writing // Handle the 'finish' event when all data has been written writableStream.on('finish', () => { console.log('Finished writing data'); }); ``` You can replace the logic inside `_write` with your implementation, such as writing data to a file or sending data to an external service, depending on your use case. The writable stream for writing data in a file can also be created using `fs.createWriteStream` method. ```javascript const fs = require('fs'); const writableStream = fs.createWriteStream('output.txt'); writableStream.write('Hello, '); writableStream.write('World!'); writableStream.end(); // Signal the end of writing writableStream.on('finish', () => { console.log('Data has been written to the file'); }); ``` ## How can you pipe data from a readable stream to a writable stream in Node.js? In Node.js, you can pipe data from a readable stream to a writable stream using the `pipe()` method. The `pipe()` method allows you to easily consume data from a readable stream and write it directly to a writable stream without manually handling the data chunks. Here's an example that demonstrates how to pipe data from a readable stream to a writable stream: ```javascript const fs = require('fs'); // Create a readable stream const readableStream = fs.createReadStream('input.txt'); // Create a writable stream const writableStream = fs.createWriteStream('output.txt'); // Pipe the data from the readable stream to the writable stream readableStream.pipe(writableStream); // Optional: Listen for the 'finish' event to know when the data has been written writableStream.on('finish', () => { console.log('Data has been written to the writable stream.'); }); ``` Note that the `pipe()` method handles error handling and closing the streams, so you don't need to handle those aspects in this simple example explicitly. ## What is the difference between flowing and non-flowing modes in streams? **Flowing Mode:** In flowing mode, data is read from the stream automatically as soon as it's available, and events are emitted accordingly. The data flows through the stream continuously, and you can consume it using event listeners or callbacks. Example: ```javascript const fs = require('fs'); // Create a readable stream const readableStream = fs.createReadStream('file.txt'); // Set the encoding for the readable stream readableStream.setEncoding('utf8'); // Listen to the 'data' event to consume the data readableStream.on('data', (chunk) => { console.log(`Received data: ${chunk}`); }); // Listen to the 'end' event to know when the stream ends readableStream.on('end', () => { console.log('Stream ended'); }); ``` **Non-flowing Mode:** The data is not read automatically in non-flowing mode. Instead, you need to manually request the data from the stream using the `.read()` method. The stream enters a paused state until you explicitly request the data. Example: ```javascript const fs = require('fs'); // Create a readable stream const readableStream = fs.createReadStream('file.txt'); // Set the encoding for the readable stream readableStream.setEncoding('utf8'); // Listen to the 'readable' event to know when data can be read readableStream.on('readable', () => { let chunk; while ((chunk = readableStream.read()) !== null) { console.log(`Received data: ${chunk}`); } }); // Listen to the 'end' event to know when the stream ends readableStream.on('end', () => { console.log('Stream ended'); }); ``` In summary, the main difference between flowing and non-flowing modes in Node.js streams is the automatic data consumption in flowing mode versus the manual data retrieval in non-flowing mode. ## When to use flowing or non-flowing modes? **Flowing Mode:** 1. **Real-time data processing:** Suitable for applications requiring immediate incoming data handling. 2. **Large data sets:** Beneficial for processing large amounts of data in smaller, manageable chunks. 3. **Event-driven applications:** Aligns well with event-driven architectures, allowing reactive processing of data events. **Non-Flowing Mode:** 1. **Manual control:** Provides fine-grained control over data retrieval, enabling custom logic and backpressure handling. 2. **Parsing or transformation:** Enables custom parsing or transformation operations on data read from the stream. 3. **Custom stream implementations:** Allows building custom stream behavior based on unique requirements. ## How do you handle errors in streams? In Node.js, you can handle errors in streams by utilizing the error event. Here's an example that demonstrates error handling in a readable and writable stream: ```javascript const fs = require('fs'); // Create a readable stream from a file const readableStream = fs.createReadStream('input.txt'); // Create a writable stream to a file const writableStream = fs.createWriteStream('output.txt'); // Handle error event on the readable stream readableStream.on('error', (error) => { console.error('Error reading the file:', error); }); // Handle error event on the writable stream writableStream.on('error', (error) => { console.error('Error writing to the file:', error); }); // Pipe the data from the readable stream to the writable stream readableStream.pipe(writableStream); ``` If an error occurs during the reading or writing process, the respective error event handler will be triggered, allowing you to handle the error appropriately. ## How do you transform data using Transform stream? Transform streams in Node.js allow you to transform data as it passes through the stream. You can modify, filter, or manipulate the data in some way before it is passed on to the next stream or written to a destination. To transform data using Transform streams, you typically extend the `Transform` class from the `stream` module. Here's an example: ```javascript const { Transform } = require('stream'); const fs = require('fs') // Custom transform stream class UpperCaseTransform extends Transform { _transform(chunk, encoding, callback) { // Transform the chunk (in this case, convert to uppercase) const transformedChunk = chunk.toString().toUpperCase(); // Pass the transformed chunk to the next stream this.push(transformedChunk); // Invoke the callback to signal that the transformation is complete callback(); } } // Create a readable stream const readableStream = fs.createReadStream('input.txt'); // Create an instance of the custom transform stream const upperCaseTransform = new UpperCaseTransform(); // Create a writable stream const writableStream = fs.createWriteStream('output.txt') // Pipe the data from the readable stream through the transform stream to the writable stream readableStream.pipe(upperCaseTransform).pipe(writableStream); ``` To use the custom transform stream, we create an instance of `UpperCaseTransform` and pipe the data from the readable stream through the transform stream and finally to the writable stream. As the data flows through the transform stream, each chunk will be transformed according to the logic defined in the `_transform` method before being passed to the next stream. ## How do you handle backpressure in Node.js streams? Backpressure is a mechanism used in Node.js streams to handle data transfer when the receiving end is slower or unable to keep up with the data flow from the source. It prevents a buildup of data in the buffer by pausing the data transfer until the consumer is ready to process more data. In Node.js, the `.pipe()` method is commonly used to transfer data from a readable stream to a writable stream. The `Writable` stream's `.write()` method automatically handles the backpressure mechanism, which returns a boolean value indicating if the data can be written immediately or if backpressure needs to be applied. When the writable stream's `.write()` method returns `false`, the data buffer is full, the write queue is busy, and backpressure is applied. The readable stream pauses sending data until the writable stream emits a `'drain'` event, indicating that it is ready to receive more data. Once the writable stream is ready, the readable stream resumes sending data. Here's an example that demonstrates backpressure in Node.js streams: ```javascript const fs = require('fs'); const readableStream = fs.createReadStream('input.txt'); const writableStream = fs.createWriteStream('output.txt'); readableStream.pipe(writableStream); writableStream.on('drain', () => { console.log('Writable stream drained, ready to receive more data'); }); ``` In this example, the `readableStream` reads data from the file `'input.txt'`, and the `writableStream` writes data to the file `'output.txt'`. The `.pipe()` method connects the readable stream to the writable stream, automatically handling backpressure. When the writable stream's buffer is full, the readable stream will pause sending data. Once the writable stream is ready to receive more data (i.e., the buffer is emptied), it emits a `'drain'` event, and the readable stream resumes sending data. Using the `.pipe()` method and allowing the streams to handle backpressure, you ensure a smooth data flow from the source to the destination, preventing memory exhaustion and optimizing the data transfer process. ## How do you chain multiple streams together? In Node.js, you can chain multiple streams together using the `pipe()` or `pipeline()` method. Here's an example that demonstrates chaining 4 to 5 streams together where we'll read data from a file, split it into lines, transform each line, filter out specific lines, and finally write the result to another file: Example using `pipe()` method ```javascript const fs = require('fs'); const { Transform } = require('stream'); // Custom Transform stream to transform each line class LineTransform extends Transform { constructor(options) { super(options); } _transform(chunk, encoding, callback) { const lines = chunk.toString().split('\n'); const transformedLines = lines.map((line) => line.toUpperCase()); const transformedText = transformedLines.join('\n'); this.push(transformedText); callback(); } } // Custom Transform stream to filter specific lines class LineFilterTransform extends Transform { constructor(options) { super(options); } _transform(chunk, encoding, callback) { const lines = chunk.toString().split('\n'); const filteredLines = lines.filter((line) => line.includes('FILTER')); const filteredText = filteredLines.join('\n'); this.push(filteredText); callback(); } } // Create a readable stream from a file const readableStream = fs.createReadStream('input.txt'); // Create transform streams for line transformation and filtering const lineTransform = new LineTransform(); const lineFilterTransform = new LineFilterTransform(); // Create a writable stream to a file const writableStream = fs.createWriteStream('output.txt'); // Chain the streams together readableStream .pipe(lineTransform) .pipe(lineFilterTransform) .pipe(writableStream) .on('finish', () => { console.log('Pipeline completed.'); }); ``` In this example, we create two custom Transform streams: `LineTransform` and `LineFilterTransform`. - LineTransform transforms each line to uppercase. - LineFilterTransform filters out lines that include the word "FILTER". Example using `pipeline()` method ```javascript // Initial code to remain same as above one // Chain the streams together using the pipeline function pipeline( readableStream, lineTransform, lineFilterTransform, writableStream, (error) => { if (error) { console.error('Pipeline failed:', error); } else { console.log('Pipeline completed.'); } } ); ``` ## What is the difference between `pipe()` and `pipeline()` method in streams? The `pipe()` method and `pipeline()` function in Node.js are used to chain streams together, but they have some differences in handling error propagation and cleanup. 1. Error handling: - `pipe()`: When using `pipe()`, you need to manually handle errors on each stream by listening to the `'error'` event. If an error occurs in any of the streams, you must handle it explicitly. - `pipeline()`: The `pipeline()` function simplifies error handling. It automatically handles error propagation and passes any error during the pipeline to the provided callback function. You only need to provide the callback function and handle errors in a centralized manner. 2. Cleanup: - `pipe()`: When using `pipe()`, you need to manually handle stream cleanup and closing. If an error occurs, you must clean up each stream individually by calling each stream's `end()` or `destroy()` method. - `pipeline()`: The `pipeline()` function automatically handles stream cleanup and closing. If an error occurs in any stream, it will properly destroy and close all streams in the pipeline, preventing resource leaks. In summary, while both `pipe()` and `pipeline()` are used to chain streams, `pipeline()` provides a more convenient way to handle error propagation and cleanup, making the code cleaner and reducing the chances of resource leaks. It is recommended to use `pipeline()` when chaining multiple streams together, especially when error handling and cleanup are essential considerations. ## What are the built-in stream modules provided by Node.js? Node.js provides several built-in modules for working with streams. Here are the main built-in stream modules available in Node.js: 1. **stream:** This is the core module for working with streams. It provides the base classes and utilities for creating and working with streams. 2. **fs:** The `fs` module provides file system-related streams, such as `createReadStream()` and `createWriteStream()`, which allow you to read from and write to files using streams. 3. **http:** The `http` module includes HTTP requests and response streams. For example, the `request` and `response` objects in HTTP servers and clients are instances of `Readable` and `Writable` streams, respectively. 4. **zlib:** The `zlib` module provides streams for compressing and decompressing data using various compression algorithms, such as gzip and deflate. It includes streams like `createGzip()` and `createGunzip()`. 5. **crypto:** The `crypto` module offers streams for encryption and decryption, such as `Cipher` and `Decipher`, allowing you to encrypt and decrypt data using various cryptographic algorithms. 6. **net:** The `net` module provides streams for creating network sockets. Streams like `Socket` and `Server` allow you to read from and write to network connections. 7. **child_process:** The `child_process` module includes streams for interacting with child processes, such as `spawn()`, which provides streams for standard input, output, and error of the child process. 8. **process:** The `process` global object provides standard input, output, and error streams (`process.stdin`, `process.stdout`, and `process.stderr`) for the current Node.js process. 9. **tty:** The `tty` module provides streams for working with terminal input and output. It includes streams like `Readable` and `Writable` for working with TTY (terminal) devices. 10. **readline:** The `readline` module offers streams for reading input from a readable stream interactively. It provides a convenient way to create command-line interfaces that accept user input. These are some of the main built-in stream modules provided by Node.js. Each module offers specific functionality and features for working with different types of streams in various contexts. ## How do you handle end-of-stream events in Node.js? To handle end-of-stream events in Node.js: - **Readable Stream:** Use the `end` event or check for `null` return value when reading from the stream. - **Writable Stream:** Use the `finish` event to know when all data has been written. - **Duplex/Transform Stream:** Use the `end` event or check for `null` return value when reading from the stream. ## How do you handle large files using streams? In Node.js, streams are designed to work in a non-blocking manner by default. When you use streams to handle large files, the data is processed incrementally as it becomes available without blocking the execution of other parts of your code. It allows for efficient handling of large files without causing delays or consuming excessive memory. Here's an example that demonstrates how to handle large files using streams in a non-blocking manner in Node.js: ```javascript const fs = require('fs'); // Create a readable stream to read the large file const readableStream = fs.createReadStream('largeFile.txt', 'utf8'); // Create a writable stream to write the processed data const writableStream = fs.createWriteStream('output.txt', 'utf8'); // Handle the 'data' event, which is emitted when a chunk of data is read readableStream.on('data', (chunk) => { // Process the data chunk here (e.g., transform, filter, etc.) const processedData = chunk.toString().toUpperCase(); // Write the processed data to the writable stream const canContinueWriting = writableStream.write(processedData); if (!canContinueWriting) { // The writable stream's buffer is full, so we pause the readable stream temporarily readableStream.pause(); // Resume reading once the buffer has drained writableStream.once('drain', () => { readableStream.resume(); }); } }); // Handle the 'end' event, which is emitted when the entire file has been read readableStream.on('end', () => { // Close the writable stream writableStream.end(); }); // Handle errors readableStream.on('error', (error) => { console.error('An error occurred while reading the file:', error); }); writableStream.on('error', (error) => { console.error('An error occurred while writing to the file:', error); }); ``` Above code can be shortened using the `pipe()` method, which is a convenient way to handle stream operations in Node.js. The `pipe()` method automatically manages the flow of data between readable and writable streams, taking care of backpressure and error handling. ```javascript const fs = require('fs'); // Create a readable stream to read the large file const readableStream = fs.createReadStream('largeFile.txt', 'utf8'); // Create a writable stream to write the processed data const writableStream = fs.createWriteStream('output.txt', 'utf8'); // Pipe the readable stream to the writable stream readableStream.pipe(writableStream); ``` ## How do you consume and produce streams in an HTTP server in Node.js? In Node.js, you can consume and produce streams in an HTTP server by leveraging the `request` and `response` objects provided by the `http` module. ```javascript const http = require('http'); const fs = require('fs'); const server = http.createServer((request, response) => { // Readable stream to consume the request body let requestBody = ''; // Handle the 'data' event to capture the request data request.on('data', (chunk) => { requestBody += chunk; }); // Handle the 'end' event when the entire request has been received request.on('end', () => { // Process the request body or perform any necessary operations console.log('Received request body:', requestBody); // Readable stream to produce the response data const readableStream = fs.createReadStream('largeFile.txt', 'utf8'); // Set the appropriate headers response.setHeader('Content-Type', 'text/plain'); // Pipe the readable stream to the response object to produce the response readableStream.pipe(response); }); }); server.listen(3000, () => { console.log('Server is running on port 3000'); }); ``` In this HTTP server example, we handle incoming `requests` incrementally using the `data` event and concatenate the chunks into a `requestBody`. After processing the request body, we create a readable stream from a large file and set appropriate response headers. By using `readableStream.pipe(response)`, we efficiently send the stream's data as the response without buffering the entire file. This example can be customized for specific requirements, such as additional request body processing or response stream transformations. ## How do you create a duplex stream in Node.js? In Node.js, you can create a duplex stream using the `Duplex` class from the `stream` module. A duplex stream is a stream that can both read from and write to. Here's an example of how you can create a duplex stream: ```javascript const { Duplex } = require('stream'); // Create a custom duplex stream by extending the Duplex class class MyDuplexStream extends Duplex { constructor() { super(); // Initialize any required variables or state this.data = []; } _read(size) { // Implement the read logic if (this.data.length === 0) { this.push(null); // Signal the end of data } else { const chunk = this.data.shift(); this.push(chunk); } } _write(chunk, encoding, callback) { // Implement the write logic this.data.push(chunk); callback(); } } // Usage example const myStream = new MyDuplexStream(); // Read data from the duplex stream myStream.on('data', (data) => { console.log('Read:', data.toString()); }); // Write data to the duplex stream myStream.write('Hello,'); myStream.write(' World!'); myStream.end(); // Signal the end of writing // Output: // Read: Hello, // Read: World! ``` ## What are examples of built-in Duplex streams in Node? Node.js provides several built-in duplex streams that you can use out of the box. One example is the `net.Socket` class, which represents a TCP socket. The `net.Socket` class is a duplex stream that allows reading from and writing to a TCP socket. Here's an example: ```javascript const net = require('net'); // Create a TCP server const server = net.createServer((socket) => { console.log('Client connected'); // Read data from the socket socket.on('data', (data) => { console.log('Received:', data.toString()); // Write data back to the socket socket.write('Server: I received your message'); }); // Handle socket errors socket.on('error', (err) => { console.error('Socket error:', err); }); // Handle socket closure socket.on('end', () => { console.log('Client disconnected'); }); }); // Start the server server.listen(3000, () => { console.log('Server listening on port 3000'); }); ``` The socket object is a duplex stream, allowing us to both read from it `(socket.on('data'))` and write to it `(socket.write())`. It handles the bidirectional communication between the server and the client. ## What is multithreading, and why is it important in Node.js? Multithreading is a programming concept that refers to the concurrent execution of multiple threads within a single process. A thread is a lightweight unit of execution that can independently perform tasks within a program. Node.js is an event-driven, non-blocking I/O platform built on top of Chrome's V8 JavaScript engine. By default, Node.js runs in a single-threaded, event-loop architecture. It processes incoming requests one at a time without utilizing multiple cores or threads. However, Node.js provides hidden threads through the `libuv` library, and they can be accessed via a module called `worker_threads` that allows developers to create and manage multithreaded applications. This module enables the execution of JavaScript code in separate threads, allowing for parallel processing and improved performance in specific scenarios. Multithreading is essential in Node.js for a few reasons: 1. **Utilizing multiple cores:** Node.js can use multiple CPU cores available on a machine by leveraging multithreading. It enables the execution of multiple tasks simultaneously, resulting in better performance and increased throughput. 2. **CPU-intensive tasks:** Node.js is well-suited for handling I/O-bound operations, such as network requests or file system operations, due to its non-blocking nature. However, multithreading can help distribute the workload across multiple threads for CPU-intensive tasks requiring significant computation and prevent blocking the event loop, ensuring responsiveness for other requests. 3. **Complex computations:** Some applications require executing computationally intensive algorithms or processing heavy data. Multithreading can offload these tasks to separate threads, allowing the main thread to remain responsive and handle other requests or events concurrently. It's important to note that while multithreading can be beneficial in specific scenarios, it introduces complexities such as shared memory access and synchronization. Care must be taken to handle thread safety and avoid potential race conditions or data inconsistencies when working with multiple threads in Node.js. ## How to calculate the number of threads in node.js? To calculate the number of threads available in the Worker Thread module, you can use the `os` module provided by Node.js. Here's an example of how you can do it: ```javascript const os = require('os'); const numThreads = os.cpus().length; console.log('Number of available threads:', numThreads); ``` The os.cpus() method returns an array of objects representing the available CPU cores on your system. The length of this array corresponds to the number of available threads you can use. It is possible to create more threads than the number of CPU cores in Node.js using the Worker Threads module. The Worker Threads module allows you to create and manage additional threads for parallel processing, even if the number of threads exceeds the number of available CPU cores. In this scenario, the CPU core will handle more than one thread. ## How does Node.js handle concurrency by default, without multithreading? 1. **Event Loop:** Node.js relies on an event loop, a mechanism for handling and executing asynchronous operations. The event loop continuously checks for pending events and executes their associated callbacks when they become available. 2. **Non-Blocking I/O:** Node.js utilizes non-blocking I/O operations, such as file system operations or network requests. When an I/O operation is initiated, instead of waiting for it to complete, Node.js registers a callback function and continues executing other tasks. When the I/O operation finishes, the event loop triggers the associated callback, allowing Node.js to continue processing the result. 3. **Callbacks and Asynchronous APIs:** Node.js encourages the use of asynchronous APIs that accept callbacks. These callbacks are executed when the corresponding operation completes. For example, when reading a file, you provide a callback function with the file's contents when the reading is finished. 4. **Event-Driven Architecture:** Node.js is event-driven, meaning it responds to events emitted by various sources like I/O operations, timers, or user interactions. When an event occurs, Node.js invokes the registered callback function associated with that event. 5. **Event Loop Phases:** The event loop in Node.js has different phases, including timers, I/O polling, callbacks, and idle. During each phase, the event loop checks for events executes associated callbacks, and moves to the next phase if no events are pending. It ensures efficient utilization of system resources. ## Can you explain the difference between multithreading and multiprocessing? Multiprocessing involves executing multiple processes, where each process runs independently and has its own memory space. Processes do not share memory by default and communicate with each other using `inter-process communication (IPC)` mechanisms. Each process runs in its own address space and has its system resources. 1. **Memory:** In multithreading, threads share the same memory space, allowing them to access shared data directly. In multiprocessing, processes have separate memory spaces, requiring explicit mechanisms like IPC for communication between processes. 2. **Communication:** In multithreading, communication between threads is simpler and more efficient, as they can directly access shared memory. Inter-process communication mechanisms, such as pipes, shared memory, or message passing, are needed for communication between processes in multiprocessing. 3. **Complexity:** Multithreading can introduce complexities like race conditions and synchronization issues due to shared memory access. Multiprocessing, with separate memory spaces, offers better isolation between processes but requires explicit communication mechanisms. 4. **Fault Isolation:** A bug or error in one thread can affect the entire process in multithreading. In multiprocessing, each process runs independently, providing better fault isolation. If one process crashes, other processes can continue execution. ## What are the limitations or potential issues when using multithreading in Node.js? 1. **Shared Memory Access:** Multiple threads share memory can lead to potential concurrency issues, such as race conditions, deadlocks, and data inconsistency. Synchronizing access to shared data becomes crucial to ensure correctness. Node.js provides synchronization mechanisms like locks, semaphores, and atomic operations, but handling shared memory access requires careful programming practices. 2. **Complex Debugging:** Multithreaded applications can be more challenging than single-threaded ones. Issues like race conditions or deadlocks may not be easily reproducible and can be challenging to diagnose and resolve. 3. **Increased Complexity:** Multithreading adds complexity to the codebase. It requires careful design, synchronization mechanisms, and error handling. Writing correct and efficient multithreaded code can be more challenging than writing single-threaded code. 4. **Shared Resources:** When using multithreading, resources like CPU, memory, and I/O can become shared among multiple threads. Managing and balancing the allocation of these shared resources can be complex and may require additional considerations. 5. **C++ Add-ons Compatibility:** If your Node.js application includes C++ add-ons, not all C++ libraries are designed to be thread-safe. Multithreading can introduce additional challenges when integrating and interacting with non-thread-safe C++ code. 6. **Thread Management Overhead:** Managing multiple threads incurs overhead due to thread creation, context switching, and synchronization. This overhead may offset the performance gains achieved through parallelism in specific scenarios. ## What are the different ways to achieve multithreading in Node.js? In Node.js, there are several ways to achieve multithreading and parallelism. Here are the different approaches available: 1. **Worker Threads:** Node.js provides a built-in module called "worker_threads" that allows you to create and manage multithreaded JavaScript workers. Worker threads are separate instances of the V8 engine running in different threads, allowing parallel execution. They can share memory and communicate with each other using message passing. 2. **Cluster module:** The "cluster" module is another built-in module in Node.js that enables you to create a cluster of processes. Each process runs in a separate instance of Node.js, and the master process manages the distribution of incoming connections across the worker processes. This approach leverages multiple processes to achieve parallelism and load balancing. 3. **Child Processes:** Node.js provides the "child_process" module, which allows you to spawn child processes and communicate with them. Using the available CPU cores, you can offload heavy computations or tasks to separate child processes. Communication between the parent and child processes can be achieved through inter-process communication mechanisms like message passing or standard input/output streams. 4. **External Libraries:** There are external libraries available that provide multithreading capabilities in Node.js. For example, the "threads" or "threads.js" library allows you to create and manage JavaScript threads using a thread pool. These libraries provide abstractions for managing worker threads, thread pools, and shared memory. 5. **Offloading to Separate Processes:** Instead of using threads, you can offload CPU-intensive tasks to separate Node.js processes. These processes can communicate with each other using inter-process communication mechanisms like IPC, message queues, or sockets. 6. **Native Add-ons:** Node.js allows the creation of native add-ons using C/C++. Native add-ons can use threading libraries like pthreads or OpenMP to utilize multithreading capabilities directly. However, this approach requires expertise in C/C++ programming and may introduce additional complexity. ## How can we create and manage worker threads in Node.js? Here's an example of how to create and manage worker threads in Node.js: ```javascript const { Worker } = require('worker_threads'); // Create a new worker thread const worker = new Worker('./worker.js'); // Listen for messages from the worker thread worker.on('message', message => { console.log('Received message from worker:', message); }); // Send a message to the worker thread worker.postMessage('Hello from the main thread!'); // Terminate the worker thread after a certain time setTimeout(() => { worker.terminate(); }, 5000); ``` Here's an example of the worker.js file: ```javascript const { parentPort } = require('worker_threads'); // Listen for messages from the main thread parentPort.on('message', message => { console.log('Received message from main thread:', message); // Send a response back to the main thread parentPort.postMessage('Hello from the worker thread!'); }); ``` The above code will yield the following output:- ```javascript Received message from main thread: Hello from the main thread! Received message from worker: Hello from the worker thread! ``` That's a basic example of creating and managing worker threads in Node.js using the `worker_threads` module. You can extend this functionality to perform more complex tasks or parallelize CPU-intensive operations in your application. ## How does communication between the main thread and worker threads occur in Node.js? In Node.js, communication between the main thread and worker threads occurs through message passing. The main thread and worker threads can exchange data and messages using the `postMessage()` method and the `message` event. Here's how the communication process works: 1. **Main Thread to Worker Thread**: To send a message from the main thread to a worker thread, you can use the `postMessage()` method on the worker object. For example: ```javascript worker.postMessage('Hello from the main thread!'); ``` The main thread can pass various types of data as the message, including strings, numbers, objects, or even more complex data structures. 2. **Worker Thread to Main Thread**: To send a message from a worker thread to the main thread, you use the `postMessage()` method on the `parentPort` object. You can access the `parentPort` object in the worker script, which represents the communication channel with the main thread. For example: ```javascript parentPort.postMessage('Hello from the worker thread!'); ``` Like the main thread, the worker thread can send various types of data as a message. 3. **Event Handling**: The main thread and worker threads listen for messages using the `message` event. When a message is received, the corresponding event handler is triggered, allowing you to handle the received message. For example, in the main thread: ```javascript worker.on('message', message => { console.log('Received message from worker:', message); }); ``` And in the worker thread: ```javascript parentPort.on('message', message => { console.log('Received message from main thread:', message); }); ``` The event handlers can process the received messages, perform operations, and return responses if required. It's important to note that the messages sent between the main thread and worker threads are copied and not shared by reference. Therefore, changes made to objects or data in one thread will not affect the original objects or data in the other thread. If you need to send complex objects or large amounts of data between threads, consider using serialization techniques like JSON.stringify() and JSON.parse() to ensure proper data transfer. ## What are the best practices for using worker thread in Node.js? 1. **Thorough Planning:** Before implementing worker threads, thoroughly analyze your application's requirements and performance characteristics. Identify the parts of your codebase that can benefit from parallelism and assess the potential gains and trade-offs. 2. **Granularity:** Identify fine-grained tasks that can be offloaded to worker threads rather than moving the entire workload. Breaking down the work into smaller units allows for better load balancing and reduces the risk of resource exhaustion. 3. **Shared State:** Minimize shared mutable state between worker threads to avoid potential race conditions and synchronization issues. Prefer immutable data structures or use thread-safe mechanisms like locks or atomic operations when sharing state is necessary. 4. **Message Passing:** Communicate between the main thread and worker threads using message passing. Serialize data using a lightweight format like JSON, and avoid transferring large or complex objects unless necessary. Chunking data into smaller messages can help mitigate serialization overhead. 5. **Resource Management:** Be mindful of the number of worker threads created and the resources allocated to each thread. Consider using a pool of worker threads rather than creating new ones for each task. Monitor resource consumption and adjust the configuration based on your application's needs. 6. **Testing and Debugging:** Implement thorough testing and debugging strategies to identify and address potential concurrency issues. Utilize tools like debuggers, profilers, and thread-safe debugging techniques to diagnose and resolve problems effectively. 7. **Error Handling:** Implement robust error handling mechanisms to gracefully handle exceptions and errors that may occur within worker threads. Ensure error messages are properly propagated to the main thread for appropriate handling. ## Explain how the cluster module works in Node.js and how it relates to multithreading? 1. The cluster module in Node.js allows you to create child processes (workers) that can share the same server port. 2. It leverages the capabilities of multi-core systems by running separate instances of the Node.js event loop on each CPU core. 3. Using a round-robin algorithm, The cluster module improves performance and scalability by distributing incoming connections across multiple worker processes. 4. The master process manages the worker processes and listens for incoming connections. 5. Each worker process operates independently, handling requests concurrently and utilizing multiple CPU cores. 6. If a worker process dies, the master process can fork a new worker process to replace it. 7. The cluster module provides process-based parallelism, where each worker process runs in a separate Node.js event loop rather than true multithreading. 8. Worker processes rely on the operating system's scheduling to run on separate CPU cores, achieving parallelism. Here's the updated example code: ```javascript const cluster = require('cluster'); const http = require('http'); const numCPUs = require('os').cpus().length; if (cluster.isMaster) { // Master process forks workers for (let i = 0; i < numCPUs; i++) { cluster.fork(); } cluster.on('exit', (worker, code, signal) => { // Fork a new worker if one dies cluster.fork(); }); } else { // Each worker process creates its own server http.createServer((req, res) => { res.writeHead(200); res.end('Hello, World!\n'); }).listen(8000); } ``` ## What are the differences between worker threads and the cluster module in Node.js? | | Worker Threads | Cluster Module | |---|----------------|----------------| | Creation | Programmatically using `worker_threads` module | Built-in Node.js module | | Purpose | CPU-intensive tasks | Network-bound applications (web servers, etc.) | | Execution | True parallel execution | Concurrent execution | | Communication | Message passing | Shared server ports and round-robin load balancing | | Suitable for | CPU-bound tasks | Network-bound tasks | | Customization | Highly customizable | Limited customization options | | Overhead | Low | Slightly higher due to inter-process communication | | JavaScript context | Separate for each worker thread | Separate for each worker process | | Scalability | Limited to available CPU cores | Horizontal scaling across multiple processes | ## What are some real-world use cases where multithreading in Node.js has been beneficial? 1. CPU-Intensive Tasks 2. Image Processing 3. Data Parsing and Transformation 4. Blockchain and Cryptocurrency Applications 5. Machine Learning and AI ## What are the considerations for sharing data between multiple threads in Node.js? 1. **Thread Safety:** When sharing data between threads, ensure that the shared data structures and variables are designed to be thread-safe. This means multiple threads can access, modify, and synchronize them correctly without causing data corruption or inconsistencies. 2. **Atomic Operations:** Atomic operations are indivisible operations guaranteed to execute fully or not at all. When dealing with shared data, it's important to use atomic operations for read-modify-write operations, such as incrementing a counter or updating a value. Node.js provides atomic operations through the `Atomics` module, which includes functions like `Atomics.add` and `Atomics.compareExchange`. 3. **Locking Mechanisms:** Locking mechanisms like `mutexes` and `semaphores` can protect critical code sections or shared resources. In Node.js, you can use the `Mutex` and `Semaphore` classes provided by the `async-mutex` package or other similar libraries to coordinate access to shared data and prevent concurrent modifications that could lead to data inconsistencies. 4. **Data Immutability:** Favor immutable data structures whenever possible. Immutable data cannot be modified once created, eliminating the need for synchronization mechanisms. If a thread needs to "modify" data, it can create a new copy with the desired changes instead of modifying the existing data directly. ## How to implement atomic operations while multithreading in Node.js? Here's an example of how you can use the `Atomics` module to implement an atomic operation in Node.js: ```javascript const { Worker, isMainThread, workerData, parentPort } = require('worker_threads'); // Create an atomic increment function const atomicIncrement = (array, index) => { Atomics.add(array, index, 1); }; if (isMainThread) { // Create a shared Int32Array to be accessed by multiple threads const sharedArray = new Int32Array(new SharedArrayBuffer(4)); // Create multiple worker threads const numWorkers = 4; const workers = []; for (let i = 0; i < numWorkers; i++) { const worker = new Worker(__filename, { workerData: { sharedArray, index: 0 } }); workers.push(worker); } // Wait for all worker threads to finish let finishedWorkers = 0; workers.forEach((worker) => { worker.on('message', (message) => { if (message === 'done') { finishedWorkers++; if (finishedWorkers === numWorkers) { console.log('Value in the shared array after atomic increments:', sharedArray[0]); } } }); }); } else { // Access the sharedArray and index from the worker thread const { sharedArray, index } = workerData; // Perform atomic increments on the sharedArray for (let i = 0; i < 100000; i++) { atomicIncrement(sharedArray, index); } // Signal the main thread that the worker has finished parentPort.postMessage('done'); } ``` - Shared Array Buffer provides a common memory space accessible by multiple threads. - Atomic operations offered by the Atomics module are indivisible and non-interruptible. - Atomicity ensures that each operation is executed in its entirety without interruption from other threads. - Atomic operations establish a happens-before relationship, ensuring proper ordering of memory accesses. - Memory barriers and cache coherence protocols maintain memory consistency and visibility across threads. - Ordering and visibility guarantees ensure synchronized access and modification of shared data. - Atomic operations prevent race conditions and data corruption in concurrent environments. ## What are the performance implications of using multithreading in Node.js? **Positive Performance Implications:** 1. **Parallelism:** Improved CPU-intensive task execution and reduced processing time by leveraging multiple cores. 2. **Handling I/O Bound Tasks:** Better resource utilization and responsiveness when dealing with I/O operations. 3. **Scalability:** Ability to handle a higher number od concurrent requests, enhancing overall throughput **Negative Performance Implications:** 1. **Complexity and Overhead:** Increased code complexity and potential for bugs, along with managing thread communication overhead. 2. **Blocking and Deadlocks:** Risk of thread blocking or deadlocking causing application unresponsiveness. 3. **Increased Memory Consumption:** Higher memory usage due to separate thread contexts and stacks. 4. **Concurrency Management:** Need for careful management of shared resources and race conditions ## Disclaimer Please note that the interview questions provided in the repository are for educational purposes and may not represent the exact questions you'll encounter in job interviews. It is always recommended to consult additional resources and gain hands-on experience with these concepts.
A comprehensive repository with commonly asked Node.js interview questions, detailed answers, and explanations. Enhance your Node.js knowledge and excel in job interviews.
advanced,event-driven,javascript,nodejs,streams
2023-07-01T05:03:22Z
2023-07-22T11:12:29Z
null
2
4
30
0
0
5
null
MIT
null
oktadev/devdays-arcade-games
main
# Auth0 by Okta - DevDay Arcade Games Lockman and Identity Invader games for Auth0 DevDay experience at Oktane 2023. The game is written in JavaScript and packaged as an [Electron](https://www.electronjs.org/) desktop app. ## Building and publishing the game binaries There is a GitHub action workflow (`.github/workflows/build.yml`) that builds and publishes binaries for Raspberry Pi, Windows, Linux and macOS. In order to trigger a new build a new tag needs to be pushed. 1. Update the `package.json` and bump the `version`. For example `3.0.0` 2. Run `npm install` to update `package-lock.json` 3. Commit and create a tag `git tag v3.0.0` 4. Push the tags `git push && git push --tags` this will trigger the build and create a new release 5. Go to [release](https://github.com/auth0-developer-hub/devdays-arcade-games/releases) and find the draft release. Edit and publish. ## Installing and running the game binaries ### Raspberry PI 4B/400 1. Check the architecture of the Raspberry PI using `uname -m` 1. Download the `DevDay-Arcade-Games-x.x.x-y.AppImage` file from the latest [release](https://github.com/auth0-developer-hub/devdays-arcade-games/releases) to the Raspberry PI. Make sure to download the `arm64` or `armv7l` version based on the result from the previous step. 2. Run `chmod +x DevDay-Arcade-Games-x.x.x-y.AppImage` 3. Install FUSE if required: `sudo apt-get install libfuse2` 4. Start the games with `./DevDay-Arcade-Games-x.x.x-y.AppImage` ### Windows 1. Download the `DevDay-Arcade-Games-Setup-x.x.x.exe` file from the latest [release](https://github.com/auth0-developer-hub/devdays-arcade-games/releases) to the Windows machine. 2. Run the downloaded file. ## Local development setup 1. Install JS dependencies and run the app locally: ``` npm install npm start ``` Builds can be created locally. But keep in mind that you can only build for the OS you are using. For example, you cannot build for Raspberry Pi from macOS and vice versa. ### Controls For the joystick and buttons, keycode mapping needs to be done in three places. 1. **Welcome screen**: In `src/ui/script.js` change key values 1. **Default**: `ArrowLeft` and `ArrowRight` to choose the game and `Enter` to select. 2. **Lockman**: In `src/ui/lockman/lockman.js` change the values for constants (`KEY_CODE_*`) at the start of the file 1. **Default**: `ArrowLeft`, `ArrowRight`, `ArrowUp` and `ArrowDown` to navigate. `Space` to start game and `Enter` to go back to the welcome screen. 3. **Identity invaders**: In `src/ui/invader/invader.js` change the values for constants (`KEY_CODE_*`) at the start of the file 1. **Default**: `ArrowUp` and `ArrowDown` to select single or multiplayer. `ArrowLeft`, `ArrowRight` to navigate. `Space` to fire and `Enter` to go back to the welcome screen. ### Resolution The game resolution can be changed in following places - **Lockman**: Update height and width for `#lockman` in `src/ui/lockman/lockman.css` - **Identity Invaders**: Update `CANVAS_WIDTH` & `CANVAS_HEIGHT` in `src/ui/invader/invader.js` ## Hardware Setup In order to test this game on arcade cabinets provided by [Quality Arcades](https://www.qualityarcades.com/), the following hardware was purchased: 1. [TCL 32" Class 3-Series HD 720p LED Smart Roku TV](https://www.amazon.com/dp/B09YWT3P5Q) - $144.38 2. [PepperTech Digital Raspberry Pi 400 Desktop Computer Complete Value Pack](https://www.amazon.com/dp/B092TT72B2) - $134.82 3. Two joysticks, buttons, and relevant cables from Quality Arcades - $125 ### TV The most difficult part of setting up the TV is creating a Roku account. This is necessary to activate the HDMI1 port on the TV. Once the Roku account was created, you can add the HDMI 1 port to the main screen via **Settings** > **TV Inputs**. ### Raspberry Pi Connect the Raspberry Pi to the HDMI 1 port on the TV and connect the power cable. You can use the included keyboard and mouse to connect to the WiFi and update the OS. Configure the username and password as you see fit. Using the default login credentials included with the kit will make it easier for others to set up. Follow the [Raspberry Pi 4 instructions](#raspberry-pi-4) to run the game. Blue button = Enter, Red button = Spacebar. You will need to Alt+Tab to the terminal to stop the game with Ctrl+C. NOTE: If you need to start from scratch, you can use the [Raspberry Pi Imager](https://www.raspberrypi.org/software/) to flash the SD card. Select Raspberry Pi OS (64-bit) when doing so. ### Joysticks and Buttons The joysticks have a 5-pin connector that needs to be connected to the USB joystick board. A 4-pin connector on the end of a USB cable plugs into a Raspberry Pi USB port. The buttons have a 2-pin connector that needs to be connected to the USB joystick board. Below is a photo of the connectors. You might notice that the blue button is connected to the corner opposite the USB cable, and the red button is next to it. ![setup/joystick-setup.jpg](setup/joystick-setup.jpg) The blue button is mapped to **Enter** and the red button is mapped to **Space**. The joystick is mapped to **ArrowLeft**, **ArrowRight**, **ArrowUp**, and **ArrowDown**. The text that's displayed for these controls can be changed. See the [Controls](#controls) section for more information. You can also examine [this pull request](https://github.com/oktadev/devdays-arcade-games/pull/2) to see how the text was changed for the joysticks and buttons. Install [QJoyPad](https://wiki.debian.org/QJoyPad) to map the joysticks and buttons to keys. You can use the following commands to install it: ```bash sudo apt install qjoypad ``` Then, launch QJoyPad from the games menu. This will put a video game controller icon in the top bar. Select it and you should see both joysticks listed. [Download joystick-layout.lyt](setup/joystick-layout.lyt) and import it. You should now be able to play the game with the joysticks and buttons. If this doesn't work, you can map things manually using the instructions below. Toggle the joysticks and buttons to see what axis and buttons they map to in QJoyPad. Click on the joystick name, the button that flashes, and then the keyboard key you want to map it to. The joystick should have its connector at the bottom when you map things. The layout file below expects this as well. If the arcade cabinet is set up differently, you'll need to change the mappings. ## Credits - Lockman based on [github.com/daleharvey/pacman](https://github.com/daleharvey/pacman) (WTFPL licensed) - Identity Invader based on [github.com/toivjon/html5-space-invaders](https://github.com/toivjon/html5-space-invaders) (MIT licensed)
Custom Pacman and Space Invaders games
electron,javascript,javascript-game,raspberry-pi
2023-07-13T15:57:51Z
2024-04-01T22:09:50Z
2024-04-01T22:09:50Z
10
3
50
0
1
5
null
MIT
JavaScript
bkpecho/handaan
main
![Website Screenshot](/assets/img/handaan-readme.jpg) # Handaan - Your Hometown Eatery ## Description This GitHub repository houses the source code and assets for the [Handaan website](https://handaan.netlify.app/), a delightful restaurant offering authentic Filipino dishes with a local twist. Built with HTML5, CSS3, Bootstrap, JavaScript, and other popular technologies, it boasts a responsive and mobile-friendly interface, adorned with a beautiful and elegant design. ## Table of Contents - [Features](#features) - [Technologies Used](#technologies-used) - [How to Use](#how-to-use) - [Contributing](#contributing) - [License](#license) - [Contact](#contact) - [Links](#links) - [Author](#author) ## Features - Elegant and visually captivating design. - Fully responsive and mobile-friendly interface. - Smooth animations for enhanced user experience. - Dynamic and stylish grid layout for content presentation. - Touch-friendly sliders for intuitive navigation. - Utilizes modern technologies like Bootstrap, JavaScript, and CSS3. ## Technologies Used 1. HTML5 and CSS3 for website structure and styling. 2. Bootstrap framework for responsive design and layout. 3. JavaScript for interactive elements and behavior. 4. AOS (Animate On Scroll) for smooth and elegant animations. 5. GLightbox for a beautiful lightbox effect on images. 6. Isotope layout for a dynamic and stylish grid layout. 7. Swiper JS for creating responsive and touch-friendly sliders. 8. Font Awesome for a wide range of icons. 9. Google Web Fonts Helper for efficient web font usage. 10. Hosted on Netlify for deployment and hosting. ## How to Use To get started with Handaan Restaurant, follow the steps below: 1. Clone the repository to your local machine using the following command: ``` git clone https://github.com/bkpecho/handaan.git ``` 2. Navigate to the cloned directory: ``` cd handaan ``` 3. Open the `index.html` file in your web browser to view the website. That's it! You can now explore Handaan Restaurant's website locally on your machine. ## Contributing We appreciate your interest in improving the Handaan Restaurant website. While we are not actively accepting external contributions at the moment, your feedback is valuable to us. If you discover any issues, have ideas for new features, or want to suggest design enhancements, please feel free to open an issue on the GitHub repository. Thank you for your understanding and support! ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## Contact For any business inquiries or questions related to Handaan Restaurant, you can reach us via email at handaanmarketing@gmail.com. ## Links - [GitHub Repository](https://github.com/bkpecho/handaan) - [Netlify Live Site](https://handaan.netlify.app/) ## Author - **Bryan King Pecho** - GitHub: [bkpecho](https://github.com/bkpecho) - Twitter: [@bkpecho](https://twitter.com/bkpecho) - LinkedIn: [in/bkpecho](https://www.linkedin.com/in/bkpecho/) - Email: pechobk@gmail.com - Portfolio: [bkpecho.tech](https://bkpecho.tech/) Thank you for visiting our repository! We hope you enjoy exploring Handaan's website.
Handaan is a delightful restaurant landing page with an elegant design, responsive interface, and smooth animations. It utilizes modern technologies like Bootstrap, JavaScript, and CSS3 to ensure a seamless and enjoyable browsing experience.
aos,css3,font-awesome,glightbox,html5,isotope-layouts,javascript,netlify,swiper-js,google-fonts-helper
2023-07-15T18:02:25Z
2024-02-21T03:35:45Z
null
1
0
48
0
0
5
null
MIT
HTML
Kidd254/Math-Magicians-React-App
dev
<a name="readme-top"></a> <!-- 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) - [👥 Authors](#authors) - [🔭 Future Features](#future-features) - [🤝 Contributing](#contributing) - [⭐️ Show your support](#support) - [🙏 Acknowledgements](#acknowledgements) - [📝 License](#license) <!-- PROJECT DESCRIPTION --> # 📖 Math Magicians <a name="about-project"></a> > This is a math magician's app built with HTML, CSS, and REACT in this app you can make some calculations math like addition and division..etc, also I used the external API to fetch some quotes for the app using the use effect hook. ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li><a href="#">HTML</a></li> <li><a href="#">CSS</a></li> <li><a href="https://reactjs.org/">React.js</a></li> </ul> </details> ### Key Features <a name="key-features"></a> - [x] Set up the project using (CRA) create-react-app👍. - [x] Remove the boilerplate from the project after setting up💯. - [x] Use the basic CSS style for styling the components. <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🚀 Live Demo <a name="live-demo"></a> - [a link to the online version](https://lawrences-math-magicians-react-app-iy4q.onrender.com/) - [a link to a presentation about this project]() <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: ### Setup Clone this repository to your desired folder: ```sh cd my-folder git clone git@github.com:Kidd254/Math-Magicians-React-App.git ``` ### Install Install this project with: ```sh cd Math-Magicians-React-App npm install ``` ### Usage To run the project, execute the following command: ```sh npm start ``` ### Run tests To run tests for the linter, run the following command: ```sh npx hint . npx eslint . --fix ``` <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ## 👥 Authors <a name="authors"></a> 👤 **Lawrence Muema Kioko** - GitHub: [@githubhandle](https://github.com/Kidd254) - Twitter: [@twitterhandle](https://twitter.com/lawrenc98789206) - LinkedIn: [LinkedIn](https://www.linkedin.com/in/lawrence-muema-kioko-972035240/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - [x] I will test this app using the library from React or maybe use Jest to test it👌💯. - [x] Add the react-router dom for the project to navigate from the pages using the navigation - [x] Add the Quotes component to fetch the quotes from the API 🚀 <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/Kidd254/Math-Magicians-React-App/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 you can give me a star 😊 just to prove my app that it is useful for everyone and the users can use it to calculate anything 💯. <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🙏 Acknowledgments - I would like to thank Microverse for this opportunity. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE --> ## ❓ FAQ - What is this for? This is a React.js project created by Microverse to allow students learn and practice React.js. - Can I copy this project? Your welcome, copy this project and let us know if you need something. ## 📝 License <a name="license"></a> This project is [MIT](https://github.com/Kidd254/Math-Magicians-React-App/blob/set-up/LICENSE) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
⚛️ Math Magicians is a website for all fans of mathematics. This Single Page App (SPA) that allows users make simple calculations and read a random math-related quote.
api,css,html,javascript,reactjs,react-hooks,tailwind-css
2023-07-04T08:58:52Z
2024-03-01T17:23:13Z
null
1
7
64
0
0
5
null
MIT
JavaScript
GhostEsso/Awesomebook
main
# Awesomebook
This project is a simple web application that enables users to add books to a list. The list of books is stored locally on the user's computer. The application was developed using plain JavaScript, HTML, and CSS.
css3,html5,javascript
2023-07-03T09:38:35Z
2023-07-10T08:34:48Z
null
1
1
10
0
0
5
null
null
JavaScript
ViktorSvertoka/goit-markup-hw-06
main
# Домашнє завдання № 6 - Створи репозиторій `goit-markup-hw-06`. - Склонуй створений репозиторій і скопіюй в нього файли попередньої роботи. - Виконай верстку адаптивної версії усіх сторінок та елементів макета [**домашнього завдання #6**](<https://www.figma.com/file/Kr5Q4EVrEAqpOWko4QeEJb/Web-Studio-(Version-4.0)?type=design&node-id=297046-1554&mode=design&t=FEkHoFMrmvxZLtIl-0>). - Налаштуй `GitHub Pages` і додай посилання на живу сторінку в шапку GitHub-репозиторія. ## Критерії приймання роботи наставником Для здачі домашнього завдання достатньо зробити адаптивну верстку головної сторінки (`index.html`). Виконання адаптивної верстки сторінки портфорліо (`portfolio.html`) не обов'язкове для здачі домашнього завдання. ### Проект **`«A1»`** При перегляді сторінки на будь-якому пристрої шириною від `320px`, не з'являється горизонтальна смуга прокручування. **`«A2»`** Скрипт мобільного меню підключений в HTML окремим файлом `mobile-menu.js`. **`«A3»`** Повний приклад створення мобільного меню з уже написаним скриптом розбери у [**майстерні**](https://github.com/goitacademy/mobile-menu-workshop). ## Розмітка **`«B1»`** У всіх сторінок в блоці `<head>` є метатег `viewport`. **`«B2»`** Всі фонові і контентні растрові зображення - респонсивні і підтримують екрани щільністю `x1` і `x2`. **`«B3»`** Для респонсивних фонових зображень використані медіа-фукцніі `min-device-pixel-ratio` і `min-resolution`. **`«B4»`** Виконана розмітка мобільного меню. ## Оформлення **`«C1»`** При написанні стилів використаний `Mobile First` підхід і медіа-функція `(min-width: )`. **`«C2»`** Стилі, необхідні тільки у певному проміжку, закриті в медіа-запити `(min-width: ) and (max-width: )` або тільки `(max-width: )`. **`«C3»`** В медіа-запитах відсутнє зайве дублювання стилів. **`«C4»`** Верстка виконана щодо трьох точок перелому: 428px, 768px і 1158px. **`«C5»`** Виконано оформлення мобільного меню. # Web Studio ![Web Page](./assets/screencapture1-d.png) --- ![Web Page](./assets/screencapture2-d.png) --- ![Web Page](./assets/screencapture1-t.png) --- ![Web Page](./assets/screencapture2-t.png) --- ![Web Page](./assets/screencapture1-m.png) --- ![Web Page](./assets/screencapture2-m.png) ---
HTML5 & CSS3 Homework📕 📘
css3,gitignore,goit,goit-markup-hw-06,html5,javascript,prettier,readme
2023-07-20T09:29:14Z
2023-12-03T17:55:42Z
null
1
0
22
0
0
5
null
null
HTML
ianrandmckenzie/tailwindsjs
main
# TailwindSJS (Simple JavaScript) TailwindSJS is a package for making it simple turn your TailwindCSS classes into animations based on user interaction. If you are a buyer of [TailwindUI components](https://tailwindui.com/), this is the perfect library to easily get those components animated without pidgeon-holing yourself into their React or Vue samples. Update from July 17, 2023: Originally called Scripty TUI (TailwindUI), it has become apparent you do not need to be a TailwindUI customer to get the full benefits of this software. On July 28, it was renamed to TailwindSJS to match the styling of `TailwindCSS` and my newer project `TailwindVPB`. ## Navigate this README * [Installation](#installation) * [Usage](#usage) * [A more descriptive guide for usage](#tailwindsjs-class-overview) * [Learn More](#justification) * [Caveats](#caveats) * [Contributing](#contributing) ## Installation From the root of your Node project: ```bash npm install tailwindsjs ``` Or simply copy/paste the contents of `src/vanilla_code.js` to wherever you deem necessary. ## Usage STEP 1. [Install](#installation) TailwindSJS as a package **or** copy/paste `src/vanilla_code.js` into your files STEP 2. Examine this example: Your example component that needs animation: ```html <!-- Enabled: "bg-indigo-600", Not Enabled: "bg-gray-200" --> <button type="button" class="bg-gray-200 relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2" role="switch" aria-checked="false"> <span class="sr-only">Use setting</span> <!-- Enabled: "translate-x-5", Not Enabled: "translate-x-0" --> <span aria-hidden="true" class="translate-x-0 pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span> </button> ``` STEP 3 to 7. Your component after adding TailwindSJS classes: ```html <!-- STEP 3. Add an identifier to your element. In this example, we call it '[unique]' With the prefix we get 'group-anim:[unique]' --> <!-- STEP 4. Add the type of interaction that triggers the animation. In this example, we want to trigger from a click, so we call it 'group-anim-click:[unique]' The 'group-anim-click:' tells us we want to trigger from a click, and '[unique]' associates that click with the '[unique]' animation group. --> <!-- STEP 5. Add the class for where the animation transitions from, this will typically be its default state, for our example it is 'bg-gray-200' so we use the class 'from-anim:bg-gray-200' --> <!-- STEP 6. Then we add what we animate to! Here, we take it to a brighter color, 'to-anim:bg-indigo-600' --> <button type="button" class="group-anim-click:[unique] group-anim:[unique] from-anim:bg-gray-200 to-anim:bg-indigo-600 bg-gray-200 relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2" role="switch" aria-checked="false"> <span class="sr-only">Use setting</span> <!-- STEP 7. Finally, add any additional animations to applicable elements. Remember to identify them with your '[unique]' animation group, along with your from/to rules. --> <span aria-hidden="true" class="group-anim:[unique] from-anim:translate-x-0 to-anim:translate-x-5 translate-x-0 pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span> </button> ``` ## TailwindSJS Class Overview #### Unique Identifiers To prevent unexpected visual bugs, you will need to make a unique identifier to keep your animations scoped to exactly the element you want animated. When defining our identifier, it is considered best practice to wrap it in square brackets to maintain the visual indication of an arbitrary definition. That way, it is clear to any TailwindCSS developer that the identifier was an arbitrary hand-written value. Example 1. `group-anim:[happy22]` Example 1. `group-anim-click:[happy22]` #### Animation Grouping ##### `group-anim:[unique-identifier]` `group-anim:` prefix indicates that our element is going to be animated and is part of a group that will be animated upon its triggering. See [Animation Actions](#animation-actions) for how to trigger the animation. Our hope is to match Tailwind's approach of triggering multiple animations. On Tailwind's hover, for example, it has the `group-` prefix to classes. For example, `group-hover:` See: [https://tailwindcss.com/docs/hover-focus-and-other-states#styling-based-on-parent-state](https://tailwindcss.com/docs/hover-focus-and-other-states#styling-based-on-parent-state) #### Animation Actions ##### `group-anim-[action]:[unique-identifier]` With this class, we are telling our Simple JavaScript what type of interaction triggers the animation. Use this class only once per group and use it on the element that is going to trigger the animation based on user interaction. Currently supported triggers: 1. click `group-anim-click:` 2. mouseover `group-anim-mouseover:` 3. mouseout `group-anim-mouseout:` #### Animating to and from different styles For to/from, we loosely emulate TailwindCSS syntax which can be seen in gradient stops: [https://tailwindcss.com/docs/gradient-color-stops](https://tailwindcss.com/docs/gradient-color-stops) ##### `from-anim:` and `to-anim:` In general, virtually all TailwindCSS classes are supported. Example: ``` from-anim:bg-gray-200 to-anim:bg-indigo-600 ``` #### Completed Example ```html <button type="button" class="group-anim-click:[unique] group-anim:[unique] from-anim:bg-gray-200 to-anim:bg-indigo-600 bg-gray-200 relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2" role="switch" aria-checked="false"> <span class="sr-only">Use setting</span> <span aria-hidden="true" class="group-anim:[unique] from-anim:translate-x-0 to-anim:translate-x-5 translate-x-0 pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span> </button> ``` ## Justification The folks at TailwindUI don't want to assume your JS implementation. If you're not super into using Vue or React, this package provides a vanilla JS implementation. Bundle it in your front-end, or simply copy/paste `src/index.js` or `dist/tailwindsjs.js` for a minimized version into your bespoke front-end. As a happy accident of solving this problem for myself, it turns out that any TailwindCSS user can benefit from simplifying a wide range JS-related animation needs from their TailwindCSS-powered HTML pages. ## Caveat(s) * We don't assume your back-end. This is only for making animation implementation easier. ## Contributing Everyone is encouraged to help improve this project. Here are a few ways you can help: - [Report bugs](https://github.com/ianrandmckenzie/tailwindsjs/issues) - Fix bugs and [submit pull requests](https://github.com/ianrandmckenzie/tailwindsjs/pulls) - Write, clarify, or fix documentation - Suggest or add new features, here's some examples: - Add animation support for form submission - Fix Ian's grammar mistakes in this README - Add documentation for more complex examples - Add a test suite For security issues, send an email to the address on [this page](https://github.com/ianrandmckenzie).
TailwindSJS is a package for making it simple turn the animated TailwindUI components you purchased into actual animations using Tailwind-like syntax.
javascript,tailwindcss,tailwindui
2023-07-07T21:45:01Z
2023-07-28T19:05:27Z
null
1
0
13
1
1
5
null
MIT
JavaScript
Sattwikmaiti/CROSS-ORIGIN
master
### OPEN SOURCE STARTUP : CROSS ORIGIN ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/4dfef3aa-2705-48a0-a415-aa8c6297e822) Motivation : Connecting developers and students around the globe ,around the origin. We are working on the following features : 1) Job/internships section : Posting links of various oppurtunies ,by anyone on the database so that every students /developers stay updated . 2) Developer Hackathons/Oppurtunies 3) College Connect : connecting colleges of world ,giving details to students , making them aware of open college events .Helping students explore options on Colleges. 4) Google Earth connect : Connecting with students/developers around the globe using google earth/map 5) Chat rooms /Chat feature with peers with WebRTC for videocalling . 6) AI bot which will be your friend at times when you feel lonely and make you feel lighter during your dark times. As a developer ,we often face very frustrations and downs in life , but we dont have any one to share ... The AI trained will always be with you :) 7) Blog post feature with comments to showcase personal lives and achiements 8) Earn CROSS ORIGIN points ,and purchase our merchandise :) 9) Donation Section : A portal for supporting ngos ,donation camps and also reacreation purpose of earth If you like contribute in our open source project .. do fork it and make your PR :) https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/410e4b56-dde7-4de2-b122-96a733365932 ### Profile ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/ce826146-7e95-4061-90a7-d91434d7d115) ### Chat Section ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/262cc50a-6058-494a-a21c-409750115a37) ### Google Globe ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/b4f6694a-beea-45fa-aead-080a3f12744f) ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/6b6de080-c19c-4ffb-aa59-8ab322172041) ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/8fe336a5-8c20-4b8b-8d5a-79c91dee231d) ### Hackathon Websites ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/cd82326f-0ea4-4a00-b618-17f7b9c0da31) ### AI friend ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/9fb2f95b-58c5-41bb-b4c6-3868c27242ee) ### JOB section ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/2f7f69d0-9b68-488a-a48d-b4af31e16308) ### College section ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/b10147f9-a146-4bee-9645-f9abc4452ed7) ![image](https://github.com/Sattwikmaiti/CROSS-ORIGIN/assets/90182231/fe6251f5-54ae-4fa0-bcb8-e1b75040cdac)
Our platform offers a wide range of opportunities for students and developers, including job/internship listings, developer hackathons, college event information, global connections via Google Earth, chat rooms with peers, an AI bot for emotional support, blog posts with comments, and the ability to earn points and contribute to open-source project
express-js,firebase-auth,mongodb,node,openai,opensource,reactjs,text-to-speech,gsap-animation,react-animations
2023-07-08T04:33:44Z
2023-07-23T06:12:44Z
null
1
0
19
0
1
5
null
null
JavaScript
Pur-Labs/purgpt.js
master
null
Official package for PurGPT.
ai,anthropic,api,chatbot,claude,gpt,image,javascript,js,library
2023-07-12T11:55:00Z
2023-08-12T10:20:39Z
null
7
2
18
0
0
5
null
NOASSERTION
TypeScript
azzzrro/Netflix_clone_react
main
# 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. ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/). ### Code Splitting This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) ### Analyzing the Bundle Size This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) ### Making a Progressive Web App This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) ### Advanced Configuration This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) ### Deployment This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) ### `npm run build` fails to minify This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
This repository contains Netflix-like web application built with React. Offers real-time content updates, ensuring that users always have access to the latest movies and TV shows. Includes a built-in YouTube integration that allows users to watch trailers and videos related to the content.
bootstrap,css,javascript,react,reactjs-es6
2023-07-10T09:42:20Z
2023-07-11T14:40:21Z
null
1
0
4
0
0
5
null
null
JavaScript
AhmetFurkanDEMIR/SoftForRange-Website
main
![](https://img.shields.io/badge/Oracle-F80000?style=for-the-badge&logo=oracle&logoColor=black) ![](https://img.shields.io/badge/Cloudflare-F38020?style=for-the-badge&logo=Cloudflare&logoColor=white) ![](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue) ![](https://img.shields.io/badge/Flask-000000?style=for-the-badge&logo=flask&logoColor=white) ![](https://img.shields.io/badge/HTML5-E34F26?style=for-the-badge&logo=html5&logoColor=white) ![](https://img.shields.io/badge/CSS3-1572B6?style=for-the-badge&logo=css3&logoColor=white) ![](https://img.shields.io/badge/JavaScript-323330?style=for-the-badge&logo=javascript&logoColor=F7DF1E) ![](https://img.shields.io/badge/jQuery-0769AD?style=for-the-badge&logo=jquery&logoColor=white) # [SoftForRange Website](https://softforrange.ahmetfurkandemir.com/)
SoftForRange Website
bootstrap5,cloudflare,css,flask,html5,javascript,js,oracle-cloud,python,smtp
2023-07-03T08:22:20Z
2023-07-03T08:33:26Z
null
1
0
3
0
0
5
null
MIT
CSS
MuhdHanish/Otp-Sender-Package
main
null
Node OTP Sender is a lightweight npm package for generating and sending one-time passwords (OTPs) via email using Nodemailer. It provides a simple and easy-to-use API for integrating OTP functionality into your Node.js applications.
nodejs,nodemailer,npm-package,otp-verification,html,javascript,node-package-manager,otp-generator,package,security
2023-07-08T16:15:37Z
2023-09-24T16:58:27Z
null
2
1
26
0
2
5
null
MIT
JavaScript
Defaultik/file_explorer
main
# file_explorer ## in developing a very simple php file explorer with simple design and basic functionality ![alt-text](https://i.imgur.com/Rb00UAQ.png)
a very simple php file explorer
css,file-explorer,html,javascript,php,server,web
2023-07-19T10:22:35Z
2023-07-31T13:27:52Z
null
1
0
8
0
1
5
null
null
PHP
shixuanhong/kuaio
main
# Kuaio A modern shortcut JavaScript library. **Note: This library is under development, please do not use it in a production environment.**
A modern shortcut JavaScript library.
javascript,modern-browser,shortcut
2023-07-15T13:30:16Z
2024-05-23T16:00:03Z
null
1
0
25
0
0
5
null
MIT
JavaScript
Glorycs29/All-Projects
main
# All-Projects Links to all projects # [![RainDance](https://github.com/Glorycs29/My_Learnings/blob/main/rain_dance.gif)]() Things will be updated soon........
Links of all projects
backend,bootstrap5,css3,extension-chrome,front-end-development,html5,javascript,nodejs,npm-module,collaborate
2023-07-14T11:04:05Z
2023-10-05T08:09:29Z
null
1
3
45
3
3
5
null
MIT
C++
Bistu-OSSDT-2023/22-enPacman
main
ERROR: type should be string, got "\r\nhttps://github.com/Bistu-OSSDT-2023/22-enPacman/assets/114382806/492d5460-e140-402b-9e01-d33dd9ed8cc5\r\n\r\n# Pacman 吃豆游戏\r\n\r\n- 项目演示(DEMO)地址:[https://bistu-ossdt-2023.github.io/22-enPacman/]\r\n\r\n## 目录\r\n\r\n- [版权](#版权)\r\n- [功能](#功能)\r\n- [功能具体代码](#功能具体代码)\r\n- [开发人员](#开发人员)\r\n\r\n### 版权\r\n本游戏开源代码来自于 [passer-by.com](https://passer-by.com/) ,本项目团队在其基础上进行开发\r\n\r\n## 版权\r\n\r\n本游戏开源代码来自于 [passer-by.com](https://passer-by.com/) ,本项目团队在其基础上进行开发。\r\n\r\n## 功能\r\n\r\n- [x] 地图绘制\r\n- [x] 玩家控制\r\n- [x] NPC根据玩家坐标实时自动寻径\r\n- [x] 吃豆积分系统\r\n- [x] 进攻豆功能\r\n- [x] 减速豆功能\r\n- [x] 回家豆功能 \r\n- [x] 多关卡(共12关)\r\n- [x] 特殊物品记分\r\n- [x] 特殊音效设置\r\n- [x] 地图美化设置\r\n\r\n## 功能具体代码\r\n\r\n### 减速豆功能\r\n\r\n```js\r\n// 如果有减速道具,进行绘制 \r\nif (config['slow'][i + ',' + j]) {\r\n context.beginPath(); // 表示开始一个新的路径,用于定义绘制的形状\r\n context.arc(pos.x, pos.y, 5 + this.times % 2, 0, 2 * Math.PI, true);\r\n context.fillStyle = \"#FFB6C1\"; // 并进行颜色的填充\r\n context.fill(); // 圆形区域的颜色填充\r\n context.closePath(); // 结束当前路径\r\n}\r\n```\r\n\r\n### 回家豆功能\r\n\r\n```js\r\n// 如果有回家道具,进行绘制\r\nif (config['go home'][i + ',' + j]) {\r\n context.beginPath(); // 表示开始一个新的路径,用于定义绘制的形状\r\n context.arc(pos.x, pos.y, 5 + this.times % 2, 0, 2 * Math.PI, true);\r\n context.fillStyle = \"#FFA500\"; // 并进行颜色的填充\r\n context.fill(); // 圆形区域的颜色填充\r\n context.closePath(); // 结束当前路径\r\n}\r\n```\r\n\r\n### 特殊音效功能\r\n\r\n```js\r\n//创建背景音乐\r\n var bgm = new Audio('bgm.mp3');\r\n //音乐播放器\r\n var bgms = [];\r\n var loop = function () {\r\n bgms.push(bgm.play());\r\n if (bgms.length === 5) bgms.shift();\r\n setTimeout(loop, 500);\r\n }\r\n loop();\r\n //游戏主程序\r\n (function () {\r\n _COIGIG.forEach(function (config, index) {\r\n var stage, map, beans, items, player;\r\n var winSound = new Audio(\"win.mp3\"); //胜利音效\r\n stage = game.createStage({\r\n update: function () {\r\n var stage = this;\r\n if (stage.status == 1) {\r\n //场景正常运行\r\n items.forEach(function (item) {\r\n if (\r\n map &&\r\n !map.get(item.coord.x, item.coord.y) &&\r\n !map.get(player.coord.x, player.coord.y)\r\n ) {\r\n var dx = item.x - player.x;\r\n var dy = item.y - player.y;\r\n if (dx * dx + dy * dy < 750 && item.status != 4) {\r\n //物体检测\r\n if (item.status == 3) {\r\n item.status = 4;\r\n _SCORE += 10;\r\n } else {\r\n stage.status = 3;\r\n stage.timeout = 30;\r\n }\r\n }\r\n }\r\n });\r\n if (JSON.stringify(beans.data).indexOf(0) < 0) {\r\n //当没有物品的时候,进入下一关\r\n winSound.play(); //播放胜利音效\r\n game.nextStage();\r\n }\r\n } else if (stage.status == 3) {\r\n //场景临时状态\r\n if (!stage.timeout) {\r\n _LIFE--;\r\n if (_LIFE) {\r\n stage.resetItems();\r\n } else {\r\n var stages = game.getStages();\r\n game.setStage(stages.length - 1);\r\n return false;\r\n }\r\n }\r\n }\r\n },\r\n });\r\n //主角\r\n player = stage.createItem({\r\n width: 30,\r\n height: 30,\r\n type: 1,\r\n location: map,\r\n eatSound: new Audio(\"eat.mp3\"),\r\n dieSound: new Audio(\"death.mp3\"),\r\n coord: { x: 13.5, y: 23 },\r\n orientation: 2,\r\n speed: 2,\r\n frames: 10,\r\n update: function () {\r\n var coord = this.coord;\r\n if (!coord.offset) {\r\n if (typeof this.control.orientation != \"undefined\") {\r\n if (\r\n !map.get(\r\n coord.x + _COS[this.control.orientation],\r\n coord.y + _SIN[this.control.orientation]\r\n )\r\n ) {\r\n this.orientation = this.control.orientation;\r\n }\r\n }\r\n this.control = {};\r\n var value = map.get(\r\n coord.x + _COS[this.orientation],\r\n coord.y + _SIN[this.orientation]\r\n );\r\n if (value == 0) {\r\n this.x += this.speed * _COS[this.orientation];\r\n this.y += this.speed * _SIN[this.orientation];\r\n } else if (value < 0) {\r\n this.x -= map.size * (map.x_length - 1) * _COS[this.orientation];\r\n this.y -= map.size * (map.y_length - 1) * _SIN[this.orientation];\r\n }\r\n } else {\r\n if (!beans.get(this.coord.x, this.coord.y)) {\r\n //吃豆\r\n _SCORE++;\r\n beans.set(this.coord.x, this.coord.y, 1);\r\n this.eatSound.play(); // 添加音效\r\n if (config[\"goods\"][this.coord.x + \",\" + this.coord.y]) {\r\n //吃到能量豆\r\n this.eatSound.play(); // 添加音效\r\n items.forEach(function (item) {\r\n if (item.status == 1 || item.status == 3) {\r\n //如果NPC为正常状态,则置为临时状态\r\n item.timeout = 450;\r\n item.status = 3;\r\n }\r\n });\r\n }\r\n```\r\n\r\n## 开发人员\r\n#遇到问题可联系\r\n\r\n| 用户名 | 邮箱 |\r\n| ---------------- | ---------------------------- |\r\n| gongChengYuan-30 | 3216158096@qq.com |\r\n| kittleyu | dxyu1117@126.com |\r\n| Gj1102 | 2022011167@bistu.edu.cn |\r\n| Yujia040528 | 2022011173@bistu.edu.cn |\r\n| W-71 | WangNinghahaha@Outlook.com |\r\n"
enPacman
canvas,html,html5-game,javascript,javascript-game,enpacman
2023-07-03T07:15:11Z
2023-07-06T12:39:59Z
null
5
1
63
0
1
5
null
MIT
JavaScript
Alok-2002/ToDo_Express
main
# ToDo_Express - Task Management Web App ![image](https://github.com/Alok-2002/ToDo_Express/assets/93814546/c707f250-d687-4a3b-869a-64be2eb18fdb) Welcome to ToDo_Express, a powerful and user-friendly web application designed to help you manage your tasks with ease. This app is built using HTML, CSS, and JavaScript, providing a seamless and efficient experience for organizing your to-do list. You can access the deployed version of the app at [To Do Express](https://to-doexpress.vercel.app). ## Key Features - **Easy Task Management:** Add, edit, and delete tasks effortlessly to keep your to-do list up to date. - **Task Completion:** Mark tasks as completed to track your progress and stay motivated. - **Priority Management:** Prioritize your tasks by dragging and dropping them to ensure the most important ones are at the top. - **Intuitive Interface:** The app boasts a clean and intuitive user interface for a smooth task management experience. ## Live Demo Curious to see ToDo_Express in action? Try the live demo by visiting [ToDo_Express](https://to-doexpress.vercel.app). ## Installation If you want to run ToDo_Express locally on your machine, follow these simple steps: 1. Clone the repository: `git clone https://github.com/Alok-2002/ToDo_Express.git` 2. Navigate to the project directory: `cd ToDo_Express` 3. Open the `index.html` file in your web browser. ## Screenshots Take a sneak peek at the app's interface through these screenshots: ![image](https://github.com/Alok-2002/ToDo_Express/assets/93814546/d8ca19f3-4417-4ce0-990f-46c1b0aec493) ![image](https://github.com/Alok-2002/ToDo_Express/assets/93814546/c707f250-d687-4a3b-869a-64be2eb18fdb) ## Contributions We welcome contributions from the community to enhance ToDo_Express. If you have any ideas or improvements, follow these steps: 1. Fork the repository. 2. Create a new branch: `git checkout -b my-new-feature`. 3. Implement your changes and commit them: `git commit -m 'Add some feature'`. 4. Push to the branch: `git push origin my-new-feature`. 5. Submit a pull request with a detailed description of your changes. ## License ToDo_Express is released under the [MIT License](https://opensource.org/licenses/MIT). ## Acknowledgments We extend our gratitude to the creators of [SortableJS](https://sortablejs.github.io/Sortable/) for their drag-and-drop library. Special thanks to [Vercel](https://vercel.com/) for providing hosting support. ## Contact For any questions, suggestions, or just to say hi, feel free to reach out to us at [sharmaalok02gwl@gmail.com](mailto:sharmaalok02gwl@gmail.com). Start managing your tasks efficiently with ToDo_Express! Thank you for using our app.
Welcome to ToDo_Express, a powerful and user-friendly web application designed to help you manage your tasks with ease. This app is built using HTML, CSS, and JavaScript, providing a seamless and efficient experience for organizing your to-do list. You can access the deployed version of the app at To Do Express.
alok,alok-2002,alok-sharma,css,git,github,html,html-css-javascript,javascript,sharma
2023-07-14T15:01:50Z
2023-07-29T17:03:48Z
null
1
0
15
0
0
5
null
MIT
JavaScript
es-shims/Promise.withResolvers
main
# promise.withresolvers <sup>[![Version Badge][npm-version-svg]][package-url]</sup> [![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] [![npm badge][npm-badge-png]][package-url] ES proposal spec-compliant shim for Promise.withResolvers. Invoke its "shim" method to shim `Promise.withResolvers` if it is unavailable or noncompliant. **Note**: a global `Promise` must already exist: the [es6-shim](https://github.com/es-shims/es6-shim) is recommended. This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment that has `Promise` available globally, and complies with the [spec](https://tc39.es/proposal-promise-with-resolvers/). Most common usage: ```js var assert = require('assert'); var withResolvers = require('promise.withresolvers'); var obj = withResolvers(Promise); assert.equal(obj.promise instanceof Promise, true); assert.equal(typeof obj.resolve, 'function'); assert.equal(typeof obj.reject, 'function'); withResolvers.shim(); // will be a no-op if not needed var obj2 = Promise.withResolvers(); assert.equal(obj2.promise instanceof Promise, true); assert.equal(typeof obj2.resolve, 'function'); assert.equal(typeof obj2.reject, 'function'); ``` ## Tests Simply clone the repo, `npm install`, and run `npm test` [package-url]: https://npmjs.com/package/promise.withresolvers [npm-version-svg]: https://versionbadg.es/es-shims/Promise.withResolvers.svg [deps-svg]: https://david-dm.org/es-shims/Promise.withResolvers.svg [deps-url]: https://david-dm.org/es-shims/Promise.withResolvers [dev-deps-svg]: https://david-dm.org/es-shims/Promise.withResolvers/dev-status.svg [dev-deps-url]: https://david-dm.org/es-shims/Promise.withResolvers#info=devDependencies [npm-badge-png]: https://nodei.co/npm/promise.withresolvers.png?downloads=true&stars=true [license-image]: https://img.shields.io/npm/l/promise.withresolvers.svg [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/promise.withresolvers.svg [downloads-url]: https://npm-stat.com/charts.html?package=promise.withresolvers [codecov-image]: https://codecov.io/gh/es-shims/Promise.withResolvers/branch/main/graphs/badge.svg [codecov-url]: https://app.codecov.io/gh/es-shims/Promise.withResolvers/ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Promise.withResolvers [actions-url]: https://github.com/es-shims/Promise.withResolvers/actions
ES Proposal spec-compliant shim for Promise.withResolvers
defer,deferred,ecmascript,es-shims,javascript,polyfill,promise,shim,withresolvers
2023-07-11T14:07:08Z
2024-03-22T21:59:18Z
null
2
0
19
1
0
5
null
MIT
JavaScript
azzzrro/React-OLX-clone
main
# 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: ### `yarn start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. ### `yarn 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. ### `yarn 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. ### `yarn 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. ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/). ### Code Splitting This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) ### Analyzing the Bundle Size This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) ### Making a Progressive Web App This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) ### Advanced Configuration This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) ### Deployment This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) ### `yarn build` fails to minify This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
This repository showcases a fantastic application built with React, inspired by the popular online marketplace, OLX. Key features are user Authentication, post Management, and firebase Integration for database management.
css,firebase,html,javascript,jsx,react
2023-07-15T07:44:56Z
2023-07-15T07:49:33Z
null
2
0
11
0
0
5
null
null
JavaScript
MuhdHanish/Give-Gobble-Server
main
null
Give and Gobble is a powerful food donation app that aims to bridge the gap between food surplus and those in need. Made with node,express,mongodb and typescript.
clean-architecture,donation-campaign,expressjs,flutter,javascript,mongodb,mongoose,nodejs,rest-api,typescript
2023-07-10T05:13:23Z
2023-12-12T12:43:52Z
null
1
0
67
0
1
5
null
null
TypeScript
LeonKohli/interactive-particle-network
main
# ✨ Interactive Particle Network 🚀🌌 <p align="center"> <a href="https://github.com/LeonKohli/interactive-particle-network"> <img src="https://img.shields.io/github/last-commit/LeonKohli/interactive-particle-network" alt="GitHub last commit"> </a> <a href="https://github.com/LeonKohli/interactive-particle-network/stargazers"> <img src="https://img.shields.io/github/stars/LeonKohli/interactive-particle-network" alt="GitHub stars"> </a> <a href="https://github.com/LeonKohli/interactive-particle-network/issues"> <img src="https://img.shields.io/github/issues/LeonKohli/interactive-particle-network" alt="GitHub issues"> </a> <a href="https://github.com/LeonKohli/interactive-particle-network/blob/main/LICENSE"> <img src="https://img.shields.io/github/license/LeonKohli/interactive-particle-network" alt="License"> </a> </p> 🌌 **Welcome to the Interactive Starry Background**! This project transforms your browser into a universe, complete with a dynamically evolving star field. Explore constellations that shift and interconnect as your cursor moves - an interactive, ever-changing celestial spectacle. 🌠 ## ⚡ Live Demo Experience the interactive starry background [here](https://codepen.io/LeonKohli/pen/poQKLOL). <p align="center"> <img src="https://github.com/LeonKohli/interactive-particle-network/assets/98176333/ac7b59d7-8dfb-4290-88ec-632fd9348170" alt="demo"> </p> ## 🌟 Features - **👐 Interactive**: The stars are at your command. Move your cursor and witness constellations form and follow! - **🎲 Dynamically Generated**: Every refresh greets you with a unique constellation pattern. - **📐 Responsive**: Perfectly adapts to any window size for a seamless visual experience. - **🔨 Pure JavaScript**: No dependencies. Just plain JavaScript. ## 🚀 Getting Started 1. Clone the repository: ```sh git clone https://github.com/LeonKohli/interactive-particle-network.git ``` 2. Open the `index.html` file in your web browser. ## 🛠️ Usage Feel free to incorporate this interactive background into your own projects. Whether it's a personal portfolio, an online store, or a blog, our starry sky will fit right in. Don't forget to give credit where it's due! ## ⚙️ Customize Your Universe **Interactive Particle Network** is not just a starry background, it's _your_ starry background. With numerous customization options, you can tweak the universe to match your mood or project's theme: <details> <summary><strong>🌟 Configuration Options</strong></summary> - `numberOfStars`: Set the number of stars in your sky. - `maxDistance`: Maximum distance for a star connection. - `starSize`: Range of possible star sizes. - `speedFactor`: Speed at which stars move around the canvas. - `mouseRadius`: Area around the mouse where stars will attempt to form connections. - `starColor`: Color of the stars. - `connectionColor`: Color of the lines that connect stars. - `canvasBackgroundColor`: Background color of your canvas. - `lineThickness`: Thickness of the connection lines. - `starShapes`: Shapes of the stars - 'circle' or 'star'. - `randomStarSpeeds`: Set this to true for stars moving at random speeds. - `rotationSpeed`: Range of possible rotation speeds for star-shaped stars. - `connectionsWhenNoMouse`: Set this to true to form star connections without mouse interference. - `percentStarsConnecting`: Percentage of stars that can connect when the mouse is not on the canvas. - `connectionLinesDashed`: Set this to true for dashed connection lines. - `dashedLinesConfig`: Configuration for the dashed lines. - `canvasGradient`: Add a gradient for the canvas background. - `starDensity`: Density of the stars - 'low', 'medium', 'high', or 'ultra'. </details> By customizing these options, you can create a truly unique and stunning celestial spectacle! 💫 ## 🎨 Predefined Configurations <p align="center"> <a href="./examples.md#starry-night">Starry Night</a> • <a href="./examples.md#astral-serenity">Astral Serenity</a> • <a href="./examples.md#nebula-burst">Nebula Burst</a> • <a href="./examples.md#cosmic-web">Cosmic Web</a> • <a href="./examples.md#galactic-symphony">Galactic Symphony</a> • <a href="./examples.md#celestial-dream">Celestial Dream</a> • <a href="./examples.md#quantum-realm">Quantum Realm</a> • <a href="./examples.md#eternal-twilight">Eternal Twilight</a> • <a href="./examples.md#alien-encounter">Alien Encounter</a> • <a href="./examples.md#cybernetic-circuit">Cybernetic Circuit</a> </p> Too many options? Jumpstart your journey with our predefined configurations. ## 📄 License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## 👥 Contributing We welcome all contributions! If you're interested in enhancing our universe, please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to submit pull requests.
Interactive Starry Background: An immersive, dynamic starfield experience for your web project. Powered by vanilla JavaScript, perfect for engaging user interfaces.
html,javascript,star,ui,ux
2023-07-20T15:19:54Z
2023-08-06T17:26:37Z
null
1
0
37
0
0
5
null
MIT
JavaScript
WBBB0730/Steam
main
# Steam 仿写 本项目为仿写 Steam 网页版,采用前后端分离模式,前端使用Vue3框架,后端使用SpringBoot框架 已完成功能:全局顶部导航栏、商城首页(部分)、注册/登录/注销、愿望单、游戏详情、个人资料、好友系统、聊天系统; 待完成功能:搜索结果、游戏评测 ## 在线演示:[Steam](http://wbbb.plus/steam) ## 技术细节 ### 前端: 已完成: * 使用 Vue Router 进行路由管理 * 使用 Vuex 进行状态管理(如登录状态、当前路由) * 封装了 Axios 的 request 方法,配置了请求拦截器和响应拦截器 * 使用 WebSocket 以及一套简单的消息规范(身份验证、获取好友列表、获取聊天记录、发送消息、已读、好友上/下线等),实现聊天系统 * 实现了愿望单的拖拽排序,以及优雅的拖拽动画 * 封装了开箱即用的 showModal 方法、轮播图组件、分页器组件 * 在 sort.js 中封装了快速排序、二分插入等常用排序算法 * 自定义 v-loading 指令用于播放加载动画,v-trunc 指令用于自动截断多行文本 * 自定义 v-lazy 指令,实现图片懒加载;封装 debounce 防抖函数,用于实时搜索 待完成: * 封装文本编辑器组件,用于撰写评测 ### 后端 已完成: * 使用 SpringBoot 处理 HTTP 请求 * 使用 SpringDataJPA + MySQL 进行数据库的建表以及增、删、改、查 * 使用 SpringBootStarterWebSocket 搭建 WebSocket 服务,实现聊天系统 * 使用 JJWT 库进行 Token 的生成和解析 * 使用全局异常处理器捕获并处理请求异常和服务器异常;使用 @Configuration 配置全局允许跨域 * 封装了通用响应体、常用状态码等 待完成: * 使用全局拦截器进行身份校验 * 搭建图床,实现图片上传
本项目为仿写 Steam 网页版,采用前后端分离模式,前端使用Vue3框架,后端使用SpringBoot框架
java,javascript,spring-boot,spring-data-jpa,vue3
2023-07-20T07:59:38Z
2023-08-18T04:39:59Z
null
1
0
12
0
0
5
null
null
Vue
iliazeus/js-disposable-demo
master
# js-disposable-demo a demonstration of JavaScript's new Explicit Resource Management feature https://habr.com/ru/companies/ruvds/articles/745904/ https://iliazeus.github.io/articles/js-explicit-resource-management-ru/
a demonstration of JavaScript's new Explicit Resource Management feature
disposable,javascript,typescript,disposable-stack
2023-07-03T18:56:13Z
2023-09-18T08:47:31Z
null
1
0
16
0
0
5
null
MIT
TypeScript
devgaab/proj-selec-personagem-demon-slayers
main
<h1 align="center">Seleção de Personagens - Demon Slayers</h1> <p align="center"> <a href="#-tecnologias">Tecnologias</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; <a href="#-projeto">Projeto</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; <a href="#-funcionalidades">Funcionalidades</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p> <br> <p align="center"> <img alt="projeto Portfólio" src=".github/preview-cover.jpg" width="100%"> </p> ### 💻 Projeto Um projeto de seleção de personagens que aprendi em um evento chamado "Do Zero ao Programador Contratado" - Dev em Dobro. - [Acesse o projeto finalizado, online](https://devgaab.github.io/proj-selec-personagem-demon-slayers/) ### 🚀 Tecnologias Esse projeto foi desenvolvido com as seguintes tecnologias: - HTML e CSS - JavaScript - Git e Github ### ⚙ Funcionalidades - Projeto responsivo - Interatividade: Ao passar o mouse sobre o card do personagem o nome e a descrição é alterado junto com a imagem principal do personagem selecionado. ---
Esse é um projeto de seleção de personagem utilizando HTML, CSS e JavaScript.
css,flexbox,github,html5,javascript
2023-07-12T15:20:44Z
2024-01-15T03:27:38Z
null
1
0
7
0
0
5
null
null
HTML
illyabezpaliy13/Simple-Chocolate
main
<div> <h1 align="center">Simply Chocolate 🍫</h1> </div> <div><img align="right" width="300" src="./src/imgs/airproj.png" alt="Our logotype"></div> <div> <h2>Short description 🍁</h2> <h4>Small online store that sells premium chocolate. This project took us 1 month. Mostly, because of bugs. </h4> </div> <div> <h2>Technologies 📦 </h2> <div><h4>HTML, SASS, JavaScript, Parcel, Npm, NodeJs</h4> <h2>Libraries 🗂️</h2> <h4>Axios, Video.js, Swiper, Slick Slider, Intl Tel Input</h4> </div> </div> <div> <h2>Authors 💳</h2> <h4> <a href="https://github.com/0qsenxx">@0qsenxx (😏)</a>, <a href="https://github.com/m1xture"> @m1xture (😏) </a>, <a href="https://github.com/illyabezpaliy14"> @illyabezpaliy13 (☠️) </a> </h4> </div>
🍫🍫🍫🍫🍫
css,html,javascript,sass,scss
2023-07-18T16:11:51Z
2024-02-21T20:44:10Z
null
4
110
230
0
2
5
null
null
SCSS
skiniks/vsky
main
## 🪂 [vSky](https://vsky.social) [vSky](https://vsky.social) is an alternative client for [Bluesky](https://bsky.app) powered by Nuxt. It's currently in early development and is not ready for production use. ## License: [MIT](https://opensource.org/licenses/MIT) [![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
vSky is an alternative web client for Bluesky built with Nuxt
bluesky,bluesky-client,javascript,typescript,vuejs,nuxt,nuxtjs
2023-07-20T16:23:55Z
2023-09-01T19:44:10Z
null
1
1
33
0
0
5
null
null
Vue
prgrms-web-devcourse/FEDC4-JSAlgorithm-study
main
# FEDC4-JSAlgorithm-study ## 🕕 진행 시각 - `23.07.10 (월) ~ 23.12.05 (화)` - 문제 PR 마감: `매주 토요일 23:59:59` - 코드리뷰 마감: `매주 월요일 회의 전 17:59:59` ## 🥅 진행 목표 - 기업 코딩테스트에서 요구하는 알고리즘들을 익힌다. - 알고리즘들을 실전 문제에 적용하여 경험을 쌓는다. - 다양한 코드들을 리뷰해주면서 수많은 풀이법을 공부하여 시야를 확장시킨다. ## 🧐 진행 방법 - 매주 **월요일** 18:00시 스터디룸에서 회의를 가집니다. (약 15분 ~) - **프로그래머스 Lv.2, Lv.3에서 3 ~ 4문제들을 의논 후 선정합니다.** - 코드 리뷰한 사항에 대해 궁금한 점들이 있다면 회의시간에 모여 토론을 진행합니다. - 과제 문제는 주차가 진행될수록 난이도가 증가하며, 더 많은 알고리즘의 문제들이 제공됩니다. - 문제를 풀고 해당 주차에 PR을 제출합니다. 기한은 `월요일 ~ 토요일`입니다. - PR을 제출한 후, 본인이 리뷰해주어야 하는 다른 PR들을 리뷰해줍니다. 기한은 `월요일 ~ 차주 월요일`입니다. - 일정에 따라 유동적으로 조정될 수 있습니다. (과제가 있는 주, 프로젝트가 있는 주) ## 🤔 Github 이용 방법 1. repository를 `fork` 후, `clone`합니다. (초기 1회만) / 새로운 주차 폴더가 생겼을 경우 clone이 아닌 `pull` 또는 `fetch`을 진행합니다. 2. `fork`한 저장소의 각 주차에 해당되는 과제 폴더에 소스 코드를 `add`, `commit` 후 `push` 합니다. 파일명은 `이름`으로 합니다. ex) `최원석.js` (폴더명이 `1주차`의 `큰_수_찾기`일 경우 경로는 `1주차/큰_수_찾기/최원석.js`) 3. `origin:main`에서 `upstream:main`으로 PR을 보낸 후, code review를 기다립니다. PR 제목은 `[이름] O주차 과제 제출`로 합니다. ex) `[최원석] 2주차 과제 제출` ## 👥 팀원 | ![](https://github.com/juyeon-park.png?size=120) | ![](https://github.com/suehdn.png?size=120) | ![](https://github.com/bbearcookie.png?size=120) | ![](https://github.com/judahhh.png?size=120) | ![](https://github.com/sukvvon.png?size=120) | | :----------------------------------------------: | :-----------------------------------------: | :----------------------------------------------: | :------------------------------------------: | :------------------------------------------: | | [박주연](https://github.com/juyeon-park) | [안혜수](https://github.com/suehdn) | [이상훈](https://github.com/bbearcookie) | [주다현](https://github.com/judahhh) | [최원석](https://github.com/sukvvon) | ## 🙇🏻‍♂️ 참고 [GitHub - woowacourse-study/2022-lv3-algorithm-study: 2022 코딩테스트 대비용 BE 알고리즘 스터디](https://github.com/woowacourse-study/2022-lv3-algorithm-study)
null
algorithms,javascript
2023-07-10T06:29:04Z
2023-09-04T15:55:05Z
null
166
43
165
0
6
5
null
null
JavaScript
azzzrro/Awesome-React-To-do-List
master
# Getting Started with React To-Do App First Locate the project directory, and run the command: ### `npm install` This will install the necessary dependencies for the app.\ Once the installation is complete, you can proceed to run the app. 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. ## Screenshots ![App Screenshot](https://res.cloudinary.com/dmbpxal0o/image/upload/v1688795552/git/todo%20app/Screenshot_2023-07-08_111606_npna02.jpg) ![App Screenshot](https://res.cloudinary.com/dmbpxal0o/image/upload/v1688795553/git/todo%20app/Screenshot_2023-07-08_111701_sqlr1q.jpg) ![App Screenshot](https://res.cloudinary.com/dmbpxal0o/image/upload/v1688795552/git/todo%20app/Screenshot_2023-07-08_111734_nfoyrv.jpg) ![App Screenshot](https://res.cloudinary.com/dmbpxal0o/image/upload/v1688795552/git/todo%20app/Screenshot_2023-07-08_111758_zgilno.jpg) ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/). ### Code Splitting This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) ### Analyzing the Bundle Size This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) ### Making a Progressive Web App This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) ### Advanced Configuration This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) ### Deployment This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) ### `npm run build` fails to minify This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
Beautiful Todo App built with React - A visually appealing and feature-rich Todo application developed using React, offering an intuitive and seamless task management experience.
bootstrap,css,javascript,jsx,react
2023-07-08T04:53:29Z
2023-07-27T06:19:04Z
null
1
0
7
0
0
5
null
null
JavaScript
yasingunay/CS50x
main
![CS50Certificate!](CS50x-Certificate.png) # CS50x - 2023 [General Information](https://pll.harvard.edu/course/cs50-introduction-computer-science) [CS50: Introduction to Computer Science](https://cs50.harvard.edu/x/2023/) [CS50 Certificate](https://cs50.harvard.edu/x/2023/certificate/) ![first!](https://www.classcentral.com/report/wp-content/uploads/2022/05/cs50-2023-student-demo.png) ## Course description This is CS50x , Harvard University's introduction to the intellectual enterprises of computer science and the art of programming for majors and non-majors alike, with or without prior programming experience. An entry-level course taught by David J. Malan, CS50x teaches students how to think algorithmically and solve problems efficiently. Problem sets inspired by real-world domains of biology, cryptography, finance, forensics, and gaming. The on-campus version of CS50x , CS50, is Harvard's largest course. ## Topics Abstraction, algorithms, data structures, encapsulation, resource management, security, software engineering, and web development. ## Languages C, Python, SQL, JavaScript, CSS, HTML ## Objectives * A broad and robust understanding of computer science and programming * How to think algorithmically and solve programming problems efficiently * Concepts like abstraction, algorithms, data structures, encapsulation, resource management, security, software engineering, and web development * Familiarity with a number of languages, including C, Python, SQL, and JavaScript plus CSS and HTML * How to engage with a vibrant community of like-minded learners from all levels of experience * How to develop and present a final programming project to your peers ![50!](https://www.classcentral.com/report/wp-content/uploads/2022/05/cs50-2023-banner-e1673610020393.png) ## Practice Problems / Labs / Problem Sets [Week 1 - C](https://cs50.harvard.edu/x/2023/weeks/1/) * [Debug](https://cs50.harvard.edu/x/2023/problems/1/debug/) * [Half](https://cs50.harvard.edu/x/2023/problems/1/half/) * [Prime](https://cs50.harvard.edu/x/2023/problems/1/prime/) * [Population Growth](https://cs50.harvard.edu/x/2023/labs/1/) * [Hello](https://cs50.harvard.edu/x/2023/psets/1/hello/) * [Mario-less](https://cs50.harvard.edu/x/2023/psets/1/mario/less/) * [Mario-more](https://cs50.harvard.edu/x/2023/psets/1/mario/more/) * [Cash](https://cs50.harvard.edu/x/2023/psets/1/cash/) * [Credit](https://cs50.harvard.edu/x/2023/psets/1/credit/) [Week 2 - Arrays](https://cs50.harvard.edu/x/2023/weeks/2/) * [Hours](https://cs50.harvard.edu/x/2023/problems/2/hours/) * [N0 V0w3ls](https://cs50.harvard.edu/x/2023/problems/2/no-vowels/) * [Password](https://cs50.harvard.edu/x/2023/problems/2/password/) * [Scrabble](https://cs50.harvard.edu/x/2023/labs/2/) * [Readability](https://cs50.harvard.edu/x/2023/psets/2/readability/) * [Bulbs](https://cs50.harvard.edu/x/2023/psets/2/bulbs/) * [Caesar](https://cs50.harvard.edu/x/2023/psets/2/caesar/) * [Substitution](https://cs50.harvard.edu/x/2023/psets/2/substitution/) * [Wordle50](https://cs50.harvard.edu/x/2023/psets/2/wordle50/) [Week 3 - Algorithms](https://cs50.harvard.edu/x/2023/weeks/3/) * [Atoi](https://cs50.harvard.edu/x/2023/problems/3/atoi/) * [Average High Temperatures](https://cs50.harvard.edu/x/2023/problems/3/temps/) * [Max](https://cs50.harvard.edu/x/2023/problems/3/max/) * [Snackbar](https://cs50.harvard.edu/x/2023/problems/3/snackbar/) * [Sort](https://cs50.harvard.edu/x/2023/labs/3/) * [Plurality](https://cs50.harvard.edu/x/2023/psets/3/plurality/) * [Runoff](https://cs50.harvard.edu/x/2023/psets/3/runoff/) * [Tideman](https://cs50.harvard.edu/x/2023/psets/3/tideman/) [Week 4 - Memory](https://cs50.harvard.edu/x/2023/weeks/4/) * [Bottom Up](https://cs50.harvard.edu/x/2023/problems/4/bottomup/) * [License](https://cs50.harvard.edu/x/2023/problems/4/license/) * [Smiley](https://cs50.harvard.edu/x/2023/labs/4/smiley/) * [Volume](https://cs50.harvard.edu/x/2023/labs/4/volume/) * [Filter-less](https://cs50.harvard.edu/x/2023/psets/4/filter/less/#how-to-submit) * [Filter-more](https://cs50.harvard.edu/x/2023/psets/4/filter/more/#a-bitmap-more-technical) * [Recover](https://cs50.harvard.edu/x/2023/psets/4/recover/#background) * [Reverse](https://cs50.harvard.edu/x/2023/psets/4/reverse/) [Week 5 - Data Structures](https://cs50.harvard.edu/x/2023/weeks/5/) * [Trie](https://cs50.harvard.edu/x/2023/problems/5/trie/) * [Inheritance](https://cs50.harvard.edu/x/2023/labs/5/) * [Speller](https://cs50.harvard.edu/x/2023/psets/5/speller/) [Week 6 - Python](https://cs50.harvard.edu/x/2023/weeks/6/) * [Bank](https://cs50.harvard.edu/x/2023/problems/6/bank/) * [Figlet](https://cs50.harvard.edu/x/2023/problems/6/figlet/) * [Jar](https://cs50.harvard.edu/x/2023/problems/6/jar/) * [Seven Day Averages](https://cs50.harvard.edu/x/2023/problems/6/seven-day-average/) * [Taqueria](https://cs50.harvard.edu/x/2023/problems/6/taqueria/) * [World Cup](https://cs50.harvard.edu/x/2023/labs/6/) * [Hello](https://cs50.harvard.edu/x/2023/psets/6/hello/#hello) * [Mario-less](https://cs50.harvard.edu/x/2023/psets/6/mario/less/) * [Mario-more](https://cs50.harvard.edu/x/2023/psets/6/mario/more/) * [Cash](https://cs50.harvard.edu/x/2023/psets/6/cash/) * [Credit](https://cs50.harvard.edu/x/2023/psets/6/credit/) * [Readability](https://cs50.harvard.edu/x/2023/psets/6/readability/) * [DNA](https://cs50.harvard.edu/x/2023/psets/6/dna/#dna) [Week 7 - SQL](https://cs50.harvard.edu/x/2023/weeks/6/) * [Favorites](https://cs50.harvard.edu/x/2023/problems/7/favorites/#favorites) * [Hall of Prophecy](https://cs50.harvard.edu/x/2023/problems/7/prophecy/) * [Songs](https://cs50.harvard.edu/x/2023/labs/7/#how-to-submit) * [Movies](https://cs50.harvard.edu/x/2023/psets/7/movies/) * [Fiftyville](https://cs50.harvard.edu/x/2023/psets/7/fiftyville/) [Week 8 - HTML, CSS, JavaScript ](https://cs50.harvard.edu/x/2023/weeks/8/) * [Radio Shack Redo](https://cs50.harvard.edu/x/2023/problems/8/redo/) * [Trivia](https://cs50.harvard.edu/x/2023/labs/8/) * [Homepage](https://cs50.harvard.edu/x/2023/psets/8/homepage/#homepage) [Week 9 - Flask](https://cs50.harvard.edu/x/2023/weeks/9/) * [Hello, Flask](https://cs50.harvard.edu/x/2023/problems/9/helloflask/) * [Birthdays](https://cs50.harvard.edu/x/2023/labs/9/) * [C$50 Finance](https://cs50.harvard.edu/x/2023/psets/9/finance/) #### [Final Project](https://cs50.harvard.edu/x/2023/project/) - [MyLibrary](https://github.com/yasingunay/MyLibrary.git) ## Useful resources * [The best video series about Singly Linked List](https://www.youtube.com/playlist?list=PLBlnK6fEyqRi3-lvwLGzcaquOs5OBTCww) * [5 Simple Steps for Solving Any Recursive Problem](https://www.youtube.com/watch?v=ngCos392W4w&ab_channel=Reducible) * [Realloc](https://www.youtube.com/watch?v=z-MHVnhpf9w&t=2s&ab_channel=Log2Base2%C2%AE) * [Python Tutorial](https://www.w3schools.com/python/default.asp) * [Regular Expressions](https://regex101.com/) * [DB Browser for SQLite](https://sqlitebrowser.org/) * [SQL Keywords Reference](https://www.w3schools.com/sql/sql_ref_keywords.asp) * [Bootstrap](https://getbootstrap.com/) * [Documenting web technologies, including CSS, HTML, and JavaScript](https://developer.mozilla.org/en-US/) * [Markup Validation Service](https://validator.w3.org/#validate_by_input) ## Tips * Test your code with different inputs. check50 does not find some errors! ![50!](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*IYCifTCCR2ah-79u94Z3wg.png) *Please note that this repository is for storing my projects and files from Harvard University's CS50x course. It is not meant for sharing answers or encouraging academic dishonesty. If you are currently enrolled, please complete the assignments independently and refer to the course materials.*
This is CS50x , Harvard University's introduction to the intellectual enterprises of computer science and the art of programming for majors and non-majors alike, with or without prior programming experience. An entry-level course taught by David J. Malan, CS50x teaches students how to think algorithmically and solve problems efficiently.
algorithms,c,css,data-structures,html,javascript,python,sql,abstraction,encapsulation
2023-07-19T08:46:29Z
2023-09-02T17:33:52Z
null
1
0
254
0
8
5
null
null
C
itsmarmot/web
main
# personal portfolio web about me A portfolio website is a dynamic and visually appealing online platform that serves as a showcase of an individual's or a company's work, achievements, skills, and experiences. It's a digital portfolio that provides a comprehensive overview of what the creator or organization has to offer.
My Personal Portfolio Website ✨
css3,html5,javascript,personal-blog,portfolio-website
2023-07-20T03:26:11Z
2024-05-11T06:43:51Z
null
1
0
41
0
0
5
null
null
HTML