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
universal-org/fosstube-mobile
main
# fosstube-mobile A glossy online video sharing and social media platform for Android &amp; iOS. Getting Started bun install / pnpm install / yarn / npm install You can use any of the pkg manager listed above but we recommend using bun for faster realtime compile times. Components dir containers reusable components , if you want to upgrade them or modified them to give them a new look , first visit react native paper official doc then build it from there and summit a PR. Note : We do not accept PR from any other ui library. ### How to download FossTube for Android and iOS ? Currently, we have not uploaded FossTube to Play Store / Apple Store / F-Droid If you want to test our app then try building it from source ### Donate If you like this project, please consider donating so we can keep this project running forever! <a href="https://www.buymeacoffee.com/ksingh" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me a Coffee" height="28" width="119"></a> <a href="https://liberapay.com/ksingh" target="_blank"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg?style=for-the-badge" alt="Liberapay"></a> </div>
A glossy online video sharing and social media platform for Android & iOS.
expo,javascript,paper,react-native,typescript
2023-03-29T03:52:48Z
2023-12-18T22:57:35Z
null
1
0
10
0
1
2
null
AGPL-3.0
JavaScript
vdevcode/App-Water-Payment
master
null
Xây dựng app tính tiền nước cho nhà hàng Vua biển 68
localstorage,javascript
2023-03-30T12:51:16Z
2023-07-31T14:11:58Z
null
2
0
69
0
0
2
null
null
JavaScript
ivanovich18/Student-Enrollment-Web-Application
master
# Student Enrollment Web Application #### Description: It is a simple Python Flask web application that gathers student information and stores the inputted data into a SQLite database. Only the admin of the program can access the web application. ### Technologies used: - HTML - CSS - Bootstrap - JavaScript - Flask - SQLite3 ### Preview: 1. Login ![image](https://user-images.githubusercontent.com/88656474/230842388-06c19c71-49f5-4848-9ee1-d37475df27af.png) 2. Registration ![image](https://user-images.githubusercontent.com/88656474/230842465-657a3223-a5e1-4abe-a3d7-2f64574fa2ee.png) 3. Records ![image](https://user-images.githubusercontent.com/88656474/230842529-c8ef51f9-cbcc-42a7-a021-6c814233ec4e.png) ### Link: It is currently on a production server using Python Flask's ``` flask run ``` command.
A Flask web application for storing student information into a SQLite database.
css,flask-application,html,javascript,sqlite3
2023-03-31T12:40:00Z
2023-06-11T07:17:19Z
null
2
0
16
0
0
2
null
null
HTML
milos-pujic/cypress-cucumber-e2e-tests
main
# Cypress Cucumber E2E Testing Framework Cypress Cucumber E2E Testing Framework project represents a starting point for writing tests in Cypress with Cucumber. Provided tests are based on examples how to define and use utility functions, explicit wait for some element, usage of **faker** for generating random data and possible solutions for organizing tests using separated files with locators of the elements. ## IDE Setup - Install [Visual Studio Code](https://code.visualstudio.com/download) - _Recommended extensions in Visual Studio Code:_ - [Cucumber (Gherkin) Full Support](https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete) - [Cypress Helper](https://marketplace.visualstudio.com/items?itemName=shevtsov.vscode-cy-helper) - [ESLint](<https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint>) - [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) - [Local History](https://marketplace.visualstudio.com/items?itemName=xyz.local-history) - [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) - [Markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) - Install [Node JS](https://nodejs.org/en/download/) - Clone the repository to your local system - Open the project in Visual Studio Code and open the terminal - Make sure the path to the project is correct `<local_path>\cypress-cucumber-e2e-tests` - In the terminal, execute the following command: ```npm install``` - The command will install all found in the package.json ## Used Libraries - [Cypress Cucumber Preprocessor](https://github.com/badeball/cypress-cucumber-preprocessor) - [Faker JS](https://github.com/faker-js/faker) - [Sorry-Cypress](https://docs.sorry-cypress.dev/) and [cypress-cloud](https://github.com/currents-dev/cypress-cloud) - [Prettier](https://prettier.io/) - [Husky](https://typicode.github.io/husky/#/) - [Lint Staged](https://github.com/okonet/lint-staged) ## Launch Cypress and Execute Test Cases Open the terminal inside `<local_path>\cypress-cucumber-e2e-tests` and use the following commands to: - Open the Cypress UI to execute test cases against default environment: ```npx cypress open``` - Execute all test cases without opening the Cypress UI against default environment: ```npx cypress run``` - Environment variables: - `ENV`, which can have value `prod` / `local` / `docker` / `kube` / `kubeLocal` , depending on which environment you would like to execute your tests (if not defined, `prod` will be used by default) - `prod` uses `https://automationintesting.online` as app URL - `local` uses `http://localhost` as app URL - `kubeLocal` uses `http://kube.local` as app URL - `docker` uses `http://rbp-proxy` as app URL - `kube` uses `http://rbp-proxy.restful-booker-platform` as app URL - `TAGS`, which can be any of available tags set in Cucumber features. If not set all scenarios will be executed. Tag expression is an infix boolean expression, some examples: - `@sanity` - Scenarios tagged with `@sanity` will be filtered - `@management and not @room-management` - Scenarios tagged with `@management` that are not also tagged with `@room-management` will be filtered - `@management and @room-management` - Scenarios tagged with both `@management` and `@room-management` will be filtered - `@booking or @contact` - Scenarios tagged with either `@booking` or `@contact` will be filtered - `(@booking or @contact) and (not @bug)` - Scenarios tagged with either `@booking` or `@contact` that are not also tagged with `@bug` will be filtered Example of above commands with possible variables: - `npx cypress open --env ENV=local` - Open Cypress UI to execute tests against Local environment - `npx cypress run --env ENV=prod` - Execute All tests without opening the Cypress UI against Production environment - `npx cypress run --spec "**/login.feature" --env ENV=local` - Execute Login feature without opening the Cypress UI on Local environment - `npx cypress run --env ENV=prod,TAGS='(@booking or @contact) and (not @bug)'` - Execute tests tagged with `@booking` or `@contact` which are not also tagged with `@bug`, without opening the Cypress UI on Production environment Some of predefined scripts in [`package.json`](/package.json) are doing same thing as commands above: - `npm run cy:open:local` or `npm run cy:open:prod` - Open Cypress UI to execute tests against Local or Production environment - `npm run cy:run:local` or `npm run cy:run:prod` - Execute All tests without opening the Cypress UI against Local or Production environment ## Local Docker Environment with Docker for Desktop >Before you proceed, you should install Docker Desktop depending on your OS and start it: > >- [Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/) >- [Docker Desktop for Mac](https://docs.docker.com/desktop/install/mac-install/) > >As Docker for Desktop is **paid** software now, instead of it you can set up and start minikube using bellow guides: > >- [Minikube Setup for Windows](/docs/minikube-setup-windows.md) >- [Minikube Setup for Mac](/docs/minikube-setup-mac.md) After Docker for Desktop, or minikube, has been installed on your machine, open the terminal inside `<local_path>\cypress-cucumber-e2e-tests` and use the following command: docker compose -f ./docker-compose-restful-booker.yml up -d That will start Restful Booker Platform locally. After everything is up and running you will have Restful Booker Platform available at: - Docker for Desktop: `http://localhost` - minikube: `http://kube.local` ## Local Kubernetes Environment with Minikube's Kubernetes >Before you proceed, you should set up and start minikube using bellow guides: > >- [Minikube Setup for Windows](/docs/minikube-setup-windows.md) >- [Minikube Setup for Mac](/docs/minikube-setup-mac.md) After minikube has been properly installed and started on your machine, open the terminal inside `<local_path>\cypress-cucumber-e2e-tests` and use the following command: kubectl apply -f .kube/restful-booker-platform.yml That will start Restful Booker Platform locally. After everything is up and running you will have Restful Booker Platform available at `http://kube.local`. ## Gherkin standards and rules ### Describing Features Every feature must only contain scenarios related to that it. When grouping scenarios under one feature make sure that `@Background` for that feature is common for all scenarios. If some feature is complex and there are different `@Background` for group them in multiple feature file. If you have problems describing feature you can use next template, known as a Feature Injection template: In order to <meet some goal> As a <type of stakeholder> I want <a feature> By starting with the goal or value that the feature provides, you’re making it explicit to everyone who ever works on this feature why they’re giving up their precious time. You’re also offering people an opportunity to think about other ways that the goal could be met. ### Writing Scenarios Using Given-When-Then in sequence is a great reminder for several great test design ideas. It suggests that pre-conditions and post-conditions need to be identified and separated. It suggests that the purpose of the test should be clearly communicated, and that each scenario should check one and only one thing. When there is only one action under test, people are forced to look beyond the mechanics of test execution and really identify a clear purpose. When used correctly, Given-When-Then helps teams design specifications and checks that are easy to understand and maintain. As tests will be focused on one particular action, they will be less brittle and easier to diagnose and troubleshoot. When the parameters and expectations are clearly separated, it’s easier to evaluate if we need to add more examples, and discover missing cases. #### General Rules To prevents most of accidental misuse of Given-When-Then use: - Write **_Given_** in Past tense as Passive sentences - these statements are describing preconditions and parameters (values rather than actions) - Write **_When_** in Present tense as Active sentences - these statements are describing action under test - Write **_Then_** in Future tense as Passive sentences - these statements are describing post-conditions and expectations (values rather than actions) Make sure that there is only **one** **_When_** statement for each scenario. Also make sure that there are no **and** conjunctions in sentences. If there is, it must be split into separate step. ### Matching Step Definition with Cucumber Expressions - To match Gherkin Scenario Step text **_Cucumber Expression_** are used - When writing **_Cucumber Expressions_** matchers always make sure that at least similar words and plurals are covered and will be matched by using: - [Optional text](https://github.com/cucumber/cucumber-expressions#optional-text) - [Alternative text](https://github.com/cucumber/cucumber-expressions#alternative-text) - [Escaping](https://github.com/cucumber/cucumber-expressions#escaping) ## Sorry Cypress Sorry-Cypress is an open-source, self-hosted alternative to paid Cypress Cloud solution, and it enables us to: - Run Cypress Tests in parallel - Upload screenshots and videos to your own storage - Browse test results, failures, screenshots and video recordings Sorry-Cypress is actually 3 separate applications: - sorry-cypress-director - parallelization and coordination of test runs - 3rd party integration using webhooks - saving tests results - generating signed upload URL for saving failed tests screenshots - sorry-cypress-api - GraphQL wrapper to query the data stored by sorry-cypress-director - interface for the sorry-cypress-dashboard - sorry-cypress-dashboard - track test runs progress - browser test results, videos, and failures screenshots - set projects configuration like WebHooks, Slack, MS Teams and GitHub integration - create and delete entries (projects, runs) To run tests using Sorry-Cypress instead of Official Cypress Cloud, Currents-Dev Cypress Cloud `cypress-cloud` npm package must be used to integrate Cypress with Sorry-Cypress. It does that by setting the environment variable `CURRENTS_API_URL` to point to our **sorry-cypress-director** app. Example of command: npx cross-env CURRENTS_API_URL=${CYPRESS_DIRECTOR_URL} cypress-cloud run --record --key ${CYPRESS_RECORD_KEY} --parallel --ci-build-id ${CYPRESS_CI_BUILD_ID} Where: - `${CYPRESS_DIRECTOR_URL}` - sorry-cypress-director url - `${CYPRESS_RECORD_KEY}` - secret record key, sorry-cypress-director only allows test results with know, predefined, record keys - `${CYPRESS_CI_BUILD_ID}` - unique build identifier used by Sorry-Cypress to distinguish cypress test runs one from another ## Hosting Sorry-Cypress To be able to run tests using Sorry Cypress, it must be hosted somewhere. Hosting Sorry Cypress on AWS is the easiest way to get publicly accessible instance of Sorry Cypress, of course there are other options to host in on Google Cloud Platform, Microsoft Azure, Heroku, Kubernetes or Docker. More on different implementations can be found in [Sorry Cypress Docs](https://docs.sorry-cypress.dev/). Guides on how to set up Sorry-Cypress Hosting: - [Publicly on AWS](/docs/sorry-cypress-setup-aws.md) - [Locally using Docker Compose](/docs/sorry-cypress-setup-docker-compose.md) - [Locally using Minikube's Kubernetes](/docs/sorry-cypress-setup-minikube.md) ## Execute E2E Cypress Cucumber Tests using CI/CD Tools Guides on how to execute E2E Cypress Cucumber Tests using CI/CD Tools: - [On GitHub using GitHub Actions Workflows](/docs/execute-e2e-gha.md) - [Locally using Minikube's Kubernetes](/docs/execute-e2e-minikube.md)
Cypress Cucumber E2E Tests Framework
cucumber,cypress,gherkin,javascript,e2e,sorry-cypress,docker,docker-compose,kubernetes,kubernetes-job
2023-03-28T11:33:38Z
2024-05-20T06:12:25Z
null
3
122
421
0
0
2
null
null
JavaScript
For-Hives/api-my-makeup
main
# 🚀 Getting started with Strapi ## 📦 Requirements - [Node.js](https://nodejs.org/en/download/) - [Yarn](https://yarnpkg.com/getting-started/install) - [Docker](https://docs.docker.com/get-docker/) - [Minio](https://docs.min.io/docs/minio-docker-quickstart-guide.html) - [Caprover](https://caprover.com/docs/get-started.html) - [Docker Hub](https://hub.docker.com/) - [Postgres Docker](https://hub.docker.com/_/postgres) ## 🧰 Development Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-develop) ``` yarn develop ``` ## ⚙️ Deployment ### CI / CD environments variables | Variable | Description | | ----------------- | ------------------- | | `APP_URL` | Caprover app url | | `APP_NAME` | Caprover app name | | `APP_TOKEN` | Caprover app token | | `DOCKER_USERNAME` | Docker hub username | | `DOCKER_PASSWORD` | Docker hub password | | `APP_IMAGE` | Docker image name | | `S3_ENDPOINT` | Minio endpoint | | `S3_PORT` | Minio port | | `S3_SSL` | Minio ssl enable | ### Docker environments variables | Variable | Description | | ------------------- | --------------------------------------------- | | `HOST` | Straip host listener | | `PORT` | Straip port listener | | `APP_KEY` | Set the application key | | `API_TOKEN_SALT` | Set the API token salt | | `ADMIN_JWT_SECRET` | Set the admin JWT secret | | `DB_CLIENT` | Set the database client ( postgres / sqlite ) | | `DATABASE_HOST` | Set the database host | | `DATABASE_PORT` | Set the database port | | `DATABASE_NAME` | Set the database name | | `DATABASE_USERNAME` | Set the database username | | `DATABASE_PASSWORD` | Set the database password | | `S3_ENDPOINT` | Minio endpoint | | `S3_PORT` | Minio port | | `S3_SSL` | Minio ssl enable | | `S3_BUCKET` | Minio bucket name | | `S3_ACCESS_KEY_ID` | Minio access key id | | `S3_ACCESS_SECRET` | Minio access secret |
[prod] - api for my-makeup.fr
api,javascript,strapi
2023-03-29T17:25:57Z
2024-05-22T17:34:03Z
null
3
195
190
8
1
2
null
null
JavaScript
abhinavjoshi1798/bitter-level-627
master
null
Mykaa is E-commerce website which deals in the cosmetics products .
chakra-ui,css3,html5,javascript,json-server,reactjs,redux
2023-03-28T07:08:54Z
2023-04-21T12:57:14Z
null
6
35
93
0
5
2
null
null
JavaScript
CakeInTech/rails-advanced-portfolio
dev
# README This README would normally document whatever steps are necessary to get the application up and running. Things you may want to cover: * Ruby version * System dependencies * Configuration * Database creation * Database initialization * How to run the test suite * Services (job queues, cache servers, search engines, etc.) * Deployment instructions * ...
This project is my personal portfolio website built with Rails. It showcases my skills and experience as a developer, featuring my qualifications, areas of expertise, and a portfolio of my projects. The site also includes a blog section where I share my thoughts and insights on various topics related to programming and technology.
bootstrap,javascript,ruby-on-rails,sass
2023-03-29T19:57:54Z
2023-04-27T13:19:08Z
null
1
8
106
0
0
2
null
null
Ruby
hasangonen91/StarCoffeBlochainApp
main
# Star Coffee App Star Coffee App is a React Native Expo application developed by myself as a personal project. The project is still in the development phase, and I am currently working on the UI design. The blockchain integration and backend development will be added later. ## Screenshots ### Get Started Screen <img src="https://user-images.githubusercontent.com/45069041/229406884-91f30763-8a74-43c1-80f4-b3e3fe9e82b7.jpeg" alt="Get Started Screen" width="170"/> - It is our first screen where we have 2 options as Get Start and Login. If we click on Login, we reach the Login Screen. - After saying Get Started, you are directed to the onboard screen. ### Onboarding Screen <div> <img src="https://user-images.githubusercontent.com/45069041/229413710-c2c88332-2532-4e1e-85fd-160f8860df6a.jpeg" alt="Login Screen" width="180" align="left"> <img src="https://user-images.githubusercontent.com/45069041/229413727-bd8f25d9-ae18-4148-ac6d-a7a0586a7221.jpeg" alt="Login Screen" align="left" width="180"> <img src="https://user-images.githubusercontent.com/45069041/229413743-431b331f-48cd-4410-a3ad-8655609f4062.jpeg" alt="Login Screen" align="left" width="180"> <br clear="all"> </div> <br/> - There are 3 screens on the onboard. You reach the last screen by swiping right and you reach the SignUp screen by clicking Start. ### Register Screen <div> <img src="https://user-images.githubusercontent.com/45069041/229416657-ed1d5199-1e40-4841-b9a7-41730438222c.jpeg" alt="Login Screen" width="180" align="left"> <img src="https://user-images.githubusercontent.com/45069041/229416607-bced4075-c7ab-4cac-952d-fb7a538ac313.jpeg" alt="Login Screen" align="left" width="180"> <br clear="all"> </div> <br/> - This part is the Register screen. Here we start using our application by saying Join Now. - You can also perform your registration on both google and facebook. - Of course, you need to provide google and facebook connections first. ### Login Screen <div> <img src="https://user-images.githubusercontent.com/45069041/229408074-0b92bf88-43b4-4342-b7d0-a6320453eca3.jpeg" alt="Login Screen" width="180" align="left"> <img src="https://user-images.githubusercontent.com/45069041/229408155-cb3cd459-f076-44f6-82b7-f7fab8988d62.jpeg" alt="Login Screen" align="left" width="180"> <img src="https://user-images.githubusercontent.com/45069041/229408161-d275e840-d58b-4261-b354-4ab125a60ecb.jpeg" alt="Login Screen" align="left" width="180"> <img src="https://user-images.githubusercontent.com/45069041/229412678-7287792a-244f-4f33-b0b2-e25a387d8066.jpeg" alt="Login Screen" width="180"> <br clear="all"> </div> <br/> - Here we perform our login process. - Good Morning is written in the upper left corner, it changes according to the time you are in, Good Night... - As you can see, if the content is empty, the user receives a warning mode. - When the user enters the e-mail and password, it exits the hourglass mode and reaches the home page. - If you forget your password, when you click Forgot Password, it sends you an e-mail to renew your password. - In the middle, the coffees sold are advertised. ### Forgot Password Screen <div> <img src="https://user-images.githubusercontent.com/45069041/229418251-024bb6e1-8a0f-4df1-9fb5-4826f59e9d98.jpeg" alt="Login Screen" width="180" align="left"> <img src="https://user-images.githubusercontent.com/45069041/229418311-bc13ecf3-bbac-4f9f-aade-c918c3a58ba3.jpeg" alt="Login Screen" align="left" width="180"> <img src="https://user-images.githubusercontent.com/45069041/229418383-f5631a35-b5fc-4834-a0c8-e84d54e88245.jpeg" alt="Login Screen" align="left" width="180"> <img src="https://user-images.githubusercontent.com/45069041/229418407-4400072c-8313-4e91-bb1b-042877db119a.jpeg" alt="Login Screen" width="180"> <br clear="all"> </div> <br/> - If you forget your password, your e-mail information will be received on this screen and an e-mail will be sent to renew your password. ### Coffee Screen <div> <img src="https://user-images.githubusercontent.com/45069041/229419416-49f0bdde-c115-4846-a3b8-58413ba81697.jpeg" alt="Login Screen" width="180" align="left"> <br clear="all"> </div> <br/> - Coffe Screen Bottom is the first screen of the tab bar, you can search for the product you want on this screen, you can select it according to its type, and there is an automatic sliding slider as seen on the screen. - In the slider, you are directed to that screen according to the type you choose. - Below are the prices of coffees and other products. - In this section, you may like the product and maybe you want to buy it later, and you can see the content by clicking on the product. ### Show Coffee Screen <div> <img src="https://user-images.githubusercontent.com/45069041/229419433-c54e19fd-80c0-4dbc-919d-527391c44398.jpeg" alt="Login Screen" width="180" align="left"> <br clear="all"> </div> <br/> - You can review the product you choose or click on the heart, and you can buy it according to the size or the quantity you want to buy. ### Wallet Screen <div> <img src="https://user-images.githubusercontent.com/45069041/229422613-4f9c74b5-1754-4bcd-8669-ca27405bce05.jpeg" alt="Wallet Screen" width="180" align="left"> <img src="https://user-images.githubusercontent.com/45069041/229422634-934b4664-d9ea-429f-9e01-8366f4272151.jpeg" alt="Wallet Screen" align="left" width="180"> <img src="https://user-images.githubusercontent.com/45069041/229422678-35dae122-8d70-40a3-89bb-383fb8fee923.jpeg" alt="Wallet Screen" align="left" width="180"> <img src="https://user-images.githubusercontent.com/45069041/229425126-f3da4d53-16e6-4ee1-b561-b18466310f18.jpeg" align="left" width="180"> <img src="https://user-images.githubusercontent.com/45069041/229425169-86b1d6c4-2774-4b56-969f-dfe5027bb75b.jpeg" alt="Wallet Screen" width="180"> <br clear="all"> </div> <br/> - The second screen of the bottom tab bar, Wallet Screen, this screen keeps your virtual wallet information. - And your account activities are displayed. - With this virtual card, you can both buy the coffee you want in the application and make your other payments, this shows that the application is not just a coffee application, it is a much more advanced application. - When you click on the qr code icon, a qr is created for you and you can shop anywhere you want with this qr. - You can add more than one card and you can make any purchase you want with these cards. - You can shop in the same way by clicking the qr scan icon in the upper right corner of the screen. ## You can test the application: You can test the application after downloading the "Expo Go" application from the Play Store or App Store and scanning the QR. <img src="https://user-images.githubusercontent.com/45069041/229441679-a7583157-1794-4b6b-9d35-89d0d4936142.PNG" alt="Wallet Screen" width="250"> <br/> You can test the application: [Star Coffee](https://expo.dev/@hasangonen91/star-coffee?serviceType=classic&distribution=expo-go) **Or, open this link on your device:** exp://exp.host/@hasangonen91/star-coffee?release-channel=default <br/> ## Features Star Coffee has the following features: - Customers can view the menu and prices - Customers can create an account and login - Customers can purchase coffee using cryptocurrency - Transactions are recorded on the blockchain for transparency and security ## Future Development The app is currently in development. Future updates will include: - Integration with the blockchain - Backend development - Creation of a cryptocurrency for use with the app ## Used technologies **Client:** React Native, Redux, Expo ## Will be used in the future **Server:** Node, Express **Metamask Connection:** Metamask ## Installation To install the app, follow these steps: 1. Clone the repository: `git clone https://github.com/hasangonen91/StarCoffeBlochainApp` 2. Install the dependencies: `npm install` or `yarn install` 3. Run the app: `npx expo start` or `expo start --tunnel` ## Contributing If you would like to contribute to this project, please submit a pull request. ## Contact If you have any questions or feedback regarding the project, you can contact Hasan Gönen via email at hasangonen91@gmail.com. ## Development The app is developed using React Native Expo and utilizes both npm and yarn. As mentioned before, the project is still in the development phase, and blockchain integration and backend development will be added later. ## Disclaimer Star Coffee App is a personal project and has no affiliation with Starbucks or any other coffee company. The project is developed solely for educational purposes and does not aim to harm or infringe on any trademarks or intellectual property rights. ## License This project is licensed under the [MIT License](/LICENSE). This project is licensed under the [Creative Commons Attribution-NonCommercial License](https://creativecommons.org/licenses/by-nc/4.0/legalcode). This license allows others to remix, adapt, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don't have to license their derivative works on the same terms.
Star Coffe Blockchain-based coffee app
react-native,expo,wallet,javascript,starbucks,coffe,reactjs
2023-04-03T02:57:57Z
2023-04-03T07:37:02Z
2023-04-03T07:37:02Z
1
0
4
0
0
2
null
MIT
JavaScript
ejim11/payment-escrow-contract
main
# Sample Hardhat Project This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract. Try running some of the following tasks: ```shell npx hardhat help npx hardhat test REPORT_GAS=true npx hardhat test npx hardhat node npx hardhat run scripts/deploy.js ```
An escrow contract that mediates the transactions between untrusted parties.
hardhat,javascript,solidity,chai,hardhat-deploy
2023-03-27T08:59:41Z
2023-04-24T13:34:22Z
null
1
0
6
0
0
2
null
null
JavaScript
Abidkhan263187/Project-FlipKart-Website-Clone
main
# Flipkart-Website Clone Link: https://flipkartclone-black.vercel.app/index.html ## Description Welcome to the Flipkart-like E-commerce Website repository! This project aims to recreate the seamless and user-friendly shopping experience of Flipkart, allowing customers to browse and purchase a wide range of products online. ## Features 1. **Product Catalog:** Explore an extensive product catalog, spanning categories such as electronics, fashion, home appliances, and more. 2. **Product Search:** Quickly find products using robust search functionality, sorting options, and filters by category, brand, price range, and more. 3. **Product Details:** View detailed product information, images, customer reviews, ratings, and specifications to make informed purchasing decisions. 4. **Shopping Cart:** Add products to your shopping cart, review your items, and proceed to checkout with ease. 5. **Deals and Offers:** Discover the latest deals, discounts, and special offers on a variety of products. 6. **Responsive Design:** Experience a consistent and intuitive shopping interface on desktop, tablet, and mobile devices. ## Tech Stack - **Frontend:** React.js, Redux (for state management), HTML5, CSS3 - **Json-server:** API - **Version Control:** Git and GitHub - **Deployment:** Vercel Shop with confidence and convenience using our Flipkart-like E-commerce Website. Whether you're looking for the latest gadgets, trendy fashion, or household essentials, we've got you covered with a vast selection of products. Happy shopping!
Flipkart: India's Leading Online Shopping Destination. Shop from the comfort of your home with Flipkart's user-friendly interface.
css,html,javascript
2023-04-08T11:09:35Z
2023-08-16T07:15:06Z
null
4
5
15
0
1
2
null
null
HTML
Khateebxtreme/DALL-E_CLONE
main
### IMPORTANT NOTICE -> [ READ THIS ](#notes) # DALL-E CLONE **DALL-E CLONE** is an AI image generating web app that uses artificial intelligence to create images from scratch using a provided prompt. Users can interact with the app through a user-friendly interface to provide some required prompts to generate an image in accordance with their needs and **DALL-E CLONE** also gives users an optional choice to share their generated images with the community. ## Table of Contents - [Features](#features) - [TechStack](#techstack) - [Screens](#screens) - [Video Demo](#demo) - [Authors](#authors) - [License](#license) ## Features - User friendly interface for better user experience. - provided with a surprise me button to help users generate random prompts for testing - Accessible through all kinds of devices (Tablets , desktop , phones etc). - provides an option to download and share generated image. - search functionality to filter out the images that are not desired. - shared images are stored on cloud (using cloudinary API) for it to be Accessible indefinitely. - images stored on cloud is accessed from the homepage to display them. ## TechStack **Client:** React, TailwindCSS **Server:** Node.js, Express, MongoDB, Mongoose **Third Party Services:** DALL-E API, Cloudinary API, Vite ## Screens ### Homepage ![chrome_Wi6upgRCtf](https://user-images.githubusercontent.com/39136324/229374698-2873d468-9c38-4ce9-acf9-f6e27e7439cf.png) ### Image Creation page ![chrome_O0tOPMBPfm](https://user-images.githubusercontent.com/39136324/229374719-594c32c2-8893-45f9-b354-7daacfd13d83.png) ### Sample image created (Image creation page) ![chrome_oTpmsZtc1z](https://user-images.githubusercontent.com/39136324/229374971-5d736711-d670-4c7e-9a0f-292f3c62b1b8.png) ## Demo **Video walkthrough on how to navigate and explore various features of this web app** https://user-images.githubusercontent.com/39136324/229374250-0f311d9c-692f-41e1-8ad4-8bd2bc012bef.mp4 ## Authors - [@Khateebxtreme](https://github.com/Khateebxtreme) ## Notes - **Temporary Unavailability of Certain Website Features :** As the API will be nearing it's expiry date, the image generation feature provided by DALL-E API will expire because of free trial exhaustion. If I want to bring the feature back for free, instructions are provided on how I will resolve this problem in this section. If someone wants to know how this project worked in the past, video demo is provided in the [ Demo ](#demo) section. - **Hosting Services :** Netlify (Front-End), Render (Back-End) - **DALL-E API key expiry :** June 1 2023 ![info](https://github.com/Khateebxtreme/DALL-E_CLONE/assets/39136324/af2227e9-f89a-436a-be22-6e648ea047ef) - **On DALL-E API Key Expiry :** Generate a new API key with a new account and make changes to the environment variables in both .env file and render's environment variable settings. - **TypeError_Failed to Fetch :** This error doesn't occur because of any problem in code but It is an ongoing issue with render based servers which hosts free services like this project ( personal note - usually redeploying the project on render manually works but It only helps to bypass this issue for a short while ) - **SyntaxError: Unexpected token 'B', "Billing ha"... is not valid JSON :** This error occurs because of API key's free trial exhaustion. To deal with this error, instructions are provided in this section. ## License [MIT](https://choosealicense.com/licenses/mit/)
DALL-E Clone made using Midjourney and DALL-E API.
dalle,javascript,mern-stack,midjourney-app-api,cloudinary,mongodb,nodejs,react,vite,tailwind-css
2023-04-02T10:10:47Z
2023-06-27T09:14:25Z
null
1
0
23
0
1
2
null
null
JavaScript
code-tieumomo/quanph-docs
master
# Website This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. ### Installation ``` $ npm install ``` ### Local Development ``` $ npm start ``` This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. ### Build ``` $ npm build ``` This command generates static content into the `build` directory and can be served using any static contents hosting service. ### Deployment Using SSH: ``` $ USE_SSH=true yarn deploy ``` Not using SSH: ``` $ GIT_USER=<Your GitHub username> yarn deploy ``` If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
Phần lớn là tài liệu cho học sinh nhưng cũng có một số bài viết lưu lại những gì từng làm được không là sợ quên mất
css,html,javascript,laravel,php,web
2023-04-07T13:24:50Z
2023-08-16T12:03:46Z
2023-06-25T05:59:20Z
2
10
66
0
0
2
null
null
JavaScript
Rups1507/kaimono
main
# Kaimono Kaimono is a clone of [Meesho](https://www.meesho.com/), which is an e-commerce site. Deployed Link: [Kaimono](https://astounding-axolotl-f486eb.netlify.app/)
Clone of Meesho, an e-commerce website made using HTML, CSS, and Javascript over a span of one week.
css3,dom,html5,javascript,localstorage
2023-03-28T18:02:27Z
2023-11-19T19:08:53Z
null
2
5
14
0
0
2
null
null
JavaScript
Doris-Siu/doris-tech-blog
main
# Tech Blog This is a tech blog where I share my passion and knowledge of development. It is a responsive and user-friendly website where all the blog articles come from a headless CMS service configured and integrated into code called Sanity. Whether you are a beginner or an expert, my blog content is designed to inform and engage. ![mobile (1)](https://github.com/Doris-Siu/doris-tech-blog/assets/107772913/097bc31f-e5b8-4d50-9c08-b409c5a74395) ![mobile (2)](https://github.com/Doris-Siu/doris-tech-blog/assets/107772913/57bd47fc-6ea4-41dc-9d31-a093ac074079) ## Technologies - Next.js - React.js - TypeScript - Tailwind CSS - Sanity CMS ## Live Demo Click [here](https://doris-techblog.vercel.app/) to view the live demo. ## Getting Started First, run the development server: ```bash npm run dev # or yarn dev # or pnpm dev ``` Open 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. API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts. The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages. This project uses next/font 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/foundations/about-nextjs) - an interactive Next.js tutorial. To learn more about Sanity, take a look at the following resources: [Sanity website](https://www.sanity.io/) [Official Sanity.io toolkit for Next.js apps](https://www.npmjs.com/package/next-sanity#next-sanitypreview-live-real-time-preview) ## License This project is licensed under the [MIT](https://choosealicense.com/licenses/mit/)
A tech blog where Doris share her passion & knowledge of development.
javascript,nextjs13,reactjs,sanity,tailwindcss
2023-03-30T11:35:25Z
2024-02-13T22:38:18Z
null
1
0
32
0
0
2
null
null
TypeScript
ShablaLab/webdriverio-appium-flutter-example
main
# WebdriverIO Appium Flutter Demo<a href="https://webdriver.io/"><img src="https://avatars.githubusercontent.com/u/72550141?s=48&v=4" alt="WebdriverIO" height="22" /></a> <a href="https://nodejs.org/en/"><img src="https://brandslogos.com/wp-content/uploads/images/large/nodejs-icon-logo.png" alt="nodejs" height="22" /></a> <a href="https://mochajs.org/"><img src="https://brandslogos.com/wp-content/uploads/images/large/mocha-logo.png" alt="mocha" height="22" /></a> <a href="https://flutter.dev/"><img src="https://storage.googleapis.com/cms-storage-bucket/6a07d8a62f4308d2b854.svg" alt="flutter" height="22" /></a> ## Introduction WebdriverIO is a progressive automation framework built to automate modern web and mobile applications. It simplifies the interaction with your app and provides a set of plugins that help you create a scalable, robust and flakiness test suite. This repository demonstrates a WebdriverIO tests framework written in Mocha and nodeJS with android flutter testing capabilities. The WebdriverIO test scripts are written for the open source The Flutter App ([Github](https://github.com/abhi2810/the_app_flutter)). --- ## Repository setup - Clone the repository - Set the correct node version via NVM (optional but recommended) ```sh # brew command to install nvm $ brew install nvm # pick the node version from .nvmrc and install the version $ nvm install # use the node version which is compatible $ nvm use ``` - Run below command to configure dependencies ```sh npm install ``` ## Running Your Tests - How to run the test? - To run the default test scenario (e.g. End to End Scenario) on local, use the following command: ```sh npm test ``` ## Generating Allure Reports - Generate Report using the following command: ```sh npm run generate-report ``` - sample report ![alt text](./docs/report.png)
A webdriverIO automation framework to test mobile apps developed using flutter
allure-report,appium,javascript,webdriverio
2023-04-04T11:46:21Z
2023-04-18T14:31:45Z
null
1
0
2
0
1
2
null
null
JavaScript
Umoren/product-store-swr
master
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## Getting Started First, run the development server: ```bash npm run dev # or yarn dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. ## About Using SWR with Nextjs. - Infinite scrolling with `useSWRInfinite` hook - Fetching data with custom `useFetch` hook - Optimistic UI update with `mutate`
Illustrating how SWR works and some of it's features
javascript,nextjs,swr
2023-04-06T21:54:06Z
2023-04-07T12:07:30Z
null
1
0
5
0
0
2
null
null
JavaScript
pallaveekumari/fastor_assignment
master
# fastor_assignment Deployed URL for the project = https://fastor-assignment.onrender.com Information about the Project:- * Api for login for employee/counselor -api = https://fastor-assignment.onrender.com/employee/login -localhostAPI = http://localhost:8080/employee/login -payload in body = email,password -method = post * Api for signup for employee/counselor -api = https://fastor-assignment.onrender.com/employee/signup -localhostAPI = http://localhost:8080/employee/signup -payload in body = name, email, password -method = post * Api for enquiry form submission by the user -api = https://fastor-assignment.onrender.com/user/enquiryform -localhostAPI = http://localhost:8080/user/enquiryform -payload in body = name,email,course_interest -method = post * Api to claim leads -api= https://fastor-assignment.onrender.com/leads/claimuser -localhostAPI = http://localhost:8080/leads/claimuser -payload in body = email of the user whom the loggedin employee/counsellor wants to claim. -headers= {Authorization: Bearer token} token of the loggedin employee. -method=post * API to fetch unclaimed leads -api= https://fastor-assignment.onrender.com/leads/unclaimleads -localhostAPI = http://localhost:8080/leads/unclaimleads -method= get * API to fetch leads claimed by logged in employee. -api = https://fastor-assignment.onrender.com/leads/claimleads -localhostAPI = http://localhost:8080/leads/claimleads -headers= {Authorization: Bearer token} token of the loggedin employee. -method = get
This is the customer relationship management(CRM) project mainly focused on backend functionality.
bcrypt,express,javascript,jsonwebtoken,mongodb,mongoose,nodejs
2023-03-26T08:52:40Z
2023-03-27T15:41:35Z
null
1
0
12
0
0
2
null
null
JavaScript
ArmoLab/Github-Contributions-API
main
null
Github Contributions API, Support JSON & SVG
easy-to-use,github-api,javascript,js,node-html-parser,nodejs,serverless,vercel,zero-configuration
2023-04-02T09:39:20Z
2023-07-25T07:19:42Z
null
1
0
20
0
0
2
null
AGPL-3.0
JavaScript
SatyendraCODE/hotstar_clone
main
# 👇 Live link 👇 [https://hotstarclone-c6e74.firebaseapp.com/](https://hotstarclone-c6e74.firebaseapp.com/) <!-- # Login ``` username = satyendrasinh password = 12345 ``` --> # Used Api (https://nervous-wrap-duck.cyclic.app/)[https://nervous-wrap-duck.cyclic.app/] # 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.
This is React.js re-creation of official "Hotstar" web app using React.js
html-css-javascript,javascript,react
2023-04-04T04:42:48Z
2023-08-10T18:03:58Z
null
1
1
38
5
0
2
null
null
JavaScript
edpadua/NotesInTime
main
# NotesInTime <h1> <a href="notes-in-time.vercel.app"><img src="/NotesInTime/public/captura.gif"></a> </h1> # Summary - [About](#About) - [Demo](#-demo) - [Technologies](#technologies) - [Setup](#setup) - [License](#license) - [Contact](#contact) ## About This project consists of an annotation registration system. The user types the text in the input field and can also insert an image in the note by a button next to this field and then saves the note and it is shown in a list. Each note has the text, the image, if this has been inserted, in addition to recording the date and time of the moment it is saved. The purpose of this project is to put some front end and React library concepts into practice, in addition to developing a system that can be useful for several everyday situations, where we need to take notes and record information quickly, with date stamp and time. The system can evolve and the data persistence part will be developed later as well as a mobile version. ### :desktop_computer: Desktop design ![image](https://user-images.githubusercontent.com/4975360/231210072-af0e1953-a893-45b5-afc1-61ac361d2c51.png) ### :iphone: Tablets design ![image](https://user-images.githubusercontent.com/4975360/231210928-1d22df6c-8d34-4a31-9aac-62dd95ba3724.png) ### :iphone: Mobile design ![Screenshot_20230411-123448](https://user-images.githubusercontent.com/4975360/231217110-7aaf7011-0740-463d-bbf3-a6aec18f0ad5.png) ### [🌐 Demo](https://notes-in-time.vercel.app/) ### Technologies - [ReactJS](https://reactjs.org) - [Vite](https://vitejs.dev/guide/) - [React Input Emoji](cesarwbr.github.io/react-input-emoji/) - [React Icons](https://react-icons.github.io/react-icons/) ## Setup ```bash git clone https://github.com/edpadua/NotesInTime cd notesintime npm i npm run dev ``` ## License Distributed under the MIT License. See `LICENSE.txt` for more information. ## Contact Eduardo de Pádua: ed.padua@gmail.com Project Link: [https://github.com/edpadua/NotesInTime/](https://github.com/edpadua/NotesInTime)
This project consists of an annotation registration system. The user types the text in the input field and can also insert an image in the note by a button next to this field and then saves the note and it is shown in a list. Each note has the text, the image, if this has been inserted, in addition to recording the date and time of the moment it is
css,html,javascript,reactjs
2023-04-05T20:36:24Z
2023-04-13T02:10:18Z
null
1
0
18
0
0
2
null
null
JavaScript
Ballaual/DiCoBo
master
<h1 align="center">🤖 DiCoBo 🤖</h1> <p align="center"> <img alt="Size" src="https://img.shields.io/github/languages/code-size/ballaual/DiCoBo"> <img alt="Stars" src="https://img.shields.io/github/watchers/ballaual/DiCoBo"> <img alt="Fork" src="https://img.shields.io/github/forks/ballaual/DiCoBo"> <img alt="Stars" src="https://img.shields.io/github/stars/ballaual/DiCoBo"> <img alt="Version" src="https://img.shields.io/github/package-json/v/ballaual/DiCoBo"> <img alt="License" src="https://img.shields.io/github/license/ballaual/DiCoBo"> </p> ## Overview * [Permissions](#set-the-correct-permissions) * [Requirements](#Requirements) * [Server installation guide](#Server-installation-instructions) * [Edit config file](#edit-the-config-file) * [Contributing](#Contributing) * [Contact](#author--contact) * [License](#License) ## Set the correct permissions When inviting the Bot make sure it has the following OAuth Scopes set in the Discord Developer Portal. > bot<br> > applications.commands<br> > Manage Roles<br> > Manage Channels<br> > Kick Members<br> > Ban Members<br> > Manage Nicknames<br> > Read Messages/View Channels<br> > Send Messages<br> > Send Messages in Threads<br> > Manage Messages<br> > Embed Links<br> > Attach Files<br> > Read Message History<br> > Use External Emojis<br> > Add Reactions<br> > Connect<br> > Speak<br> > Move Members<br> > Use Voice Activity<br> ## Requirements 1. Nodejs>=18.15.0: **[Download](https://nodejs.org/en/download)** 2. Git: **[Download](https://git-scm.com)** 3. Discord Bot Token: **[Get it here](https://discord.com/developers/applications)** 4. Discord Bot ClientId: **[Get it here](https://discord.com/developers/applications)** ## Server installation instructions * Windows <details> <summary>using CMD</summary> 1. Open CMD using `WIN + R` and type `cmd` and hit `ENTER` 2. Run `git clone https://github.com/ballaual/DiCoBo.git` 3. Run `cd DiCoBo` 4. Run `npm i` to install the required modules 5. Run `cd config` to navigate into the config folder 6. Copy or Rename `config.json.example` to `config.json` 7. Edit `config.json` - see [here](#edit-the-config-file) 8. Run `cd ..` to navigate into the root folder of the bot 9. Run `npm start` to start the bot * To update the bot run `npm run update` </details> <details> <summary>without using CMD</summary> 1. Download latest release from [here](https://github.com/ballaual/DiCoBo/releases/latest) 2. Unzip the files using WinRAR or any other package manager 3. Navigate into the folder `DiCoBo\scripts` 4. Execute `install.bat` to install the required modules 5. Navigate into the folder `DiCoBo\config` 6. Copy or Rename `config.json.example` to `config.json` 7. Edit `config.json` - see [here](#edit-the-config-file) 8. Navigate into the folder `DiCoBo\scripts` 9. Execute `startbot.bat` to start the bot * To update the bot execute the `update.bat` </details> * Linux <details> <summary>Debian >=10</summary> 1. As root: Create a new user `useradd -m -s /bin/bash DiCoBo` 2. Login as DiCoBo using `su - DiCoBo` 3. Run `git clone https://github.com/ballaual/DiCoBo.git` 4. Run `cd DiCoBo` 5. Run `npm i` to install the required modules 6. Run `cd config` to navigate into the config folder 7. Run `cp config.json.example config.json` 8. Edit `config.json` using nano or vim - see [here](#edit-the-config-file) 9. Run `cd ..` to navigate into the root folder of the bot 10. Run `npm start` to start the bot * To update the bot run `npm run update` </details> <details> <summary>using systemd</summary> 1. Follow the guide from Debian installation guide until step 7 2. As root: Navigate to systemd's folder using `cd /etc/systemd/system/` 3. Create a new file called `DiCoBo.service` 4. Insert following code >[Unit]<br> >Description=DiCoBo Discordbot<br> >After=network.service<br> ><br> >[Service]<br> >User=DiCoBo<br> >Group=DiCoBo<br> >Type=simple<br> >WorkingDirectory=/home/DiCoBo/DiCoBo/<br> >ExecStart=node .<br> >RestartSec=15<br> >Restart=always<br> ><br> >[Install]<br> >WantedBy=multi-user.target<br> 5. Run `systemctl daemon-reload` to reload systemd's configs 6. Run `systemctl enable DiCoBo` to enable autostart 7. Run `systemctl start DiCoBo` to start the bot Note: From now on the bot will always run in background and will automatically start when the machine gets rebooted.<br> To stop the bot run `systemctl stop DiCoBo`<br> To disable the autostart run `systemctl disable DiCoBo` * Update the bot: `cd /home/DiCoBo/DiCoBo/scripts && npm run update` </details> ## Edit the config file Please make sure to fill every field marked as <b>*required</b> because they are mandatory for the main functions of the bot! Otherwise the bot won't start and / or might crash at some point if these information are missing. * Required values > - token<br> > - clientId<br> > - ownerId<br> > - invite<br> > - github<br> > - paypal * Optional values > - ytcookie > - A tutorial video for ytcookie can be found [here](https://www.youtube.com/watch?v=iQnpef9LgVM) ## Contributing 1. [Fork this repository](https://github.com/ballaual/DiCoBo/fork) 2. Clone your fork: `git clone https://github.com/your-username/DiCoBo.git` 3. Create your feature branch: `git checkout -b <branch-name>` 4. Commit your changes: `git commit -m <commit message>` 5. Push to the branch: `git push -u origin <branch-name>` 6. Submit a pull request ## Author & Contact * [Ballaual](https://github.com/ballaual) - [Discord](https://discord.com/users/475642657490599937) - alex@ballaual.de ## License Released under the [MIT License](https://github.com/ballaual/DiCoBo/blob/master/LICENSE) ## Contributors ✨ Thanks goes to these wonderful people! <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ballaual"><img src="https://avatars.githubusercontent.com/u/38478976?v=4?s=100" width="100px;" alt="Ballaual"/><br /><sub><b>Ballaual</b></sub></a><br /><a href="https://github.com/ballaual/DiCoBo/commits?author=ballaual" title="Code">💻</a> <a href="https://github.com/ballaual/DiCoBo/commits?author=ballaual" title="Tests">⚠️</a> <a href="#ideas-ballaual" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-ballaual" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td> </tr> </tbody> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->
A Discordbot written in Javascript using discord.js v14 working with (/) commands. Developed and hosted by: Ballaual#2515 / @ ballaual.
discord,discord-bot,discordjs,distube,javascript
2023-03-31T08:39:28Z
2023-11-25T17:40:24Z
2023-07-21T18:57:48Z
1
70
330
0
2
2
null
MIT
JavaScript
Tejasp1997/MegaCart
main
<h2 align="center"> Mega Cart Website <br/> <a href="https://megacart.netlify.app/" target="_blank">MegaCart</a> </h2> Mega Cart is an online shopping application, where users can buy various products based on their liking. In this application, the user needs to login to execute the user stories.
Mega Cart is an online shopping application, where users can buy various products based on their liking. In this application, the user needs to login to execute the user stories.
code,shopping-cart,javascript
2023-04-08T14:31:06Z
2023-04-13T16:47:22Z
null
1
0
3
0
0
2
null
null
HTML
kiqprado/Geometric-Art
master
<h1 align="center"> Geometric Art. </h1> <p align="center"> Diferentes variações no seu quadro. </p> <p align="center"> <a href="#-tecnologias">Tecnologias</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; <a href="#-projeto">Projeto</a>&nbsp;&nbsp;&nbsp; </p> <p align="center"> <img alt="License" src="https://img.shields.io/static/v1?label=license&message=MIT&color=49AA26&labelColor=000000"> </p> <br> <p align="center"> <img alt="Art Generator Preview" src="./assets/Preview.png" width="100%"> </p> ## 🚀 Tecnologias Esse projeto foi desenvolvido com as seguintes tecnologias: - HTML e CSS - JavaScript ## 💻 Projeto Conteúdo do projeto retirado de uma Série com 100 dias de JavaScript, com o desenvolvimento de pequenas aplicações nos mais diversos temas. <br> Veja o canal do projeto através [DESSE LINK](https://www.youtube.com/@AsmrProg). ## 🔖 Layout Você pode visualizar o resultado clincando neste [LINK](https://kiqprado.github.io/Geometric-Art//). --- <div> <a href="https://www.linkedin.com/in/kaiqueprado/" target="_blank"><img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white" target="_blank"></a> &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; <a href="https://www.instagram.com/kiqprado/" target="_blank"><img src="https://img.shields.io/badge/Instagram-E4405F?style=for-the-badge&logo=instagram&logoColor=white" target="_blank"></a> </div>
Geometric Art.
css,github,html,javascript,js
2023-04-02T15:07:56Z
2023-04-02T15:10:24Z
null
1
0
2
0
0
2
null
null
CSS
kacperwyczawski/sigma-cars
main
# Sigma Cars ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/kacperwyczawski/sigma-cars/publish-to-hub.yml?label=build%20and%20publish) > **Note** > > Application is in beta. ## 📝 Description Sigma Cars is a car rental application. This is a learning project that was created to practice and demonstrate the development of a full stack web application. Users can search for cars by location, price, and availability, and make reservations for the selected car. - Sigma Cars is containerized using **Docker**, providing easy deployments and scalability. - The backend is developed using **ASP.NET Core**, a high-performance framework, and utilizes a **PostgreSQL** database for efficient data storage and retrieval. - The website is built using **Nuxt** and **Vue**, resulting in an interactive and visually appealing user interface. It is developed with a focus on type-safety by using **TypeScript** - Project utilizes an **Nginx** proxy server, which acts as a reverse proxy, handling incoming requests and forwarding them to the appropriate services. - This repository leverages **GitHub Actions** to automate the **CI/CD** process. This ensures that up-to-date images are pushed to **Docker Hub**, making it easy to deploy the latest version of the project. - Users can choose to access the system via the **REST API** documented by **OpenAPI** schema, allowing programmatic interactions, or use the website for a user-friendly graphical interface. ![Mockup](Assets/screenshot.png) ## 🚀 How to run 1. Install and set up [Docker](https://www.docker.com/) on your machine. 2. Download [this](docker-compose.yml) file from repository. In PowerShell you can use: `Invoke-WebRequest https://raw.githubusercontent.com/kacperwyczawski/sigma-cars/main/docker-compose.yml -OutFile docker-compose.yml`. 3. Open Docker Desktop, ensuring that it is properly installed and running. 4. In your terminal or command prompt, navigate to the directory where you downloaded the docker-compose.yml file. 5. Run `docker compose up` to start the project. ## ⭐ How to use - After running the application, open [`http://localhost`](http://localhost) in your preferred web browser. - There is default admin account with email: `admin@sigma.cars` and password: `admin`. #### 💭 Optional - You can access OpenAPI schema at [`http://localhost/api/schema/v1`](http://localhost/api/schema/v1) (can be imported into Postman). - Base path for all REST API endpoints is `http://localhost/api`. ## ⚒️ How to develop First you need to clone this repository. After making changes, you can run the application with `docker compose up --build`. If you want to use hot reload for frontend: 1. `cd SigmaCars/Frontend`. 2. `npm run dev`. 3. `docker compose up -f ../docker-compose.dev.frontend.yml`. 4. Website is now available at [`http://localhost`](http://localhost). <details> <summary> Details for Linux users: </summary> There may be some problems with proxy_pass from nginx to host machine. This stackoverflow answer may help: https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach/43541681#43541681 </details> ## 🔗 Application schema ```mermaid flowchart TD user([End user]) --- nginx{{Nginx reverse proxy}} nginx --- backend(ASP.NET Core HTTP API) backend --- database[(Postgres database)] nginx --- frontend(Vue + Nuxt website) ``` ## 🗃️ Simplified database schema ```mermaid erDiagram CarType ||--o{ Car : x Department ||--o{ Car : x Car ||--o{ Rental : x User ||--o{ Rental : x ``` ## 📫 Feedback I hope you find Sigma Cars project helpful! If you encounter any issues or have any feedback, please don't hesitate to contact me via github issues.
🚘 Web app for renting cars. Built with ASP.NET Core and Vue/Nuxt, on Docker. Extremely easy to run locally via Docker compose.
api,asp-net-core,csharp,docker,docker-compose,docker-hub,dotnet,github-actions,javascript,nuxt
2023-04-02T14:33:17Z
2023-08-20T08:55:10Z
null
1
0
289
0
0
2
null
AGPL-3.0
C#
abubalo/sum-up
master
# SumUp ![image](./clients/assets/sumup.jpg) SumUp is a Chrome browser extension that allows users to quickly extract the text of articles from web pages and generate summary using the powerful OpenAI Davinci-003 language model. Built with JavaScript and Python. SumUp provides a fast, efficient, and user-friendly way to digest long-form content and save time. ## Installation To install SumUp, follow these steps: 1. Clone this repository to your local machine. 2. Open Google Chrome or another Chromium-based browser. 3. Navigate to the browser's extensions page. 4. Enable developer mode. 5. Click "Load unpacked" and select the folder where you cloned the repository. ## Usage To use SumUp, simply navigate to the web page of an article you want to summarize and click the SumUp icon in your browser toolbar. SumUp will extract the text from the article, generate a summary using the OpenAI Davinci-003 language model, and display the summary in a popup window. ## License SumUp is licensed under the MIT license. See [LICENSE](/LICENSE) for more information.
A chrome extension that allows users to quickly extract main key points of articles from web pages.
chrome,chrome-extension,javascript
2023-04-01T09:07:14Z
2023-04-11T19:21:51Z
null
1
0
23
0
0
2
null
MIT
Python
Vexcited/Takuzu
main
# Takuzu > Implémentation JS du jeu de réflexion [Takuzu, ou Binairo](https://fr.wikipedia.org/wiki/Takuzu). ## Principe du Takuzu - en résumé C'est un jeu qui consiste à remplir une grille avec les chiffres `0` et `1` par déduction logique. Cette grille peut aller de 6x6 à 14x14 en général, mais peut très bien avoir un nombre de colonnes et de lignes différent - *voire différents entre eux pourvu qu'ils soient pairs*. Chaque grille ne contient que des éléments d’une paire quelconque - le cas le plus courant étant des 0 et des 1 -, et doit être complétée en respectant trois règles: - autant de 1 que de 0 sur chaque ligne et sur chaque colonne ; - pas plus de 2 chiffres identiques côte à côte ; - 2 lignes ou 2 colonnes ne peuvent être identiques. ## Usage ### StackBlitz Vous pouvez directement cloner et démarrer ce projet en local dans votre navigateur en utilisant le lien ci-dessous. [![Ouvrir dans StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/Vexcited/takuzu?embed=1&hideExplorer=1&theme=dark&view=preview&startScript=start&title=Takuzu) ### Local Pour une utilisation en local sur votre PC, vous pouvez cloner ce répertoire, installer les dépendances et démarrer le serveur Takuzu vous même. ```bash git clone https://github.com/Vexcited/takuzu cd ./takuzu/sources # Utilisation de pnpm pour installer les dépendances (`npm install --global pnpm`) pnpm install # Démarrage du serveur Takuzu. pnpm start ``` ## Développement > Effectuez les mêmes étapes que [Usage#Local](#local) avec la petite > recommandation ci-dessous. Pour une utilisation en mode développement, optez pour `pnpm dev` à la place de `pnpm start` pour avoir un redémarrage automatique du serveur lors de modifications. Le code du serveur est disponible dans [`./src`](./src/) et le code du client (interface web) est disponible dans [`./public`](./public/). ## Documentation de l'API du serveur REST - sur `/api` Voir [la documentation](./doc/api-rest.md). ## Documentation de l'API du serveur WS - sur `/api/ws` Voir [la documentation](./doc/api-ws.md).
French JS implementation of the puzzle game Takuzu, or Binairo. Made for Les Trophées NSI of 2023.
binairo-puzzle,game,javascript,takuzu
2023-03-30T09:53:18Z
2023-06-10T13:31:57Z
null
1
1
60
0
0
2
null
null
JavaScript
Asimji/Furniture_Now
main
# money-reason-7925 <h1>Furniture_Now</h1> <h3>Frontend Link: https://frontend-asimji.vercel.app </h3> <h3>Backend Link: https://furniture-z8ny.onrender.com/ </h3> <h3>About the Project:</h3> It is an e-commerce website that shops Online in India for Furniture,Home Decor,Homeware Products It is an Individual project that takes 5 days to complete. ## Features ✨ - jwt authentication, admin authorization. - Dynamic Products. - Filtering, Searching & Sorting. - Create, Read, Update, Delete functionalities. - HomePage, Product Page, Single Product Page, Cart & Payment. - All the pages are responsive. 😇 <h3>Screenshots:</h3> <img src="frontend\src\Images\Screenshot (128).png" alt="screenshot" /> <img src="frontend\src\Images\Screenshot (129).png" alt="screenshot" /> <img src="frontend\src\Images\Screenshot (130).pngg" alt="screenshot" /> <img src="frontend\src\Images\Screenshot (131).png" alt="screenshot" /> <img src="frontend\src\Images\Screenshot (132).png" alt="screenshot" /> <img src="frontend\src\Images\Screenshot (133).png" alt="screenshot" /> <img src="frontend\src\Images\Screenshot (134).png" alt="screenshot" /> <h3>Technologies Used:</h3> <ul> <li>React</li> <li>Chakra UI</li> <li>React-Redux</li> <li>Nodes.js</li> <li>Express.js</li> <li>Middleware</li> <li>MongoDB</li> </ul> <h3>Getting Started</h3> To get started with the project, you can either clone this repository to your local machine: Or you can fork the repository to your own GitHub account and clone your forked repository. Once you have the code on your machine, open the project folder in your code editor and start coding. <h3>Project Structure</h3> >my-app ├── >src │ └── Components │ └── Images │ └── Pages │ └── Redux │ └── Styling
Furniture_Now is an e-commerce website that shops Online in India for Furniture, Home Decor, Homeware Products It is an Individual project that takes 5 days to complete.
chakra-ui,reactjs,redux-thunk,css,expressjs,html,javascript,middleware,mongodb,nodejs
2023-03-28T07:50:08Z
2023-08-12T16:31:50Z
null
2
8
40
11
0
2
null
null
JavaScript
shivamgit47/reactecommerce
main
E-commerce web application developed using React.js with functional components, Created the customer purchasing journey, providing products catalogue equipped with different filters for easy sorting of the product, created Add to cart advanced functionality
react-components,react-hooks,react-router-dom,reactjs,javascript,react
2023-03-27T21:51:03Z
2023-05-09T19:34:34Z
null
1
0
3
0
0
2
null
null
JavaScript
BlckTitan/palma
master
https://palmabuild.netlify.app/ # Frontend Mentor - Multi-step form solution This is a solution to the [Multi-step form challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/multistep-form-YVAnSdqQBJ). Frontend Mentor challenges help you improve your coding skills by building realistic projects. ## Table of contents - [Overview](#overview) - [The challenge](#the-challenge) - [Screenshot](#screenshot) - [Links](#links) - [My process](#my-process) - [Built with](#built-with) - [What I learned](#what-i-learned) - [Continued development](#continued-development) - [Useful resources](#useful-resources) - [Author](#author) - [Acknowledgments](#acknowledgments) **Note: Delete this note and update the table of contents based on what sections you keep.** ## Overview ### The challenge Users should be able to: - Complete each step of the sequence - Go back to a previous step to update their selections - See a summary of their selections on the final step and confirm their order - View the optimal layout for the interface depending on their device's screen size - See hover and focus states for all interactive elements on the page - Receive form validation messages if: - A field has been missed - The email address is not formatted correctly - A step is submitted, but no selection has been made ### Screenshot ![personalInfo page](./src/assets/personalInfo.jpg) ![plans page](./src/assets/plan.jpg) ![addOns page](./src/assets/addOns.jpg) ![summary page](./src//assets//summary.jpg) ![thankYou page](./src/assets/thnkYou.jpg) ### Links - Solution URL: [https://palmabuild.netlify.app/] - Live Site URL: [https://palmabuild.netlify.app/] ### Built with - Semantic HTML5 markup - CSS custom properties - Flexbox - Mobile-first workflow - [React](https://reactjs.org/) - JS library - [TailwindCss](https://tailwindcss.com/) - For styles - [Redux and ReduxToolkit ](https://redux.js.org/redux-toolkit/) - For state management ### Continued development Areas I need improvement include --responsiveness --use of DSA ## Author - Website - [Ugorji Victor E](https://www.linkedin.com/in/eze-ugorji-33a9301a7/) - Frontend Mentor - [@BlckTitan](https://www.frontendmentor.io/profile/BlckTitan) - Twitter - [@ugorjivee](https://www.twitter.com/ugorjivee) - GitHub - [@BlckTitan](https://github.com/BlckTitan)
Palma is multistep payment form built with React, HTML, CSS, tailwind.
css-flexbox,css-grid,css3,html5,javascript,reactjs,redux-toolkit,tailwindcss
2023-03-29T18:03:52Z
2023-05-17T09:09:23Z
null
1
0
94
0
0
2
null
null
JavaScript
pratik-karna/Ecommerce-Website
main
# Ecommerce-Website
An open-source🤩👪 E-commerce project 🛒 on GitHub showcasing online store functionality, payment integrations, and customer management. Ideal for developers looking to build their own online shop!
css,fornt-end,github,html,javascript
2023-04-04T12:20:05Z
2023-05-07T17:00:24Z
null
1
0
3
0
0
2
null
null
HTML
Mhdtarek/salahshuffle
master
# **Salah Shuffle** A Svelte website that allows you to shuffle through Quran Surahs and generate random surahs for each of the five daily Islamic prayers. ## **Dependencies** The following dependencies are required: - surahs.json file (comes in src) - html2canvas package - adhan package ## **Usage** 1. Clone or download the repository. 2. Install the dependencies using npm install. 3. Run the project using npm run dev. 4. Visit the application in your web browser at localhost:5173. ## **Features** - Add/remove Surahs to/from a list of known Surahs. - Generate random Surahs for each of the five daily prayers. - Option to select all five prayers at once. - Download a PNG image of the generated Salah times. ## **Running** 1. `git clone https://github.com/Mhdtarek/salahshuffle.git` 2. `cd salahshuffle` 3. `npm install` 4. `npm run dev` 5. *optional* `code .` for Visual Studio Code or `nvim .` for Neo Vi ## **Credits** This project was created by mhdtarek using[ Svelte](https://svelte.dev/),[ html2canvas](https://html2canvas.hertzen.com/), and[ adhan](https://github.com/batoulapps/adhan-js).
allows you to shuffle through Quran Surahs and generate random surahs for each of the five daily prayers.
islam,javascript,salah,svelte,sveltejs
2023-03-26T17:49:55Z
2023-09-12T16:20:42Z
null
1
0
37
0
1
2
null
null
JavaScript
lujoh/owls_of_bavaria
main
# Owls of Bavaria This is a web mapping application to display owl sightings in Bavaria using data from iNaturalist. This project is still in progress, but you can [view the current version of the project here](https://owls-of-bavaria.pages.dev/). ## About This web mapping application is being built in honor of my mother who enjoys birding and is really into owls. The application takes owl observation data from iNaturalist and displays it on a map. The observations generally come with images and the names of the owl species and zooming in on the location allows birders to see, where owl observations are being made in their area. Users can currently filter the observation by owl species. It is also intended to motivate users to go out and make their own animal observations which they can then add to iNaturalist where they can be used by scientists. Future additions will come with more information about the owls and options to filter by dates. ## Tools Used * React using Vite * Redux * ESRI's ArcGIS Maps SDK for JavaScript * iNaturalist API ## Install your own version 1. Clone the GitHub repository. 2. Install required packages. ``` npm install ``` 3. Obtain an [Esri API Key](https://developers.arcgis.com/documentation/mapping-apis-and-services/security/tutorials/create-and-manage-an-api-key/). - Note 1: if you aren't able to get an Esri API key, you will still be able to run the application, however, you will have to find a free basemap and add the link to it as the [basemap](https://github.com/lujoh/owls_of_bavaria/blob/df6d2385a9bcec9339fd5af6fec2841307e151a3/src/features/map/loadMap.jsx#L10) - Note 2: if you are deploying your application to the public be sure to restrict your referrers with Esri so that unauthorized users can't use your key 4. Create a .env file based on the sample with the items ``` VITE_DEBUG=<true,false> //adjust if extra information gets logged to the console VITE_ARCGIS_API_KEY=<API Key> //your Esri API Key VITE_WEBSITE_TITLE=Owls of Bavaria //the website title - feel free to adjust ``` 5. Run the code locally. ``` npm run dev ``` 6. Build the code to deploy in production. ``` npm build ``` ## Customize the Application Do you like the idea of a webmap about plant or animal observations, but you're not in Bavaria and you don't really care about owls? Now you can customize the application with your favorite location and animal. NOTE: iNaturalist is a free API and the query for obtaining species can only return 200 records at a time. If you make your location too large or your species too broad it will take too long to load and you may overload the API. You can test out your query with the selected species and location in the iNaturalist app in advance and see how many results get returned. Try to keep it under 1000 results. Follow steps 1-4 of the installation instructions. Customize the [configureApp file](configureApp.jsx). To see an example of a customization check out the [customized_sample branch](https://github.com/lujoh/owls_of_bavaria/tree/customized_sample). It has a custom name in the .env file and custom species and location in the configureApp file. ### Customize the animal/plant Save the name of the species as you want it to appear in the app in SPECIES_NAME. Find the id of the species you want to see in iNaturalist and save it in the TAXON_ID. To find the id, visit the [iNaturalist API taxon documentation](https://api.inaturalist.org/v1/docs/#!/Taxa/get_taxa) and search for your species in the GET/taxa section. You will want the value that is stored in "id". If your species has a name that might return many results, it might be easier to search for the scientific name. ### Customize the location Find the id of the location you are targeting in the [iNaturalist API places documentation](https://api.inaturalist.org/v1/docs/#!/Places/get_places_autocomplete). Save the "id" value inside PLACE_ID. Copy the "location" value inside an array in "CENTER". You will need to copy the location coordinates in the order that they appear in the iNaturalist response without any quotation marks. In EXTENT you will want to save coordinates for a bounding box that will limit how far the users can pan the map from the initial location. You may need to play around with these values, but a good starting point will be to look at the "bounding_box_geojson" values in the iNaturalist response and make the xmin/xmax values just a little smaller/larger than the smallest/largest first values of the individual coordinates and handle the ymin/ymax values the same way for the second values. You may also want to adjust the DEFAULT_ZOOM depending on the size of your desired location. This will be a positive integer. An optional thing you can do in order to get the area you are observing highlighted in darker grey is to replace the [NotBayern GeoJSON file](/src/assets/NotBayern.geojson) with a file for your location. To do this, you can follow the steps in [this John Nelson tutorial](https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/steal-this-faded-overlay-style-please/) up until the point where you get the polygon set up. Then you can export that polygon as a GeoJSON file and use it to replace the NotBayern.geojson file. (Keep the name of the file.) ## Showcase In a neutral state, the page shows the map with all of the observations on the right and a list of the owl species observed with observation counts on the left. ![](docs_images/OwlsBavariaFullSite.png) After selecting an individual owl observation from the map, a popup appears with an image of the observation and related information. ![](docs_images/OwlsBavariaObservation.png) You can filter the observations by species by selecting the filter button on the species card that you want to see. This will highlight observations of the relevant species and grey out all other observations. ![](docs_images/OwlsBavariaFiltered.png) Inside the Filters tab, you can also filter the observations by the year that they were observed and hide those observations that have an obscured location. ![](docs_images/OwlsBavariaFiltered2.png) On the mobile version of the website, the map moves to the bottom of the page and the owl species cards move to a horizontally scrollable section at the top. ![](docs_images/OwlsBavariaMobile.png) When opening features on the mobile version of the website, the popup shows up below the map and can be expanded by clicking the arrow on the right. ![](docs_images/OwlsBavariaMobileObservation.png) For an example of a version of the website that has been customized with a different species and location, here you can see Jumping Spiders in Santa Cruz County, California. ![](docs_images/JumpingSpidersCustomized.png)
This is a web mapping application to display owl sightings in Bavaria using data from iNaturalist.
esri-javascript-api,javascript,mapping,owls,react,redux,webmap
2023-04-05T01:52:50Z
2023-09-21T17:56:20Z
null
1
2
64
0
0
2
null
MIT
JavaScript
badrisinghoo7/RentoMojo
master
# RentoMojo.com <p> RentoMojo is an online rental platform that provides furniture, appliances and electronics (mobiles, laptops) on a monthly rental basis. </p> ## About this project. This project is a Solo Project during construct week of unit 5 at Masai School. Netlify link:- https://elegant-banoffee-7a39a4.netlify.app/ ## Solo Project. ## Pages and Features ### Home Page <p>It contains Navigation bar with different categories. Also footer which provides some information about the company and links to social media handles. Also it shows images of some latest products.</p> <img src="https://strong-dodol-f37473.netlify.app/images/HomePage.jpg"/> ## Signup and Login <p>On this page, user can signup and after successfully signingup he can login.</p> <img src="https://strong-dodol-f37473.netlify.app/images/signup.jpg"/><img src="https://strong-dodol-f37473.netlify.app/images/login.jpg"/> ### Products Page <p>There are severeal categories of products pages such as packages, furniture, electronics, appliances, fitness,etc. You can visit any of them according to your preference. One of the products page is dispalyed below.</p> <img src="https://strong-dodol-f37473.netlify.app/images/ProductsPage.jpg"/> ### Product page <p>On clicking any of the product it will redirect to the products page which shows detail information of the product along with buttons such as book your plan and add to wish list.</p> <img src="https://strong-dodol-f37473.netlify.app/images/productpage1.jpg"/> <img src="https://strong-dodol-f37473.netlify.app/images/productpage2.jpg"/> ### Wishlist page <p>This page shows the products which customer add to the wish list from product page. From here customer can also remove it from the wish list.</p> <img src="https://strong-dodol-f37473.netlify.app/images/wishlistpage.jpg"/> ### Cart and Checkout page <p>On cart page customer can see the order summary and also customer can increase and decrease the quantity of the product.</p> <img src="https://strong-dodol-f37473.netlify.app/images/checkoutpage.jpg"/> ## Tech Stack: 1. HTML 2. CSS 3. JavaScript 4. React 5. Redux 6. Chakra-Ui 7. JSON-Server ## Tools Used ###### • Github for code collaboration. ## Feedback: If you want to suggest us anything or want to give us feedback then please connect us at badri.singh8090@gmail.com
RentoMojo is an online rental platform that provides furniture, appliances and electronics (mobiles, laptops) on a monthly rental basis.
chakra-ui,css,html,javascript,json-server,react-redux,reactjs,redux
2023-03-31T14:52:03Z
2023-10-20T07:28:09Z
null
1
5
25
0
0
2
null
null
JavaScript
MissUsagi/react_game
master
# react_game Simple hangman game made with React + Typescript # live_demo https://hangman-usagi.netlify.app ![Weather APP](https://user-images.githubusercontent.com/99666752/229800344-c2c3b878-3be1-4b51-b260-7ba1267eee22.png)
Simple hangman game made with React + Typescript
javascript,react,react-game
2023-03-31T17:01:02Z
2023-04-04T13:04:10Z
null
1
0
3
0
0
2
null
null
TypeScript
Sahil18718/Sahil18718.github.io
main
# Sahil18718.github.io ## Web Display ![screencapture-sahil18718-github-io-2023-12-18-22_07_34](https://github.com/Sahil18718/Sahil18718.github.io/assets/119488054/22c2e959-6f20-438b-ab69-05049f53eac7) ## Mobile Display ![screencapture-sahil18718-github-io-index-html-2023-12-18-22_09_46](https://github.com/Sahil18718/Sahil18718.github.io/assets/119488054/d6cfc128-5d7e-42da-b312-c95cda3e38de)
My Profile
css,html5,javascript
2023-04-06T16:09:49Z
2024-04-27T18:30:40Z
null
1
2
93
0
0
2
null
null
HTML
CodingWithEnjoy/YT-Video-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)
Youtube Video | ویدیوی یوتیوب
css,gh-pages,github,github-actions,github-pages,html,javascript,js,json,netlify
2023-04-07T10:30:47Z
2023-04-07T10:34:11Z
null
2
0
1
0
1
2
null
null
JavaScript
karan-10001/dataStructureVisualizer
main
<!-- ### DEVELOPER <table> <tbody> <tr> <td align='center'> <br/> <a href="https://github.com/karan-10001"> <Strong>Karan Pratap Singh </Strong></a> </td> </tr> </tbody> </table> -->
null
bootstrap,css,html,javascript,reactjs
2023-04-03T07:46:33Z
2023-04-03T07:49:01Z
null
1
0
1
0
0
2
null
null
JavaScript
santosfrancisco/react-native-debug-on-the-fly
main
# react-native-debug-on-the-fly Tool created to assist in debugging react native applications <p align="center"> <a href="https://www.gatsbyjs.org"> <img alt="Gatsby" src="./example.gif" width="300" /> </a> </p> ## Installation ```sh npm install react-native-debug-on-the-fly ``` ## Usage Add the DOTF provider on top level of your app ```js import { DOTFProvider } from 'react-native-debug-on-the-fly'; //... <DOTFProvider enabled> <App /> </DOTFProvider> //... } ``` To send logs use the `pushLog` function ```js import * as React from 'react'; import { StyleSheet, View, Text, Button } from 'react-native'; import { useDOTF } from 'react-native-debug-on-the-fly'; const Content = () => { const { pushLog, clear, logs } = useDOTF(); return ( <View style={styles.container}> <Text style={styles.title}>My app</Text> <Button title="Send log 1" onPress={() => pushLog( JSON.stringify( { foo: 'bar', bar: 'foo', obj: { foo: 'bar' } }, null, 2 ) ) } /> <Button title="Send log 2" onPress={() => pushLog(`log ${Math.floor(Math.random() * 100)}`)} /> </View> ); }; ``` ## Table of props ### Provider | Property | Type | Description | | -------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | | enabled | `boolean` | Indicates if the tool is enabled and will receive logs. When `false`, the logs are not stored and the tool is not visible | ### Hook | Property | Type | Description | | -------- | ----------------------------------- | -------------------------------------- | | logs | `{time: string, content: string}[]` | List of logs | | pushLog | `() => void` | Function that adds the log to the list | | clear | `() => void` | Clear the log list | ## Contributing See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. ## License MIT --- Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
Tool created to assist in debugging react native applications
android,app,debug,ios,logs,react,react-native,typescript,javascript
2023-03-30T18:49:31Z
2023-03-30T20:32:23Z
2023-03-30T20:32:26Z
1
0
10
0
0
2
null
MIT
TypeScript
Qqkyu/taboo-cards-api
main
# Taboo cards API Server that communicates with a database of around ~2000 taboo cards, each in two languages - English and Polish. ## Base URL https://www.taboocardsapi.com/api/ ## Rate limit There is a 10000 requests per day API limit to prevent any malicious action. If you were to make more requests than this, you will get an error response with 429 status response (Too Many Requests). ## Models Card: | Attribute | Type | Description | | -------------- | :------: | ---------------------------------------------- | | title | string | Word to explain | | forbiddenWords | string[] | Five words that can't be used to explain title | | difficulty | string | "easy", "medium", or "hard" | ## Example cards English: ```json { "forbiddenWords": ["New York", "torch", "crown", "sculpture", "island"], "title": "Statue of Liberty", "difficulty": "medium" } ``` Corresponding card in Polish: ```json { "forbiddenWords": ["Nowy Jork", "Stany Zjednoczone", "prezent", "wyspa", "pochodnia"], "title": "Statua Wolności", "difficulty": "medium" } ``` ## Endpoints There are currently two endpoints. The first endpoint returns all of the cards stored in the database. The response is the array of card objects. ``` /api/cards ``` The second endpoint randomly chooses one card and returns it. The response is a single card object: ``` /api/cards/random ``` ## Query parameters In both of the above endpoints, you can attach the following language and difficulty query parameters. ### Optional `language` query parameter Attach the `language` query parameter to get cards only in the provided language (either `en` or `pl`): ``` /api/cards?language=en /api/cards?language=pl ``` Not providing the `language` query parameter is equal to providing `language=en`, so following endpoints are equal: ``` /api/cards --> Array of cards in English /api/cards?language=en --> Array of cards in English ``` Same applies to the `/random` endpoint: ``` /api/cards/random --> Random card in English /api/cards/random?language=en --> Random card in English ``` ### Optional `difficulty` query parameter Attach the `difficulty` query parameter to get cards only with the provided difficulty (`easy`, `medium`, or `hard`): ``` /api/cards?difficulty=easy /api/cards?difficulty=medium /api/cards?difficulty=hard ``` Not providing the `difficulty` query parameter will result in: ``` /api/cards --> Return all cards with mixed difficulties /api/cards/random --> Return one card with any difficulty ```
Taboo cards API - 2000 cards in various difficulties and in two languages!
api,astro,daisyui,express,javascript,react,taboo,tailwindcss,typescript
2023-03-26T13:21:00Z
2023-10-23T20:27:30Z
null
1
2
294
0
0
2
null
MIT
Astro
kartikmehta8/whatsappgpt
main
<p align="center"> <img src="https://user-images.githubusercontent.com/77505989/228504212-218c3b11-6516-4ca1-ae80-919628009e7a.png" /> </p> Introducing a versatile Node.js WhatsApp bot that can do more than just reply to messages. With built-in chatbot capabilities powered by ChatGPT, it can engage in meaningful conversations. In addition, it also allows code execution, making it easy to test small code snippets or demonstrate them to colleagues. Experience a new level of convenience and efficiency in your daily programming tasks with this bot! ### Commands ``` /ask <your_question_to_chatgpt ``` ``` /execute <language> <code> ``` For language and how the code is compiled, refer to these [docs](https://docs.jdoodle.com). <h3> <p align="center"> Made with ❤️ by <a href="https://www.kartikmehta.xyz">kartikmehta8</a> </p> </h3>
Experience the ultimate convenience in your daily programming tasks with our Node.js WhatsApp bot. Powered by ChatGPT, it can engage in meaningful conversations, while also providing the ability to execute code. Whether you're testing small code snippets or demonstrating them to colleagues, our bot can make it happen with ease.
chatgpt,nodejs,railway,whatsapp,javascript
2023-03-29T08:48:59Z
2023-03-29T10:26:31Z
null
1
0
2
0
1
2
null
null
JavaScript
diegotellezc/weather-app
main
null
"An application to know the weather in your current location in degrees Celsius or degrees Fahrenheit. You can also search for the weather in other cities around the world."
climate,react,reactjs,weather,weatherapi,frontend,frontenddeveloper,javascript
2023-04-01T04:13:19Z
2023-05-16T01:19:26Z
null
1
0
16
0
0
2
null
null
JavaScript
Rutu-11/My_Portfolio
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)
I recently completed a personal portfolio website using React and Chakra UI, which is fully responsive and showcases my skills and projects. The website features engaging animations, smooth scrolling functionality, and other interactive elements to create an immersive user experience. As a solo project, I was able to design and develop the website.
animations,chakra-ui,framer-motion,javascript,reactjs,css
2023-03-29T04:01:34Z
2024-02-06T10:46:59Z
null
1
0
46
0
0
2
null
null
JavaScript
shivanshu814/React-Hook-Zod
master
# 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! ### `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. ### `npm run build` fails to minify
React Hook Zod is a library that provides an easy-to-use integration between React and the Zod schema validation library. With React Hook Zod, you can quickly add runtime type checking and validation to your React components using the familiar hook API.
chakra-ui,hooks,react,zod,emotion,javascript,javascript-framework
2023-04-05T18:35:05Z
2023-04-26T06:02:45Z
null
1
0
2
0
3
2
null
null
JavaScript
M3MD69/NULLEXIA
main
null
Learning Programming - Web
html,css,javascript
2023-04-06T13:23:43Z
2024-02-25T13:47:10Z
null
1
0
11
0
0
2
null
null
HTML
s4chin-verma/ABOUT
main
# ABOUT
📈 My first introduction page in my coding journey! 🔝 Developed 🚸 using HTML, CSS and JavaScript, this simple but 👍 attractive creation reflects my early steps 🚶 in web development
css3,html5,javascript
2023-03-28T09:04:23Z
2023-03-28T09:09:38Z
null
1
0
2
0
0
2
null
null
CSS
AK016/Mauve
main
# Mauve - Your Beauty Destination ## Welcome to Mauve, your one-stop beauty destination! Mauve is a web application that offers a seamless online shopping experience for all your beauty needs. With features like sign up/sign in, a product page, a cart page, and engaging ads on the homepage, Mauve makes beauty shopping a breeze. ### Table of Contents 1. **Getting Started** 2. **Features** 3. **Usage** 4. **Contributing** 5. **License** ## Getting Started To explore Mauve and its features, visit our website at [https://mauvebeauty.netlify.app/index.html](https://mauvebeauty.netlify.app/index.html). Sign up or sign in to start your beauty journey. ## Features 1. **Sign Up / Sign In** - Mauve provides a user-friendly sign-up and sign-in process. Create your account to enjoy a personalized shopping experience or log in if you're already a member. ![Sign Up / Sign In](https://github.com/AK016/Mauve/assets/123861375/80fbd356-f8a6-4cc6-9751-6636bceeadd6) 2. **Homepage** - Our homepage welcomes you with engaging beauty advertisements showcasing the latest trends and products. Explore these ads for inspiration and stay updated on the beauty industry. ![Homepage](https://github.com/AK016/Mauve/assets/123861375/bc2d6697-3db6-44bd-b198-90f5c170512c) 3. **Product Page** - Discover a wide range of beauty products on our product page. Browse through categories, view product details, and add your favorite items to the cart. ![Product Page](https://github.com/AK016/Mauve/assets/123861375/befc7b20-89ab-4ef0-97f1-2069afe21e29) 4. **Cart Page** - The cart page allows you to review your selected items, update quantities, and proceed to checkout. Enjoy a hassle-free shopping experience with Mauve. ![Cart Page](https://github.com/AK016/Mauve/assets/123861375/ed5f6d64-eaba-46f8-bc1a-88fe6702a25e) ## Usage ### Sign Up / Sign In 1. Click on the "Sign Up" or "Sign In" option on the website's navigation bar. 2. Follow the prompts to create a new account or log in with your existing credentials. ### Homepage - Visit the homepage to view the latest beauty advertisements and trends. ### Product Page 1. Click on "Shop" in the navigation bar to explore our product catalog. 2. Browse through categories and click on a product to view details. 3. Click "Add to Cart" to add products to your cart. ### Cart Page 1. Click on the shopping cart icon to view your cart. 2. Review your selected items, update quantities, or remove items. 3. Click "Proceed to Checkout" to complete your purchase. ## Contributing We welcome contributions from the open-source community. If you'd like to contribute to Mauve's development or report issues, please visit our GitHub repository for more information on how to get involved. ## License Mauve is released under the MIT License. You are free to use, modify, and distribute the software as per the terms of the license. Thank you for choosing Mauve for your beauty shopping needs. We hope you have a delightful experience! If you have any questions or feedback, please don't hesitate to contact us. Happy shopping! 💄🛍️
Mauve - Your Beauty Destination Welcome to Mauve, your one-stop beauty destination! Mauve is a web application that aims to provide you with a seamless online shopping experience for all your beauty needs. With features like sign up/sign in, a product page, a cart page.
css,html,javascript
2023-03-28T10:45:10Z
2023-11-25T10:32:25Z
null
2
7
17
0
0
2
null
null
HTML
Prasham1710/next_portfolio
main
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 `pages/index.js`. The page auto-updates as you edit the file. [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. 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.
null
javascript,nextjs,reactjs,tailwindcss,emailjs
2023-03-31T17:30:33Z
2024-03-16T22:48:13Z
null
1
0
43
0
0
2
null
null
JavaScript
libsql/isomorphic-ts
main
# `@libsql/isomorphic-{fetch,ws}` This repo provides two packages: - `@libsql/isomorphic-fetch` - `@libsql/isomorphic-ws` These provide `fetch` and `WebSocket` APIs on Node, Bun, Deno and Cloudflare Workers.
Isomorphic libraries for JavaScript/TypeScript
javascript,library,libsql,typescript
2023-03-30T09:09:45Z
2024-03-28T11:51:41Z
null
7
5
43
1
5
2
null
MIT
JavaScript
Erikas-Ramanauskas/Milestone-Project-2
main
# Tedoku [View the live project here](https://erikas-ramanauskas.github.io/Milestone-Project-2/) Tedoku is a mix between tetris and sudoku with drag and drop functionality. Fill the vertical or horizontal lines as well as squares like sudoku but have them clear out to make more space or fill up board with gaps and lose the game like in tetris. ![Screenshot of Tedoku on multiple device](./assets/images/Responsive.webp) ![GitHub contributors](https://img.shields.io/github/contributors/Erikas-Ramanauskas/Milestone-Project-2) ![GitHub last commit](https://img.shields.io/github/last-commit/Erikas-Ramanauskas/Milestone-Project-2) ![Languages](https://img.shields.io/github/languages/count/Erikas-Ramanauskas/Milestone-Project-2) ![GitHub forks](https://img.shields.io/github/forks/Erikas-Ramanauskas/Milestone-Project-2) --- **Table of Contents** * [Overview](#Overview) * [User Experience](#User-Experience-(UX)) * [First Time Visitor Goals](#First-Time-Visitor-Goals) * [Returning Visitor Goals](#Returning-Visitor-Goals) * [Frequent Visitor Goals](#Frequent-Visitor-Goals) * [Design](#Design) * [Colour Scheme](#Colour-Scheme) * [Typography](#Typography) * [Imagery](#Imagery) * [Wireframes](#Wireframes) * [Features](#Features) * [Technologies Used](#Technologies-Used) * [Languages Used](#Languages-Used) * [Frameworks, Libraries and Programmes Used](#Frameworks-Libraries-and-Programmes-Used) * [Bugs and Solutions](#ugs-and-Solutions) * [Main chalange faced and decitions made](#Main-chalange-faced-and-decitions-made) * [Atempt-no-1](#Atempt-no-1) * [Atempt-no-2](#Atempt-no-2) * [Solved Bugs during developing](#Solved-Bugs-during-developing) * [Remaining Bugs](#Remaining-Bugs) * [Ideas for Future Developments](#Ideas-for-Future-Developments) * [Game Idea and fuctions procces](#Game-Idea-and-fuctions-procces) * [Game board dimentions](#Game-board-dimentions) * [Shape creation](#Shape-creation) * [Drag and drop](#Drag-and-drop) * [Local storage](#Local-storage) * [Failure](#Failure) * [Deployment & Local Development](#Deployment-&-Local-Development) * [Deployment](#Deployment) * [Local Development](#Local-Development) * [Making Local Clone](#Making-Local-Clone) * [Deployment](#Deployment) * [Credits](#Credits) * [Mentor](#Mentor) * [Codes](#Codes) * [Acknowledgements](#Acknowledgements) * [Copyrights](#Copyrights) --- ## Overview While the game concept is not new in a genre and my idea is not original it is taken from: [Tripledot Studios](https://apps.apple.com/us/developer/tripledot-studios/id1191319103) game: [Woodoku](https://apps.apple.com/us/app/woodoku-wood-block-puzzles/id1496354836) I chose this project as I enjoyed original game quite a lot as well as I believed it will be good programing chalange to pull it of. I was not mistaken. The simplicity of the game is as as simple as as it gets, while I do provide rules to the visitor I strongly believe and as testing shows you dont need to truly know the rules or any specific language to pick up on the simplistic rules maching to the classic games as tetris, snake or pacman and just after a one or two game sesions player gets an idea how the game plays. The beauty of such a simple games that no matter your age or language game can pickced up easily by anyone. ## User Experience (UX) ### First Time Visitor Goals * As a First Time Visitor, I want to be able to immediately understand the main purpose of the application, "Tedoku". * As a First Time Visitor, I want to be able to understand how to play the game. * As a First Time Visitor, I want to be able to choose what dificulity of the game I would like. * As a First Time Visitor, I want the pages to be responsive to be my device, no matter it's size. * As a First Time Visitor, I want to be able to read a rules of the game. ### Returning Visitor Goals * As a Returning Visitor, I want to be able to try my chance again at getting a higher score by being able to reload the game. * As a Returning Visitor, I want to see highscores and statistics of the game. * As a Returning Visitor, I want to be able to find details of dificulity levels. * As a Returning Visitor, I want to be able to return to my previous game. * As a Returning Visitor, I want to be able to see a developer details and links to his portfolio. ### Frequent Visitor Goals * As a Frequent Visitor, I want to be able to give my feedback to the developer. * As a Frequent Visitor, I want to be able to keep improving my game results and view in best scores and games played by mode. * As a Frequent Visitor, I want to be able to see reach week a new result and top score to reach. ## Design ### Colour Scheme - The main colours used on the site were taken from [Quick google search](https://visme.co/blog/website-color-schemes/) for most popular website colours. I chose no **16 Sleek and Futuristic** that provided me with dark background colour, green colour for tiles, creamy colours for game board. - Additional *Highlight* and *Destruction* colours or light blue and dark red were chosen using [Adobe colour wheal](https://color.adobe.com/create/color-wheel) to achive friendly blue and opposite red colours for the game. - Lastly I used [Google drawings](https://docs.google.com/drawings/d/1zYM5X07tbM9bjbcnPzPutqnbWnuPrkjqw5Jbvkt5qJ8/edit) That I am well familair with to create a cube shapes that automaticaly create maching off colours that I used on a boarders to create diamond-ish effect. - Since I focused on developing game first I used same list of colours to design main and home page nicely mathcing the theme. - Orriginaly I wanted a background to have few nice abstract brush strokes that would not take away from game desing or blur with important details. However I found [Bgjar](https://bgjar.com/curve-line) website creating simple background that I liked and used darkest colour from previously discovered ones as well as *Destroy* colour to create dinamicaly changing background. ### Typography - At the begining and almost though out the development I used cursive font unintentionaly on chrome browser due to a bug that did not pick up my main starting font (if it works dont fix it?). However I later discovered it was a backup and on different browsers it looked horrible. So I decided to stick with "Short Stack" as main font for entire website and "Patrick Hand" for a headers. I wanted simple and relaxed font that has no sharp edges. As a game website I believe it should contain some part of goofiness. ### Imagery - All images I have used were screenshots of the game or created by my self. Notably the [favicon](https://docs.google.com/drawings/d/1PV9lJTaGROsU-L2_aiweFqz9qzv0k4os83BYs8yg_UA/edit?usp=share_link), [Hero Immage](https://docs.google.com/drawings/d/1aUhTnydhPAQ-nGkEuJX4YXiUFeTYRWfOYv2e_tQ94YY/edit?usp=share_link) on main page and [turn](https://docs.google.com/drawings/d/1IrLDSAcdjnuRsUePY-pb7rymWmC1StTxvZYfM21RPsk/edit?usp=share_link) buttons were created using simple Google drawings. Some turned in to svg file ## Wireframes - Desktop home page - ![Home page (desktop)](./assets/readme-images/wireframes/home-page.webp) - Mobile home page - ![Home page (mobile)](./assets/readme-images/wireframes/home-page-phone.webp) - Highscores page - ![Highscores page (desktop)](./assets/readme-images/wireframes/profile.webp) - Game page - ![Game page base (desktop)](./assets/readme-images/wireframes/base-board.webp) - Game page with gameplay - ![Game page gameplay (desktop)](./assets/readme-images/wireframes/gameplay.webp) - Game board layout plan - ![Game Board layouts](./assets/readme-images/wireframes/base-board.webp) - Game board components - ![Game Board components](./assets/readme-images/wireframes/game-components.webp) - Game buton layouts - ![Game Board button layouts](./assets/readme-images/wireframes/button-layout.webp) - Game phone landscape - ![Game Board phone landscape](./assets/readme-images/wireframes/phone-landscape.webp) - Game phone portrait - ![Game Board phone portrait](./assets/readme-images/wireframes/phone-portrait.webp) ## Features | # | Feature | Desirability | Importance | Viability | Delivered | | :---: | :--- | :---: | :---: | :---: | :---: | | | Navigation | | | | | | --- | --- | --- | --- | --- | --- | | 1 | Main page | 5 | 5 | 5 | ✅ | | 2 | Game page | 5 | 5 | 5 | ✅ | | 3 | Highscore page | 5 | 5 | 5 | ✅ | | 4 | ""Play!"" button changing to ""Start new game!"" | 5 | 5 | 3 | ❌ | | 5 | Game dificulities opens up as you press ""Play!"" or ""Start new game!"" | 5 | 3 | 4 | ✅ | | 6 | Within profile page giving player a choice of the tiles style | 4 | 3 | 3 | ❌ | | -- | --- | --- | --- | --- | --- | | | Visuals | | | | | | --- | --- | --- | --- | --- | --- | | 7 | Game boad layout changing depending on height and width and determening wich one is bigger. | 5 | 5 | 5 | ✅ | | 8 | Diferent styles for the tiles and the board | 4 | 3 | 3 | ✅ | | 9 | Animations on destroying the tiles | 5 | 4 | 4 | ❌ | | 10 | Animations on the score count once points achieved | 5 | 3 | 3 | ❌ | | 11 | Flashier animation when combo points achieved | 5 | 3 | 3 | ❌ | | 12 | Home page and hoghscores components apearing on scroll | 5 | 3 | 4 | ✅ | | -- | --- | --- | --- | --- | --- | | | Game feautures | | | | | | --- | --- | --- | --- | --- | --- | | 13 | Easy dificulity - ability to flip the shapes, chance to get extra shapes, guided highlight for match | 5 | 4 | 5 | ✅ | | 14 | Medium dificulity- Same as easy but no ability to flip or extra shapes | 5 | 4 | 5 | ❌ | | 15 | Hard dificulity- Same as mediuim but timed and no highlights | 5 | 4 | 5 | ❌ | | 16 | Insane dificulity- same as hard, but with added 25% of filled tiles becomes invisiable. | 5 | 3 | 4 | ❌ | | 17 | Point count 1x points for single break of 9 | 5 | 5 | 5 | ❌ | | 18 | Point count for combo of more than 9 tiles, every extra combo adds 0.5x, Example destroying 2 row or collumn will multiply points by 1.5x. For 3 combo 2x | 5 | 5 | 4 | ❌ | | 19 | Additional point multiplier Easy 1x, Medium 1.5x Hard 2x, Insane 3x | 5 | 4 | 4 | ❌ | | 20 | ""Game over"" message | 5 | 5 | 5 | ✅ | | 21 | Automatic detection of game over | 5 | 5 | 5 | ✅ | | 22 | Ability to flip tiles | 5 | 4 | 4 | ✅ | | 23 | Upon reaching certain score Unlocking ""Insane"" dificulity | 3 | 3 | 3 | ❌ | | -- | --- | --- | --- | --- | --- | | | Redesigned Game feutures | | | | | | --- | --- | --- | --- | --- | --- | | 24 | Shape turns have limited uses | 5 | 5 | 5 | ✅ | | 25 | Shape turns are rewarded for combinations | 5 | 5 | 5 | ✅ | | 26 | Each dificulity has less starting turn points | 5 | 5 | 5 | ✅ | | 27 | Each dificulity requires more combination points to reward | 5 | 5 | 5 | ✅ | | 28 | Reward multiplier 50% for combinations for all dificulities | 5 | 5 | 5 | ✅ | | 29 | Highlight of tiles when maching tiles found during drag | 5 | 5 | 5 | ✅ | | 30 | Highlight of tiles when 9 matching tiles are found | 5 | 5 | 5 | ✅ | | 31 | Additional 20% points for medium dificulity | 5 | 5 | 5 | ✅ | | 32 | Additional 40% points for hard dificulity | 5 | 5 | 5 | ✅ | | -- | --- | --- | --- | --- | --- | | | Highscores | | | | | | --- | --- | --- | --- | --- | --- | | 33 | Player name that player can change for them self | 4 | 3 | 4 | ❌ | | 34 | Top highscore overal showing highest score game type and score | 5 | 5 | 5 | ✅ | | 35 | Top highscore weekley | 4 | 5 | 5 | ✅ | | 36 | Top streek | 4 | 3 | 4 | ❌ | | 37 | Tiles destroyed | 4 | 3 | 4 | ❌ | | 38 | Individual top score for Easy game | 5 | 4 | 5 | ✅ | | 39 | Individual top score for Medium game | 5 | 4 | 5 | ✅ | | 40 | Individual top score for Hard game | 5 | 4 | 5 | ✅ | | 41 | Individual top score for insane game | 5 | 4 | 2 | ❌ | | 42 | Ability to share game results on social media | 5 | 3 | 2 | ❌ | | 43 | Ability to see other top highscores between other players | 5 | 3 | 2 | ❌ | | 44 | Ability to see top highscores between game modes | 5 | 3 | 2 | ❌ | | 45 | Ability to see top highscores between top and week charts | 5 | 3 | 2 | ❌ | | -- | --- | --- | --- | --- | --- | | | Home page and tutorial | | | | | | --- | --- | --- | --- | --- | --- | | 46 | Video showcasing the gameplay | 4 | 3 | 4 | ❌ | | 47 | Introduction to a game and points reward | 5 | 5 | 5 | ✅ | | 48 | Explanation of individual level dificulities | 5 | 5 | 5 | ✅ | | 49 | Footer with links to creator social media. | 5 | 5 | 5 | ✅ | ## Technologies Used ### Languages Used * HTML5 * CSS * JavaScript ### Frameworks, Libraries and Programmes Used - [Google Fonts](https://fonts.google.com/) fonts used to import main fonts for the page. - [Online-Convert](https://image.online-convert.com/) was used to convert the png images to webp. - [BGjar](https://bgjar.com/curve-line) - For background generation. - [Git](https://git-scm.com/) was used for version control. - [Visual studio code](https://code.visualstudio.com/) was using most of the time when internet was not avialble. - [GitPod](https://gitpod.io/) was used as online IDE for GitHub and the terminal was used to add and commit to Git and push to GitHub. - [GitHub](https://github.com/) was and is being used as repository of the project source code and for deploying the site/ application. - [Prined version](https://websitesetup.org/javascript-cheat-sheet/) of JS cheatsheet was used when internet was not avialable. - [Favicon](https://favicon.io/favicon-converter/) was used to create favicon. - [Figma](https://www.figma.com/) was used to create wireframes - [Chrome DevTools](https://developer.chrome.com/docs/devtools/) was used to test the code and debug the code during the development process. - [W3C Markup](https://validator.w3.org/) Validation was used to test HTML code - [W3C CSS](https://jigsaw.w3.org/css-validator/) Validation Service was used to test CSS code - [Jest](https://jestjs.io/) was used to test JavaScript code - [Google sheets](https://drive.google.com/drive/u/0/folders/1_VxQCii04fFd1Zq0wxsbFM4VuxG_2guz) were used to create a small interactivle interface in order to create shapes for the game and turn them in to JavaScript Object for simple copy paste. It allowed me to experiment with diferent shapes without spending time manualy typing the code. [link](https://docs.google.com/spreadsheets/d/1rQbG19eHYj0ltU_YNrQAcVxWLgIqnsbVytKtXd3tatI/edit) ## Bugs and Solutions ### Main chalange faced and decitions made Before going in to individual smaller bugs one issue and soliution requires its own separate topic: Drag and Drop **multiple** components. *Note I had 2 attemps at solving the whole drag and drop functionality atempt no 1 was writen after I sorted it using mainly drag and drop event listeners for PC ounly, however when I started working on it again to set it up for touch functionality I reprogramed it to work with pointer event listeners instead that solved most if not all problems I had in first attempt* #### Atempt no 1 - Due to a nature of the game one of the requirements for the code is to create a shapes of multiple squares and have them interact with game board individualy. - While drag and drop functionality was new for me (not in the course) I reasearched few vidoes but the one that was my main source of information was by [Traversy Media](https://www.youtube.com/watch?v=C22hQKE_32c&t=360s) with added info from [MDN database](https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API). I used this as my louchpad of drag and drop "playground" which after few trial and error was simple enough for single element. - How ever problems started when I tried to do 2 things: Drag more than one element and scale element I am dragging. - [Drag and Drop API](https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API) has its onwn listener functions quite similar to mouse events and one of events drag over was my hope to be a triger for each of the shapes I am draging, however there was no posibility of draging multiple sibling elements. - One of the ways I tried was using *dispatchEvent()* function but it completley crashed browser due to events boucing between siblings. - Another idea sugested by a friend to attach the shapes to a mouse cursor using: *position:absolute* and width height properties. However at that moment I relised it is not needed, as it alow user to be flexible and click anywere he wants on the shape without having pices to snap around. - Another issue was to do with practicaly all *mouse* events not trigering during the drag and right after dragdrop. To my understadning all of mouse events are transfered to drag functions. I had to adopt a mix of both for the final result. - My soliution was to capture mouse position when it is clicked on one of the shapes. In turn I captured a parent div > and taken its children > recorded all X and Y cordinates and calculated center of each shape boxes. This way using *dragover* listener that gave me current mouse position, I was able to calculate all active boxes of the shape while draging their parent. - Additionaly I captured all game board dropboxes coordinates at the start of drag of all 4 of their edges and using simple conditional testing I was able to check when ever draggable box center enters the squares, and used same principal of functionality to place them in while I did not directly appended the children as in the video (that would coused parent div to go inside of one of boxes only) - Lastly the issue I had that once something is beign dragged it CAN NOT be modified via css. - This was important for me to do as my game board is 9x9 squares and on the side I wanted to fit 3 or even 4 game shapes that could be as big as 4x4. Taking that together it is 12 or even 16 squares each in the same space as game board *check early wireframes*. this means I had to make them smaller than game board sqaures and scale them up as the player pick them up. *That is how original game I got an idea from works* - I have been searching multiple ways to achieve this, via *scale*, changing width and height, transforming, creating element bigger and fitting in the smaller box yet the design of draggable "shadow element" did not change. - On top of it any element that is parent of draggable element transfers background color to dragable element and no traditional css rule has changed that, causing the same "grandparent" colour to stay on invisible *inactive* squares and edges were border radius was present. The only element background color was not takign was "body". - Since I spend a large portion of time on these 2 problems and one of them was solved I decided to change a desing of the game and create shapes of the same size as the game board by fitting less of them or rearanging the layout as well as adding no backgroudn to parent divs. - this is something I would like to revisit in a future and build up my orriginal vision. #### Atempt no 2 - Once I returned to drag and drop functionality weeks later to make it responsive on touch screens as well I researched videos about events that works with touch screens and stuck on [Web Dev Simplified](https://www.youtube.com/watch?v=MhUCYR9Tb9c) as my main reference. However drag events were still not working with touch. - I discovered [this video](https://www.youtube.com/watch?v=GU3lQTbwUZc&t=275s). The main idea was to atach anything I am tryign to drag to a mouse after the click with *position:absolute and left+right*. Same idea I have goten from friend Olegas (who is js/react developer) however I dismised it early on before. I used this idea this time to try to make pointer events being main caller for both touch and mouse events. And managed to figure out 90% of code idea my self. - The Brekathough hapened when I found this [article](https://javascript.info/mouse-drag-and-drop) That essentialy contained everything I have figured out up to that point and more to solve this puzzle. The final piece missing was this code that I took from article: ```` ball.ondragstart = function() { return false; }; ```` - All of previous problems were solved essentialy with pointer video and this article makign game function on both touch and mouse events. As well as no longer bound to drag events allowing me to edit css if I wish so and removing weird bug that would not record shape centers and cousing shape to disapear uncontrolable. - if I have to work with drag and drop or I recomend anyone to do it [Web Dev Simplified](https://www.youtube.com/watch?v=MhUCYR9Tb9c) and [article](https://javascript.info/mouse-drag-and-drop) is ideal guide for this type of purpose. ### Solved Bugs during developing - There were a bug that coused the bigger shapes of 4 width or height to split up and take over 5 leaving 1 as a gap. this is due to js maths and resizing and causing the drop area being bigger than a shapes squares. When retrieving data of shapes X and Y I added to the top and left 1% (multiplied by 1.01) as well as divided right and bottom edges by the same. This seems to solve the problem, yet the player will have to more accurate on droping shapes than innitialy. - Several resizing issues were detected when changing direction in the phone mode, and especialy when resizing sreen size while testing in responsive mode. Main issue was that shapes and buttons mostly relied on game board dimentions. During resize event listener the order of functions were not in order and changing them around *gameBoardAndScreenDimentions();* first and *setShapesContainerSize();* after seem to solve the problem - Initialy I had event listeners added to a dragEnd listener *if* section which checks if shape was droped in the game board thus creating new shape and at the end adding new event listeners. However there is an existing bug that sometimes the droped shape does not apear on the game board and new shape is created insted but no event listeners are added to new shape making the shape unusable for the remaining of the game. Instead I created spearated function and called after *if* statement and to reset all event listeners every time drop down is perfomed. **Solved with atempt no 2 of drag and drop** - Home page design was relatively smooth apart a few lineup problems that were solved using bootrstap classes and mainly sticking with mb-5 and row/col classes. However one isue that at the 2 examples of combination the text was wraping diferenly since one had a longer text. This automaticaly pushed one of pictures lower than the previous one at certain sceen breakpoints. Simple soliution I found is to place invisible span text at 1400 px when the breaking of the text start so it would treat it as extra word and snap aditional rows together at the same breakpoints. How ever I would love to find out if the is simple css soliution to conect 2 elements and comand them to be same size. - Within game screen window I have added 2 buttons for rotation and used Font awesome icons. However a regular use of them complicated a size of them and on diffenrent screens they did not responded how I wanted. There were to many situations I had to work with to make them right. I decided to try out svg file instead but FA icons requires premium account. Eventualy I meved on to creating my own icons using simle google drawings that I am well familliar with and downloaded them as as svg file and used a code from it alowing me to customize them and add in property that worked for all screen sizes - Navigation bar responsivnes using botstrap nav-bar to be open when on smaller devices and not being able to close, I spend some time tryign to figured out why it was hapening untill I simpley deleted and started over from 0 with navigation bar when I realised I linked botstrap twice. Both of starting from scratch and deleting extra link solved an issues. - navigation bar bootstrap class sticky was not working either how I wanted so I used a JS code i knww from Udemy course. - **Moved from remainign bugs** There is a rare occouring bug that when the shape is droped in the game field sometimes it does not regiter but a new shape is created instead anyway. It hapens rarely and I am not sure why it hapens or how to create the bug manualy or how to solve it at the moment. **Solved with drag and drop atempt no 2** ### Remaining Bugs - Sometimes when draging one shape a second active game shape moves in to a place of active shape but moves right back once first shape is droped. This does not actualy effect the game play just a visual clutter - If screen size is changed after dragin a shape and placing it back the shape retains dimentions of original screen size. This is not a problem in most cases apart in practice it could be a problem with galaxy fold if player does this and opens or closes the phone. - Testing on phone model One Plus it seems the overflow-x: hidden; does not work and the screen can be dragged left and right a bit ### Ideas for Future Developments * Future developments to improve on the existing game: - Return to original idea of having 3 shapes for the game as additional future. Expanding on this idea there could be an option to customise players gameplay with multiple shapes up to 4 - Animation affects for placing shapes and destroying shapes - Reward system unlocking different "Skins" for the game board and background for example when player reaches certain amount of points, makes large combo of 6 or more, Gets destruction streak and many more could be added. Skins essentialy changes a colours of game board and game pieces. - Reward player with additional sounds to replace originals. - Highscores screen were you can see other players top 10 or even top 100 and compete every week. - Multiple functionalities changign the game play - Fliping shapes in mirror insted of rotating - Rewarding players for makign a streak instead of combination - Randomly deleting squares and creating other onces - Creatign random squares that rewards extra points or rotation points - Creatign random squares that blocks a destruction for x amount of moves - Creating new random shape set after shape is droped. - Giving a timer for the game and rewarding extra time every time destruction is done (like chess blitz) - Making player versus player game - All of ideas above could be combined in to a random ruleset given for players every week encouraging them to fight for best scores every week and creatign more replayibility. ## Game Idea and fuctions procces ### Game board dimentions - Since the game board is always square I had to account for a space from top and bottom for meniu buttons, score as well as shapes. I wanted to ensure that mobile users are able to play game either verticaly and horizontaly unlike the game I got the idea from. main function looks for the min between landscape and portrait and determines wich way the board and everything else needs to lay out. - Because the board is 9 squares I added 1/2 square distance as a boarder around making everythign else some sort of division by 10 and multiplication by X depending how I wanted everything to be layered. - One note on this that I would like to improve the code and instead create variables in javascript and do all the math instead on CSS. However this would require some time to investigate and figure out for me. - Game board squared for later use are called in columns rows and square classes durign redering with some math. This helps later to find wich columns rows or squares are fully filled. - Additionaly resize event listener changes the game board depening on the screen size as well as record all open game dropbox squares for later when pointerMove and pointerUp functions are called. This is to ensure fresh data is kept if window changed dimentions ### Shape creation - In order to create shapes I wanted first of all a tool to create them. I used my skills in google sheets to create [this](https://docs.google.com/spreadsheets/d/1rQbG19eHYj0ltU_YNrQAcVxWLgIqnsbVytKtXd3tatI/edit) spreadhseet that alows me to easily create shapes object with true/false values. It essentialy detects how far the shape goes (always starting shape from top left corner) and determines if it is 1x1, 2x2, 3x3, or 4x4 square. This is important to keep in the squares always as other functions manipulate it easier. - Once I got an array ready it is all about manipulating and selectg them. randomInt(min,max) function alowed me to get random number betwen 2 given digits. Using this I chose random number betwen 0-1000. I assing each shape dificulity a procentage in thousands Starting with Easy(910), medium(60) and hard(30). Then chose random number. If it rolls anywere between 0-910 it is easy shape, then if it rolls more than 910, else if statement then looks if it is not bigger than easy+medium (970) resulting in medium shape, then last else automaticaly allings with hard. Lastly since each shape dificulity contains ten I go with randomInt(0-9) and get random shape from list of 10. - Then it comes given shape manipulation. There are 2 things. Miroring the shape, esentialy fliping verticaly and rotation. 2 functions created to handle that as per my plan I made in quick google drawing and simply rearanging the the order of the shape array. As for rotationg shapes the function does it clockwise but if done 3 times it is a same if done anticlockwise ![Mirror rearangment](./assets/readme-images/Shapes%20mirroring%20arrangement.webp) ![Rotation](./assets/readme-images/Shapes-rotation-arrangement.webp) - Finaly the array is rendered and added shape-window element and given a class of draggable * shape width that are prepared with different measurments to ensure shape always stays in the center. - For a new shapes to apear the functionality is implemented that the % of the easy/medium/hard shapes would be adjusted every turn. To ensure that it does nto get very dificult right away from my math knoweladge I knew if I make formula with power of **0<x<1** it will create [diminishing return](https://docs.google.com/spreadsheets/d/1i6MG8unq6J_bRvPEdR8JG7CDxI9pEpCv1-BizUnFuhA/edit#gid=0) starting with fast increcement and slowly adding less and less to a % of medium and hard shapes. It took a bit of gameplay between my friends to tune the nubers down but it can be easily adjusted again. I also added turn treshold to start trigering this formula in action to delay dificulity from the start and allowing player for window of oportunity at the beginign to build up some combos. ### Drag and drop - I mostly explained the isues and idea of drag and drop within bug section. However notibly 3 functions of pointerDown / ponterMove / pointerUp works along side each other to practicaly set everything off in the game that hapens. - pointerDown runs functions that once clicked on the shape it records active shapes centers in to object, as well as ads new static dimentions instead of % (this creates bug mentioned earlier) to the shape and finaly alowing the shape to be draged. - pointerMove mostly works with checking shapesBoxesCoordinates versus dropBoxesCenters to find an equal match and once all squares find its partner the highlight class is given to mark dropable locations for the shapes and deleted every time pointer move event is called again so it ensures that highlight class is not left over. (As I wrote this I think this could be a good idea for painting program or game that you draw or contol with mouse movement) - Drag Center Concept - ![Drag centers concept](./assets/images/dragable-squares-location-concept.png) - Additionaly highlightTiles() checks if player has matching squares of 9 or more and highlights in red that the shapes could be destroyed. - pointerUp is were the magic happens. Most of functionality is run right after player lifts mouse/finger and there are 2 ways: either drop shape in right place or not. It runs the same function as pointerMove checkign for avialabe squares - In case the shape is droped in the wrong place the shape simply returns back and nothing hapens. However if the shape is droped in the game board multiple things hapens: - The game creates new shape insted using the proces I described before - The game checks if the shape is creating a 9 or more group using same highlightTiles() function and trigers destruction of the shapes (Esentialy changes classes) - The game also check for end game takeing both shapes array, creatign matrix out of it. Deleting uneceseraly rows and colums and then runign every posibility agaisnt game board via trigerGameOverCheck() function. This also includes creating aditional matrixes for each varition of ucrrent shapes in case the player has turns left essentialy detecting when player has no more moves. - In all of above procces 2 audios played, one for placing the shape and one for destroying squares. - Additionaly droped shapes also runs multiple functions calulationg points for current and top scores as well adding rotation points if player deserved them. ### Local storage - I wanted to ensure that the player is able to leave and return to the game when ever pleses and not forced to play entire game as high level and patience players may take much longer time. In order to do this I used local storage to be activated every time the shape is droped. - Local storage serves 2 purpose: load up and replace empty board on page load, and fill shapes and points when the wensite is loaded again as well as load up high score in the hiscore window. ### Failure - I may call it this way but we all know that learning something is never a failure. - During a call with mentor Gareth I mentioned the idea that I wanted highscores for players to see, he gave me an idea to use google sheets API to set it up as database to record top 10 or more players in every category. However I failed to make Google Sheets API work for me. I dont believe it was programing issue but more of seting up and account so google would alow me to upload data. Something in the settings that I did not fully understand from their documentation caused API inacsessible. Since is spend to much time on it already I decided to drop that feature until further I learn backend and server managment. ## Deployment & Local Development ### Deployment * The project was deployed to GitHub Pages using the following steps: 1. Login or signup to GitHub and locate the GitHub Repository [GitHub Repository](https://github.com/Erikas-Ramanauskas/Milestone-Project-2). 2. On the repository page, navigate to Settings and click on it. 3. Within the Settings page, under Source choose Branch: main, then /root and click Save. 4. After about a minute, the site is published. ### Local Development * How to Fork To fork the repository, use the following steps: 1. Login or signup to Github and locate the repository. 2. Click the Fork button in the top right corner ### Making Local Clone 1. Login or signup to GitHub and locate the GitHub Repository [GitHub Repository](https://github.com/Erikas-Ramanauskas/Milestone-Project-2). 2. Under the repository name, click "clone" or "download". 3. To clone the repository using HTTPS, under "Clone with HTTPS", copy the link. 4. Open the terminal in your preferred code editor and change the current working directory to the location you want to use for the cloned directory. 5. Type git clone, and then paste the URL you copied in Step 3. 6. Press Enter. Your clone will be created. ## Credits ### Mentor * Gareth was fenomenal in helping and advicing on my creativity plan and gave helpfull tips and inspiration with this project. Masive thank-you to him ### Codes * Credit to [Jonas Schmedtmann](https://www.udemy.com/user/jonasschmedtmann/) udemy Course that I learned midjority of javascript before starting Code institute course. Notable code taken apart general lessons I learned: - randomInt() function - Entire index.js file, creating apearing sections on scroll as well as sticky navigation bar - Local stotage functionality * Credit and thanks to numerous tutorials on YouTube by seasoned developers. - Thanks to [Web Dev Simplified](https://www.youtube.com/@WebDevSimplified) for a number of code lessons in various topics; - Thanks to [Kevin Powell](https://www.youtube.com/@KevinPowell) for a number of code lessons in various nainly CSS designs that I learned for this and previous project; ## Acknowledgements [Tripledot Studios](https://apps.apple.com/us/developer/tripledot-studios/id1191319103) game: [Woodoku](https://apps.apple.com/us/app/woodoku-wood-block-puzzles/id1496354836) is were I pucked up idea and general rule set for this game. Added my own twist to game rules and dificulity levels ## Copyrights [Erikas Ramanauskas, 2023](https://www.linkedin.com/in/erikas-ramanauskas) Visit [TSTING.md](TESTING.md)
JavaScript project for Code institute
css3,drag-and-drop,game,game-development,html5,javascript,puzzle-game,tedoku,bootstrap5
2023-04-04T11:33:20Z
2023-05-09T00:03:40Z
null
1
0
59
0
0
2
null
null
HTML
Joalor64GH/Foreverbox
desktop
# Foreverbox What is this mod? <br> The mod ever, that's what. Feel free to check out the [changelog](/CHANGELOG.md). ## Play on My Website * https://sites.google.com/view/joalor64website-new/foreverbox/ ## Downloads * PC: https://mega.nz/file/3fRHGaTQ#CIXVXfFRWdb8WX88b0gl9T0-975Kogh-n6f-uTXpH8U * Android: https://mega.nz/file/GeB1hIQI#_1doR18TWxRespbA2Vepzq0Ph_7W3Bm2h8jmo0_1zaw ## Credits * Joalor64 - Made the Mod * SO FAR SO GOOD - Incredibox ### Special Thanks * [PFF](https://www.youtube.com/@Incredifrance62) - Fixed the Android port, W man * [BOOGO x SEAL](https://boogoxseal.xyz) - Incredibox Modding Tools
An Incredibox mod that is the best and you should definitely play it please.
css,html,incredibox,javascript,mod
2023-04-05T13:08:38Z
2024-05-04T20:45:05Z
null
2
1
91
0
3
2
null
null
HTML
umangbhalodiya/Electron-React-Redux-Vite
main
# electron-vite-react [![awesome-vite](https://awesome.re/mentioned-badge.svg)](https://github.com/vitejs/awesome-vite) ![GitHub stars](https://img.shields.io/github/stars/caoxiemeihao/vite-react-electron?color=fa6470) ![GitHub issues](https://img.shields.io/github/issues/caoxiemeihao/vite-react-electron?color=d8b22d) ![GitHub license](https://img.shields.io/github/license/caoxiemeihao/vite-react-electron) [![Required Node.JS >= 14.18.0 || >=16.0.0](https://img.shields.io/static/v1?label=node&message=14.18.0%20||%20%3E=16.0.0&logo=node.js&color=3f893e)](https://nodejs.org/about/releases) English | [简体中文](README.zh-CN.md) ## 👀 Overview 📦 Ready out of the box 🎯 Based on the official [template-react-ts](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts), project structure will be familiar to you 🌱 Easily extendable and customizable 💪 Supports Node.js API in the renderer process 🔩 Supports C/C++ native addons 🐞 Debugger configuration included 🖥 Easy to implement multiple windows ## 🛫 Quick start ```sh npm create electron-vite ``` ![electron-vite-react.gif](/public/electron-vite-react.gif) ## 🐞 Debug ![electron-vite-react-debug.gif](/public/electron-vite-react-debug.gif) ## 📂 Directory structure Familiar React application structure, just with `electron` folder on the top :wink: *Files in this folder will be separated from your React application and built into `dist-electron`* ```tree ├── electron Electron-related code │ ├── main Main-process source code │ └── preload Preload-scripts source code │ ├── release Generated after production build, contains executables │ └── {version} │ ├── {os}-{os_arch} Contains unpacked application executable │ └── {app_name}_{version}.{ext} Installer for the application │ ├── public Static assets └── src Renderer source code, your React application ``` ## 🚨 Be aware This template integrates Node.js API to the renderer process by default. If you want to follow **Electron Security Concerns** you might want to disable this feature. You will have to expose needed API by yourself. To get started, remove the option as shown below. This will [modify the Vite configuration and disable this feature](https://github.com/electron-vite/vite-plugin-electron-renderer#config-presets-opinionated). ```diff # vite.config.ts export default { plugins: [ ... - // Use Node.js API in the Renderer-process - renderer({ - nodeIntegration: true, - }), ... ], } ``` ## 🔧 Additional features 1. electron-updater 👉 [see docs](src/components/update/README.md) 1. playwright ## ❔ FAQ - [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron-renderer#dependencies-vs-devdependencies) - [C/C++ addons, Node.js modules - Pre-Bundling](https://github.com/electron-vite/vite-plugin-electron-renderer#dependency-pre-bundling)
App Boiler plate built in ElectronJs + ReactJs + React-Redux + ViteJS
css,electronjs,html,javascript,react-redux,reactjs,sass,scss,typescript,vitejs
2023-04-08T15:22:12Z
2023-04-08T15:28:06Z
null
1
0
4
0
0
2
null
MIT
TypeScript
kostyanp95/r.avaflow
master
# r.avaflow WEB application The documentation is available in English - [README_en.md](./README_en.md) ## Статус разработки 🚧 **ВНИМАНИЕ: Проект находится в активной разработке.** 🚧 Авторы прилагают все усилия для улучшения программного обеспечения, но на данном этапе не могут гарантировать абсолютную стабильность. Проект предоставляется "как есть", без каких-либо гарантий. ## О проекте Этот проект создан с целью помочь ученым и исследователям в области наук о Земле (геоморфология, гляциология, изучение селевых потоков) в работе с моделированием селевых потоков, лавин или лахаров. Суть проекта заключается в том, чтобы позволить пользователю, который может не иметь достаточных навыков в области ИТ, таких как работа с терминалом и установка и настройка необходимых зависимостей, работать с программой, имеющей понятный и удобный графический интерфейс пользователя (GUI/UI). Другими словами, полная автоматизация установки и настройки всех требуемых зависимостей GRASS GIS и основного расширения r.avaflow. Конечная цель проекта - полностью автоматизировать подготовительную рутину работы с r.avaflow, чтобы пользователь мог просто начать работать с этим программным обеспечением через веб-интерфейс, который будет обрабатывать ввод пользователя и отправлять его на выполнение в расширение GRASS GIS r.avaflow. **Авторы:** Пуганов К. А., Солодова А. С., Петраков Д. А. - r.avaflow: WEB application. # О r.avaflow r.avaflow представляет собой инструмент программного обеспечения с открытым исходным кодом, поддерживаемый ГИС, для моделирования сложных, каскадных массовых потоков по произвольному рельефу. Он использует численную схему NOC-TVD (Wang и др., 2004) вместе с моделью типа Voellmy, с улучшенной версией многофазной модели потока Пудасаини (Pudasaini и Mergili, 2019), или с моделью равновесия движения для потоков, которые не являются чрезвычайно быстрыми. Доступны также упрощенные подходы. Дополнительные функции включают эрозию, отложение, дисперсию и фазовые превращения. Начальная масса может быть определена через растровые карты и/или гидрографы. r.avaflow включает возможность использовать многоядерные вычислительные среды для одновременного запуска нескольких симуляций в качестве основы для анализа чувствительности параметров и оптимизации. Кроме того, результаты симуляций визуализируются через карты и диаграммы, и генерируются данные для 3D и погружающей виртуальной реальности. **Авторы:** Mergili, M., Pudasaini, S.P., 2014-2023. r.avaflow - Инструмент моделирования массовых потоков. https://www.avaflow.org # Текущие системные требования для работы Windows 10. Минимальная версия 1903 (обновление за май 2019 года) для последующей установки WSL или Docker Desktop. Или дистрибутив Linux, поддерживающий Docker. Или macOS минимальной версии 10.13 (High Sierra) для Docker. # Зачем использовать Docker? Для использования r.avaflow необходимо установить множество зависимостей, включая Python, язык R, GRASS GIS (с пакетами). Более того, некоторые из них требуют конкретных версий. Для среднестатистических пользователей это может быть трудоемким процессом и пустой тратой времени. Готовый образ Docker будет содержать все необходимые установленные зависимости требуемых версий, а также полностью готовую к работе среду. Если пользователь хочет попробовать r.avaflow в качестве инструмента для нескольких экспериментов, а затем удалить его, это будет гораздо легче сделать. Единственное, что нужно удалить - это Docker. # Участие в разработке Мы приветствуем ваши предложения и пулл-реквесты!
This project is created with the aim of helping scientists and researchers in the field of earth sciences (geomorphology, glaciology, debris flow studies) to work with the modeling of debris flows, avalanches, or lahars.
c,docker,grass-gis,grass-gis-addons,javascript,nodejs,python,r
2023-04-02T18:32:38Z
2024-03-07T09:08:06Z
null
1
0
14
0
0
2
null
null
C
rbhomale17/mock-api-server
main
null
CraftHub-Project Users API Server Repository
javascript
2023-03-29T09:24:35Z
2023-03-29T18:14:17Z
null
1
0
3
0
0
2
null
null
JavaScript
the0shail/CRM-for-smartbits
devbranch
# crm ## Project setup ``` yarn install ``` ### Compiles and hot-reloads for development ``` yarn serve ``` ### Compiles and minifies for production ``` yarn build ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/).
Техническое задание от компании SmartBits - Vue.js v3, Javasctipt, FontAwesome, VueRoute, TypeScript, Sass, Node.js
html-css-javascript,javascript,nodejs,vuejs,fontawesome5,scss,typescript
2023-04-05T17:25:06Z
2023-04-13T19:03:18Z
null
1
0
15
0
0
2
null
null
Vue
devshruti/Pharmacy
main
# -boss-page-9475 Deployed Link: [https://6429ae19a6d9132112ddb61c--pharmacydev.netlify.app/](https://6502bafb39a8712d2b6c0daf--pharmaaacy.netlify.app/) Pharmacy is a user-friendly website. This website aims to replicate the features and functionalities of PharmEasy. TECH-STACK: <ul> <li> HTML </li> <li> CSS </li> <li> JavaScript </li> <li>React js</li> <li>Chakra UI</li> </ul> Features : <ul> <li> Login Page</li> <li> Cart page </li> <li>Checkout Page</li> <li> Home Page </li> <li> Product pages</li> <li>Health Care Page</li> </ul></br> Home Page ![Screenshot 2023-04-02 221413](https://user-images.githubusercontent.com/115461429/229369818-d9852d13-bfc6-462d-b60e-520b0d1fd1f2.png) Login Page ![Screenshot 2023-04-02 223153](https://user-images.githubusercontent.com/115461429/229369837-a0c4dfc4-c9ee-4ea4-832d-60398a36e3ca.png) ![Screenshot 2023-04-02 223228](https://user-images.githubusercontent.com/115461429/229369845-3cab5e68-9ac0-4896-9460-a9aa2c8fe448.png) HealthCare Page ![Screenshot 2023-04-02 222908](https://user-images.githubusercontent.com/115461429/229369868-0000903d-4230-41f3-8a09-3b1ef305ecd5.png) Product Page ![Screenshot 2023-04-02 223004](https://user-images.githubusercontent.com/115461429/229369904-2da39919-cdab-4aec-94d4-71e0bb62665e.png) Individual Product page ![Screenshot 2023-04-02 222832](https://user-images.githubusercontent.com/115461429/229369924-af2d9f77-a80c-4cb2-89e6-ac858cb93f2e.png) Cart Page ![Screenshot 2023-04-02 222737](https://user-images.githubusercontent.com/115461429/229369955-b4ca8f1f-dc56-43a8-b74a-b266799f72e2.png) Address Page ![Screenshot 2023-04-02 223051](https://user-images.githubusercontent.com/115461429/229369997-f9aeea37-be03-4b82-a706-b8c6ca54382b.png) checkout page ![Screenshot 2023-04-02 223117](https://user-images.githubusercontent.com/115461429/229370012-62c79a69-f0f6-4bfe-ba72-76c85628d6db.png)
Pharmacy is a user-friendly website. This website aims to replicate the features and functionalities of PharmEasy.
chakra-ui,css,html,javascript,reactjs
2023-03-28T14:58:36Z
2023-09-14T07:52:19Z
null
2
3
18
0
0
2
null
null
JavaScript
0xBitBuster/talking-chatgpt-extension
main
# Talking ChatGPT Extension ![Showcase Image](https://lh3.googleusercontent.com/K_94Aozi0ytD2ck8_wTSdllO4fzlxvefN8XRgsTxupHq1d-w4d4L4QkWn3EAd38z1hHw8cD57cC5xyFz0c-m5Si3mA=w640-h400-rw) Convert your speech into text so you can have a real conversation with (a talking) ChatGPT! This chrome extension allows users to put their speech into text in real-time using Javascript. Users can choose between 62 languages and dialects. They also have the ability to choose whether and how ChatGPT should read out the responses. <a href="https://chrome.google.com/webstore/detail/talking-chatgpt/dppbeenbobngogcdfnocicajiegcofmo">View Extension</a> ## Getting Started ### Prerequisites - Chrome Browser ### Usage Go to `chrome://extensions` and upload the extension directory ## Quick Note Due to a known chrome SpeechSynthesis bug, the TTS feature may sometimes stop after 15 seconds. ## Contributing Contributions are welcome! If you have a feature request or bug report, please open an issue. If you want to contribute code, please fork the repository and submit a pull request. ## License This project is licensed under the MIT License - see the LICENSE file for details.
ChatGPT Speech-To-Text Extension using Javascript
browser-extension,chatgpt,chrome-extension,gpt,javascript,speechtotext,texttospeech
2023-04-07T16:34:43Z
2024-03-06T21:36:49Z
null
1
0
6
0
0
2
null
MIT
JavaScript
fahad9988/Shopping-Quest
master
<h1>Shopping Quest</h1> <h2>Description</h2> <p>This is the clone of Amazon website, world's largest e-commerce website which deals with the sales of various products like clothing products, electronics etc. This is a collaborative project completed in a span of 5 days.</p> <h2>Homepage</h2> <img src="https://i.ibb.co/PQ8jBfL/Screenshot-9996.png" alt="Fashionista" border="0"> <h2>Login/Signup Page</h2> <img src="https://i.ibb.co/9gMqLnr/Screenshot-9997.png" alt="Fashionista" border="0"> <h2>Products Page</h2> <img src="https://i.ibb.co/4JG7Z8F/Screenshot-9998.png" alt="Fashionista" border="0"> <h2>Single Product Page</h2> <img src="https://i.ibb.co/G574p8c/Screenshot-9999.png" alt="Fashionista" border="0"> <h2>Cart Page</h2> <img src="https://i.ibb.co/0tx6Dm9/Screenshot-10000.png" alt="Fashionista" border="0"> <h2>Checkout Page</h2> <img src="https://i.ibb.co/BZwk33s/Screenshot-10001.png" alt="Fashionista" border="0"> <h2>Tech Stacks used in this project</h2> <ul> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> <li>React</li> <li>React-Redux</li> <li>Chakra UI</li> <li>NodeJS</li> <li>ExpressJS</li> <li>MongoDB</li> </ul> <h2>Features</h2> <ul> <li>Home Page</li> <li>Login Page & Functionality</li> <li>Products Page</li> <li>Filter Functionality</li> <li>Single Product Page</li> <li>Cart Page</li> <li>Checkout</li> <li>Admin Page</li> </ul> <h2>Deployed Link</h2> <p>https://shopping-quest.vercel.app/<p>
This is the clone of Amazon website, world's largest e-commerce website which deals with the sales of various products like clothing products, electronics etc. This is a collaborative project completed in a span of 5 days.
chakra-ui,css3,expressjs,html5,javascript,mongodb,nodejs,reactjs,redux
2023-03-27T14:13:15Z
2023-05-18T13:41:01Z
null
5
20
60
4
2
2
null
null
JavaScript
JuanMartinez503/Movie-Search-Engine
main
# Movie-Search ## Description A website where you can search for movie information such as, Title, Year Released, Genre, and Plot. Additionally the site will also auto-generate information on the streaming services that are currently playing the movie. A list of the past searches will be saved using local storage. And a list of movie titles with matching words to your search will be listed as well. We used the first API to gather the movie poster image and the info that goes in the info box. The second API we used gives us the info about where the movie is streaming. Used HTML, CSS, and JavaScript to build the app. ## URL's [github](https://github.com/JuanMartinez503/Movie-Search-Engine) [live site](https://juanmartinez503.github.io/Movie-Search-Engine/) ## Screenshot of Project ![](./Screenshot.png) ## Resource and Assistance Credit https://www.omdbapi.com/?i=tt3896198&apikey=dd2719c9 https://developers.themoviedb.org/3/movies/get-movie-details https://fonts.google.com/specimen/Coming+Soon?query=coming+soon https://www.amctheatres.com/movie-theatres/evansville/amc-evansville-16 https://www.digitalocean.com/community/tutorials/how-to-change-a-css-background-images-opacity https://getbootstrap.com/docs/5.1/getting-started/introduction/ https://code.jquery.com/jquery-3.4.1.min.js https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js https://www.google.com/
Created a user-friendly website that allows users to search for movie information, including Title, Year Released, Genre, and Plot. Additionally, the site seamlessly auto-generates data on the streaming services currently featuring the movie, while saving past searches using local storage.
api,bootstrap5,front-end,javascript,jquery,localstorage,movie,teamwork-projects
2023-04-07T00:43:33Z
2023-08-23T13:53:24Z
null
3
19
38
0
0
2
null
null
JavaScript
PromzzyKoncepts/Book-Appointment-Front-end
dev
<a name="readme-top"></a> <div align="center"> <img src="https://user-images.githubusercontent.com/84629565/202665566-ba1a8ed3-041f-45bc-b21b-efdcc357189b.png" alt="logo" width="140" height="auto" /> <br/> </div> <!-- TABLE OF CONTENTS --> # 📗 Table of Contents - [📖 About the Project](#about-project) - [🛠 Built With](#built-with) - [Tech Stack](#tech-stack) - [Key Features](#key-features) - [Website Mockup 📱 💻 🖥️](#screenshots) - [🖺 Entity Relationship Diagram](#er-diagram) - [<img src="https://cdn-icons-png.flaticon.com/512/5360/5360804.png" width="23" height="20"/> Kanban Board](#kanban-board) - [<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/React-icon.svg/539px-React-icon.svg.png" width="23" height="20"/> React Frontend](#react-frontend) - [<img src="https://emojipedia-us.s3.amazonaws.com/source/microsoft-teams/337/spiral-notepad_1f5d2-fe0f.png" width="23" height="20"/> API Documentation](#api-docs) - [🚀 Live Demo](#live-demo) - [💻 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) - [❓ FAQ](#faq) - [📝 License](#license) <!-- PROJECT DESCRIPTION --> # 📖 Regal Cars Backend <a name="about-project"></a> ![homepage](https://user-images.githubusercontent.com/54780027/231420790-2eb788b4-5260-417e-b2e1-d47ff7cc14b7.PNG) **Regal Cars** is car rental application where the user can create accounts, log in and reserve a set of different cars. It is built and connected by using two different repos: Back-end(Rails) and Front-end(React/Redux). ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li><a href="https://reactjs.org/">React.js</a></li> </ul> </details> <details> <summary>Server</summary> <ul> <li>Rails</li> </ul> </details> <details> <summary>Database</summary> <ul> <li><a href="https://www.postgresql.org/">PostgreSQL</a></li> </ul> </details> <!-- Features --> ### Key Features <a name="key-features"></a> - **[Car List endpoints]** - **[Authentication to access Reservations]** - **[Authenticated Users can add/remove a Car]** - **[Authenticated Users can reserve a Car]** <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- API Docs --> ![API docs](https://user-images.githubusercontent.com/54780027/231417300-1e05901f-da89-4475-b7f6-a17102811dda.PNG) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ER DIAGRAM--> ## :card_index: Entity Relationship Diagram <a name="er-diagram"></a> ![erd](https://user-images.githubusercontent.com/54780027/231417553-6cf720cb-76db-47f9-8923-3b7c8af175f9.PNG) <!-- React Frontend --> ## <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/React-icon.svg/539px-React-icon.svg.png" width="23" height="20"/> React Frontend <a name="react-frontend"></a> - Here is the Backend part of the project [Back end](https://github.com/PromzzyKoncepts/Book-Appointment-App.git) ## 🚀 kanban board <a name="board"></a> - Here is the kanban board of the project - ![kanban board](https://user-images.githubusercontent.com/54780027/231417798-2c94099c-f01a-478a-b9c4-3f76d9276478.PNG) ## 🚀 Live Demo <a name="live-demo"></a> - [Live Demo :rocket:](https://regal.netlify.app/) :smiley: # COMING SOON! <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 To run this project you need: `vscode` and `node` ### Install ``` npx create-react-app ``` ### Usage || Clone To run the project, execute the following command: ``` git clone https://github.com/PromzzyKoncepts/Book-Appointment-Front-end.git ``` ``` npm install ``` ```sh npm start ## then go to localhost:8080 ``` Run tests ``` npm test # if you see any snapshots already created in __tests__ folder, #kindly DELETE the snapshot folder before running test, ELSE run npm test ``` <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ## 👥 Authors (4 Micronauts) <a name="authors"></a> 👤 **PROMISE OKECHUKWU** - GitHub: [@promzzykoncepts](https://github.com/PromzzyKoncepts) - Twitter: [@pr0mzzy](https://twitter.com/prOmzzy) - LinkedIn: [promiseokechukwu](https://www.linkedin.com/in/promiseokechukwu/) 👤 **Ndikumana Isaie** - GitHub: [ndikumanaisaie](https://github.com/ndikumanaisaie) - Twitter: [Ndikuma38670724](https://twitter.com/Ndikuma38670724) - LinkedIn: [Ndikumana Isaie](https://www.linkedin.com/in/ndikumanaisaie/) 👤 **Abdullah Khan** - GitHub: [@Abdullah](https://github.com/Abdullah2213565) - Twitter: [@Abdullah](https://twitter.com/dulakhan024) - LinkedIn: [@Abdullah](https://www.linkedin.com/in/abdullah-khan2002/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> - [ ] **[Admin Roles and access to add New lux Cars]** - [ ] **[Keep count of cars using addtional attribute]** <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> Give a ⭐️ if you like this project! <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> I would like to thank: - [Microverse](https://www.microverse.org/) - Code Reviewers - Many thanks to [Murat Korkmaz](https://www.behance.net/muratk) for the wonderful design <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FAQ (optional) --> ## ❓ FAQ <a name="faq"></a> - **How I can install react** - You can follow the [official guide](https://react.dev/learn) to install react. If you have node installed, you can run `npx create-react-app` to install react. - **How to run project?** - After cloning the repository, run `npm i` and then run `nmp start`. This will run the server on `localhost:8080`. You can change the port number if you want. - **How I can run tests?** - After cloning the repository, run `npm test` to run the tests. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE --> ## 📝 License <a name="license"></a> This project is [MIT](./MIT.md) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
Regal Cars is car rental application where the user can create accounts, log in and reserve a set of different cars. It is built and connected by using two different repos: Back-end(Rails) and Front-end(React/Redux).
javascript,jwt-authentication,material-ui,rails-api,reactjs,redux,ruby,styled-components
2023-03-31T09:27:30Z
2023-04-12T19:54:55Z
null
3
14
218
0
0
2
null
null
JavaScript
peterdtitan/bookstore
development
<a name="readme-top"></a> # 📗 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) - [❓ FAQ (OPTIONAL)](#faq) - [📝 License](#license) <!-- PROJECT DESCRIPTION --> # 📖 Bookstore CMS<a name="about-project"></a> **Bookstore** is a simple book app for reading and updating progress of books. ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> > The following tech stack was used to build this project: <details> <summary>Client</summary> <ul> <li><a href="https://javascript.com/">JavaScript</a></li> <li><a href="https://javascript.com/">React</a></li> </ul> </details> <!-- Features --> ### Key Features <a name="key-features"></a> - **View books** - **View current book progress** <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🚀 Live Demo <a name="live-demo"></a> > View a deployed and ready version of the app on [Render](https://bookstore-cms-widh.onrender.com/) - [Live Demo Link](https://bookstore-cms-widh.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: ``` npm ``` ### Setup Clone this repository to your desired folder: ```sh cd my-folder git clone https://github.com/peterdtitan/bookstore.git ``` ### Install Install this project with: ``` npm install ``` ### Usage To run the project, execute the following command: ``` npm start ``` ### Run tests To run tests using jest, run the following command: ``` npm test ``` <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ## 👥 Authors <a name="authors"></a> > The following users authored this project codebase: 👤 **Author1** - GitHub: [Peter Okorafor](https://github.com/peterdtitan) - Twitter: [PeterDeTitan](https://twitter.com/PeterDeTitan) - LinkedIn: [Peter OKorafor](https://linkedin.com/in/peterokorafor) <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> > In the future, the following features will be considered: - [ ] **Better UI** <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- CONTRIBUTING --> ## 🤝 Contributing <a name="contributing"></a> Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](../../issues/). <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- SUPPORT --> ## ⭐️ Show your support <a name="support"></a> > If you like this project please follow and give it a star ⭐️ <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## ❓ FAQ <a name="faq"></a> - **Is this an Open Source Project?** - Yes it is, however, there would not be subsequent deployments and maintenance of the app. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE --> ## 📝 License <a name="license"></a> This project is [MIT](./MIT.md) licensed. <p align="right">(<a href="#readme-top">back to top</a>)</p>
A Bookstore CMS made with React and TailwindCSS. Uses an intro to redux for saving and managing progress on books read and added to shelf.
javascript,react,reactjs,redux,redux-toolkit
2023-04-08T09:45:56Z
2023-05-22T22:28:59Z
null
1
6
30
0
0
2
null
null
JavaScript
yaohaixiao/subscribers.js
main
# subscribers.js [![npm version](https://img.shields.io/npm/v/@yaohaixiao/subscribers.js)](https://www.npmjs.com/package/@yaohaixiao/subscribers.js) ![Gzip size](http://img.badgesize.io/https://cdn.jsdelivr.net/gh/yaohaixiao/subscribers.js/subscribers.min.js?compression=gzip&label=gzip%20size) [![prettier code style](https://img.shields.io/badge/code_style-prettier-07b759.svg)](https://prettier.io) [![Coverage](https://codecov.io/gh/yaohaixiao/delegate.js/branch/main/graph/badge.svg)](https://codecov.io/gh/yaohaixiao/subscribers.js) [![npm downloads](https://img.shields.io/npm/dt/@yaohaixiao/subscribers.js)](https://npmcharts.com/compare/@yaohaixiao/subscribers.js?minimal=true) [![MIT License](https://img.shields.io/github/license/yaohaixiao/subscribers.js.svg)](https://github.com/yaohaixiao/delegate.js/blob/master/LICENSE) subscribers.js - 小巧且实用的 JavaScript 发布/订阅工具库。 ## 项目初衷 编写 subscribers.js 主要是在日常的开发中经常需要使用到发布/订阅模式,同时也为初学 JavaScript 的朋友了解 [JavaScript中的发布订阅模式实现与应用](http://www.yaohaixiao.com/blog/publish-subscribe-pattern-in-javascript/) 所以自己也整理了一个。虽然简单,但基本的功能都有了,还是挺好用的。这个项目的 API 文档就使用到了 subscribers.js。 ## Features - 原生 JavaScript 编写,无任何依赖; - 基于 topic 主题的消息,且支持命名空间的订阅/发布; - 支持异/同步 发布消息; - 支持 UMD 规范,同时也提供 ES6 模块调用; - API 接口易于理解和调用简单; ## Browsers support | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](https://github.com/yaohaixiao/delegate.js/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](https://github.com/yaohaixiao/delegate.js/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](https://github.com/yaohaixiao/delegate.js/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](https://github.com/yaohaixiao/delegate.js/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](https://github.com/yaohaixiao/delegate.js/)</br>Opera | |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | IE11, Edge | last 10 versions | last 10 versions | last 10 versions | last 10 versions | ## 安装说明 subscribers.js 支持 UMD 规范和 ES6 的模块调用方式,可以在 Node.js 环境中(仅适用于单线程的 Node.js 应用)使用 npm 安装,也可以在浏览器中使用 script 标签引入到页面。 ### npm 安装 ```sh # install from npmjs.com npm i -S @yaohaixiao/subscribers.js ``` ### 浏览器中调用 在浏览器中调用 subscribers.js,可以选择调用 jsdelivr 提供的 CDN 服务中的文件,也可以使用本地的 subscribers.js 文件。 #### CDN 调用 JS 文件 ```html <script src="https://cdn.jsdelivr.net/gh/yaohaixiao/subscribers.js/subscribers.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/yaohaixiao/subscribers.js/subscribers.core.min.js"></script> ``` #### 本地调用 JS 文件 ```html <script src="/path/to/subscribers.min.js"></script> <script src="/path/to/subscribers.core.min.js"></script> ``` ### Node.js 中调用 ```js const subscribers = require('@yaohaixiao/subscribers.js') ``` ### ES6 模块中调用 ```js // 调用完整功能的 subscribers 对象 import subscribers from '@yaohaixiao/subscribers.js/subscribers' // 调用 Core 版本的 subscribers 对象,仅包含以下方法: // on() // emit() // off() import subscribers from '@yaohaixiao/subscribers.js/core' ``` ## Usage ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const Person = { name: 'robert', age: 24 } // 创建订阅主题的函数 const handler = (msg, data) => { console.log( msg, data ) } /* ==== 订阅主题 ==== */ // 将函数添加到特定主题的订阅者列表中 subscribers.on('log', handler) // 设置 handler 的执行上下文为 Person subscribers.on('log', handler, Person) // 采用命名空间式的消息主题 subscribers.on('log.info', handler) subscribers.on('log.info.update', handler) /* ==== 发布主题 ==== */ // 发布一个(名为:log)消息,log 会触发 subscribers.emit('log', 'hello world!') // log/log.info/log.info.update 主题的处理器函数都将执行 subscribers.emit('log.info.update', `hello world! it's update!`) /* ==== 取消订阅 ==== */ // 将 handler 函数从 log 主题中订阅者列表中移除 subscribers.off('log', handler) const token = Subscribers.on('alert', handler) // 将 handler 函数从 alert 主题中订阅者列表中移除 subscribers.off('alert', token) // 移除 log 主题及订阅者列表 subscribers.off('log') ``` ## API 文档 subscribers.js 中封装了一系列常用方法,并且适用起来非常方便。 ### on(topic, handler) 订阅主题,并给出处理器函数。 Category: `Core` #### Parameters ##### topic Type: `String` Default: `` (必须)主题名称。 ##### handler Type: `Function` Default: `` (必须)主题的处理器函数。 #### Returns Type: `String` 唯一的 token 字符串,例如:'guid-1'。 ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const handler = () => { console.log('author is Robert') } const Person = { name: 'robert', age: 24 } subscribers.on('author', handler) // 设置 handler 的执行上下文为 Person subscribers.on('log', handler, Person) // 支持命名空间形式的主题的订阅 subscribers.on('author.career', handler) subscribers.on('author.career.years', handler) // 发布消息 subscribers.emit('author', 'Yaohaixiao') // -> `Author: Yaohaixiao` subscribers.emit('author.career', 'Programmer') // -> `Author: Programmer` subscribers.emit('author.career.years', 23) // -> `Author: 23` ``` ### once(topic, handler) once() 方法用于订阅主题,并给出处理器函数,仅执行一次。 #### Parameters ##### topic Type: `String` Default: `` (必须)主题名称。 ##### handler Type: `Function` Default: `` (必须)主题的处理器函数。 #### Returns Type: `String` 唯一的 token 字符串,例如:'guid-1'。 ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const handler = () => { console.log('author is Robert') } subscribers.once('author', handler) // 发布消息 subscribers.emit('author') // 再次发布 handler 将不再执行 subscribers.emit('author') ``` ### all(handler) all() 方法用于订阅所有主题消息发布,任何消息发布都会执行 handler() 处理器。 #### Parameters ##### handler Type: `Function` Default: `` (必须)处理器函数。 #### Returns Type: `String` 唯一的 token 字符串,例如:'guid-1'。 ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const handler = (msg) => { console.log(`handler:${msg}`) } const callback = (msg) => { console.log(`handler:${msg}`) } subscribers.on('author', handler) subscribers.on('career', handler) // 监听所有消息 subscribers.all(callback) // 发布消息 subscribers.emit('author', 'Robert') // -> 'handler:Robert' // 每次都会触发 all() 方法的订阅处理方法 // -> 'callback:Robert' subscribers.emit('career', 'Programmer') // -> 'handler:Programmer' // -> 'callback:Programmer' ``` #### emit(topic, data[, async = true]) emit() 用于发布订阅主题信息。 subscribers.js 参考了([PubSubJS](https://github.com/mroderick/PubSubJS))默认是采用异步方式发布的。以确保在消费者处理主题时,主题的发起者不会被阻止。 当然 emit() 方法也支持同步方式(浏览器环境下比较适合)发布主题。 Category: `Core` #### Parameters ##### topic Type: `String` Default: `` (必须)主题名称。 ##### data Type: `Object` Default: `` (必须)消息传递的数据对象。 ##### async Type: `Boolean` Default: `true` (可选) 是否异步发布。默认值:true。 - 当 async 设置为 true(默认) 时,异步发布; - 当 async 设置为 false 时,同步发布; #### Returns Type: `subscribers` subscribers 对象,以便实现链式调用。 ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const handler = (msg) => { console.log(msg) } subscribers.on('author', handler) subscribers.on('career', handler) subscribers.on('years', handler) // 异步发布 subscribers.emit('author', 'ok') // -> 'ok' // 同步发布 // 延迟10毫秒:应该看输出 ok 后输出 programmer subscribers.emit('career', 'programmer', false) // -> 'programmer' ``` ### notify(topic, data) notify() 用于同步发布订阅主题信息,是 emit() 方法的别名。 #### Parameters ##### topic Type: `String` Default: `` (必须)主题名称。 ##### data Type: `Object` Default: `` 必须)消息传递的数据对象。 #### Returns Type: `subscribers` subscribers 对象,以便实现链式调用。 ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const handler = (msg) => { console.log(msg) } subscribers.on('author', handler) subscribers.on('career', handler) subscribers.on('years', handler) // 依次输出:'author'、'career'、'years' subscribers.notify('author', 'ok') // -> 'ok' subscribers.notify('career', 'programmer') // -> 'programmer' subscribers.notify('years', 19) // -> 19 ``` ### off(topic[, token]) off() 方法用来取消订阅主题。 Category: `Core` #### Parameters ##### topic Type: `String` Default: `` (必须)主题名称。 ##### token Type: `Function|String` Default: `` (可选)订阅主题的处理器函数或者唯一 Id 值。 #### Returns Type: `subscribers` subscribers 对象,以便实现链式调用。 ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const handler = (msg) => { console.log('handler:', msg) } const callback = (msg) => { console.log('callback:', msg) } subscribers.on('author', handler) const token = subscribers.on('career', handler) const guid = subscribers.on('career', handler) // 取消订阅 author 主题 subscribers.off('author', handler) // 删除订阅 career 主题下的 handler 处理器 subscribers.off('career', token) // 删除订阅 career 主题下的 callback 处理器 subscribers.off('career', guid) // 订阅 career 主题下2个处理器都删除后 // 会取消整个 author 主题订阅,因此再发布 author 主题消息 // 不会有任何反应 subscribers.emit('career', 'web developer') ``` ### get([topic]) get() 方法用来获取全部或者包含 topic 主题或者订阅 token 的订阅者信息。 #### Parameters ##### topic Type: `String` Default: `` (可选)主题名称。 - 不传递 topic 参数,返回全部订阅者信息; - 传递 topic 参数 - 如果是 topic 主题:返回包含 topic 主题的订阅者信息; - 如果是订阅 token:返回包含此 token 信息的 topic 主题的订阅者信息; #### Returns Type: `Array | Object` 返回全部或者包含 topic 主题或者订阅 token 的订阅者信息。 ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const handler = (msg) => { console.log('handler:', msg) } subscribers.on('author', handler) subscribers.on('career', handler) subscribers.on('years', handler) const token = subscribers.on('years', handler) // 获取 author 主题订阅者信息 subscribers.get('author') // -> 返回 author 主题的订阅信息 // [ // topic: 'author', // callback: handler, // token: 'guid-1' // ] subscribers.get(token) // -> 返回 career 主题的订阅信息 // [ // topic: 'career', // callback: handler, // token: 'guid-2' // ] // 获取所有订阅者信息 subscribers.get() // -> 返回所有主题的订阅信息 // { // 'author': [ // topic: 'author', // callback: handler, // token: 'guid-1' // ] // 'career': [ // topic: 'career', // callback: handler, // token: 'guid-2' // ] // 'years': [ // topic: 'years', // callback: handler, // token: 'guid-3' // ] // } ``` ### has([topic, isDirect = true]) has() 方法用于判断是否存在包含 topic 指定的订阅者信息。 #### Parameters ##### topic Type: `String` Default: `` (可选)主题名称。 - 传递 topic 参数:判断指定 topic 或者消息主题的命名空间中包含 topic 的订阅信息; - 不传递 topic 参数:判断是否包含任何订阅信息; ##### isDirect Type: `Boolean` Default: `true` (可选)是否完全匹配 topic。 - true:匹配完全相同的主题或者主题的命名空间中包含 topic 的订阅; - false:只匹配与指定 topic 主题完全相同的主题; #### Returns Type: `Boolean` - true:有相关的订阅信息; - false:无相关的订阅信息; ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const handler = (msg) => { console.log('handler:', msg) } subscribers.on('author', handler) subscribers.on('author.career.years', handler) subscribers.has('author.career') // => true - 因为包含 author 主题 subscribers.has('author.career.year') // => true 因为有完全匹配的主题 subscribers.has('author.career', false) // => false 因为没有完全匹配的主题 subscribers.has() // => true ``` ### remove(topic) remove() 方法用来删除特定 topic 主题的订阅者信息。 #### Parameters ##### topic Type: `String|Array` Default: `` (必须)主题名称。 - String 类型:删除单个 topic 订阅信息; - Array 类型:删除多个 topic 订阅信息; #### Returns Type: `subscribers` subscribers 对象,以便实现链式调用。 ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const handler = (msg) => { console.log('handler:', msg) } const callback = (msg) => { console.log('callback:', msg) } subscribers.on('author', handler) subscribers.on('publish', callback) // 删除 author 主题相关的所有信息 subscribers.remove('author') // 同时删除 author 和 publish 主题相关的所有信息 subscribers.remove(['author', 'publish']) ``` #### clear() clear() 方法用于清理所有订阅者(主题和处理器的)信息。 #### Returns Type: `subscribers` subscribers 对象,以便实现链式调用。 ```js import subscribers from '@yaohaixiao/subscribers.js/subscribers' const handler = (msg) => { console.log('handler:', msg) } subscribers.on('author', handler) subscribers.on('author.career', handler) subscribers.on('author.career.years', handler) // 清理所有订阅者(主题和处理器的)信息 subscribers.clear() subscribers.has() // -> false ``` ## License Licensed under MIT License.
subscribers.js 小巧且实用的发布/订阅 JavaScript 工具库!
javascript,publish,subscribe,subscribers
2023-04-01T05:21:15Z
2023-09-23T10:41:41Z
2023-08-14T02:27:11Z
1
0
47
0
0
2
null
MIT
JavaScript
movarnell/js-dogparkscheduler
main
# My Dog Park Scheduler Project for Bootcamp This is a React app for creating and managing appointments for dog owners. The app includes multiple components, such as the Entry component, which is a form where dog owners can input their name, their dog's name, and an appointment date. The Schedule component displays a table of existing appointments and allows users to edit or delete appointments. The app uses useState hooks to manage user input and display updates. Additionally, the code includes functions for formatting dates and sorting appointments by time. ## Technologies Used - React.js - [MockAPI.io](http://mockapi.io/) - JavaScript - HTML - CSS ## About This project was completed during a bootcamp and I am now working to develop it into a live site with front and backend functionality. You can view the new version's code at [https://github.com/movarnell/townhomedogpark](https://github.com/movarnell/townhomedogpark).
This is a React app for creating and managing appointments for dog owners. The app includes multiple components, such as the Entry component, which is a form where dog owners can input their name, their dog's name, and an appointment date.
crud-api,crud-application,javascript,mockapi-io,react-hooks,reactjs,rest-api,react
2023-04-01T13:58:31Z
2023-05-05T17:34:59Z
null
1
0
13
0
0
2
null
null
JavaScript
Vikram043/Shop-now
main
Shop Clues Website Clone Welcome to the Shop Clues Website Clone repository! This project is a stunning replica of the popular online shopping platform, Shop Clues. With meticulous attention to detail and a passion for creating exceptional user experiences, we've recreated the essence of Shop Clues right here. Table of Contents Introduction Features Demo Installation Usage Contributing License Introduction The Shop Clues Website Clone is a web application built using the latest web technologies to mimic the look and feel of Shop Clues. It is designed to showcase the skills and expertise of our development team in front-end and back-end web development, as well as UI/UX design. Features User Authentication: Sign up and log in securely to access personalized shopping features. Browsing Categories: Explore a wide range of categories just like on the original Shop Clues website. Product Listing: View products with images, descriptions, and prices. Search Functionality: Find products easily using the powerful search feature. Shopping Cart: Add products to your cart and proceed to checkout. Payment Gateway Integration: Experience seamless payments for your purchases. Order History: Keep track of your order history for future reference. Responsive Design: Enjoy a consistent and visually appealing experience across devices. Demo: https://voluble-crepe-4e2edb.netlify.app/ Check out the live demo of the Shop Clues Website Clone here. Installation To set up the project locally, follow these steps: Clone the repository: git clone https://github.com/your-username/shop-clues-clone.git Navigate to the project directory: cd shop-clues-clone Install the required dependencies: npm install Usage Run the development server: npm run start Access the application locally: http://localhost:3000 Contributing We welcome contributions from the community to enhance the Shop Clues Website Clone. To contribute, follow these steps: Fork the repository Create a new branch: git checkout -b feature/your-feature-name Make your changes and commit them: git commit -m "Add your message here" Push the changes to your branch: git push origin feature/your-feature-name Create a pull request detailing your changes Please ensure your contributions align with our code of conduct. License The Shop Clues Website Clone is licensed under the MIT License. ## Some sample images #Landing page ![image](https://user-images.githubusercontent.com/119391188/229413930-bd293a1c-3f7b-4a0c-a178-17881759c55f.png) #Product Page ![image](https://user-images.githubusercontent.com/119391188/229414115-3e56555c-bd8d-4312-a457-68be86224e7a.png) #Sign-In /SIgn-Up ![image](https://user-images.githubusercontent.com/119391188/229414338-5ff3fc19-645a-4c38-9226-f0f731e8482c.png) #Cart Page ![image](https://user-images.githubusercontent.com/119391188/229414420-a85e502e-2f63-4d62-9523-d07d40007bcb.png) #Payment Page ![image](https://user-images.githubusercontent.com/119391188/229414510-ae214b10-bd31-4ac2-920e-9bac209c99ef.png)
The Shop-now Website Clone is a remarkable web application that faithfully replicates the popular online shopping platform, Shop Clues. It boasts an intuitive user interface, seamless product browsing, secure payment processing, and responsive design, providing users with an exceptional shopping experience.
cookie,css,express,html5,javascript,mongodb,nodejs
2023-03-28T08:01:58Z
2023-07-21T15:50:29Z
null
2
8
23
0
0
2
null
null
JavaScript
Mk4Levi/MK-ToDo-List
main
# To-Do-List Web App ## Website Link => https://mk-react-leet-code.vercel.app/ => Add new item to this Todolist web app to achieve your daily targets <h2>Getting Started</h2> 1. To get started with this project, you will need to have `Node.js` and `NPM` installed on your system. 2. First, you need to open a `Terminal` in your system and `Clone` this repository by using : ```bash git clone https://github.com/Mk4Levi/MK-ToDo-List.git ``` 3. Navigate to the Project's directory : ```bash cd MK-ToDo-List ``` 4. Install all Dependencies used in this Project : ```bash npm install ``` 5. Finally, host it on local server : ```bash node app.js ``` 6. Now just search this in your browser to view the live running application in your Local sysytem : ```bash http://localhost:3000 ``` <h2>Paths & Files</h2> ### Structure of the Folders & Files in this Repo : ```text . ├── public │ └──images | └──css ├── views │ └──about.ejs | └──footer.ejs │ └──header.ejs | └──list.ejs ├── app.js ├── date.js ├── index.html ├── .eslintrc.json ├── .gitattributes ├── .gitignore ├── package-lock.json ├── package.json ├── README.md ``` # Thank You
This To-Do List web-app offers a streamlined and efficient way to manage tasks by creating to-do items which will be stored in the MONGO-DB Atlas Database.
css3,expressjs,html5,javascript,mongodb,mongoose,json,ejs
2023-03-27T13:26:38Z
2023-05-23T18:41:59Z
null
1
0
13
0
0
2
null
null
JavaScript
Sonu-Shettiyar/LimeRoad-Clone
main
## Lane Attire Documentation ### Introduction Hello Everyone! This documentation provides an overview of Lane Attire, an individual project developed during Construct Week at Masai School. Lane Attire is a clone of LimeRoad.com, an E-commerce website that offers a wide range of fashion clothing products and accessories. The project was completed within a span of 5 days, and it showcases the usage of various technologies, including JavaScript, HTML, CSS, and the React framework. Additionally, libraries such as react-router-dom and Chakra UI were utilized to enhance the functionality and aesthetics of the site. ### Project Details - Project Name: Lane Attire - Original Website: LimeRoad.com (https://www.limeroad.com) - Project Duration: 5 days - Tech Stack: JavaScript, HTML, CSS, React ### Features 1. User Registration and Authentication: - Users can create accounts and securely log in to Lane Attire. - Authentication ensures that only registered users can access certain features. 2. Product Listings: - Lane Attire provides an extensive collection of fashion clothing products and accessories. - Users can browse through various categories and view detailed information about each product. 3. Cart Functionality: - Users can add products to their shopping cart for a convenient shopping experience. - The cart displays a summary of the selected items, including the total price. 4. Search and Filtering: - A search functionality enables users to find specific products based on keywords or product names. - Filtering options allow users to refine their search results based on categories, sizes, colors, and other attributes. 5. User Reviews and Ratings: - Users can leave reviews and ratings for products they have purchased. - These reviews and ratings help other users make informed decisions when considering a product. ### Tech Stack and Libraries 1. JavaScript: The project is built using JavaScript for implementing the interactive functionalities and logic. 2. HTML: HTML is used for creating the structure and content of the webpages. 3. CSS: CSS is responsible for styling and designing the user interface of Lane Attire. 4. React: The React framework is utilized to build reusable components and efficiently manage the application's state. 5. React Router DOM: This library enables client-side routing and navigation within the Lane Attire application. 6. Chakra UI: Chakra UI is a library used for creating accessible and customizable UI components. ### Project Preview To experience the actual Lane Attire website, please click on the link below: 🌐 [Lane Attire Website Preview](https://idyllic-hummingbird-265d79.netlify.app/) ### Snapshots Here are some snapshots of the Lane Attire website for you to preview: ![Screenshot (1413)](https://user-images.githubusercontent.com/119413823/229427936-93c46f09-1f26-4670-8143-549fd424f9d8.png) ![Screenshot (1406)](https://user-images.githubusercontent.com/119413823/229428030-86fd769d-f808-4c31-be97-e0758311a5db.png) ![Screenshot (1408)](https://user-images.githubusercontent.com/119413823/229428003-4ebf5d39-6985-40ff-853f-8e81163c842b.png) ![Screenshot (1405)](https://user-images.githubusercontent.com/119413823/229428038-442e6323-cbb1-4de7-879c-cbb0ca908453.png) ![Screenshot (1407)](https://user-images.githubusercontent.com/119413823/229428013-c13e6a83-5970-46ed-b79c-ea25eba3db53.png) ![Screenshot (1409)](https://user-images.githubusercontent.com/119413823/229427975-47dd8abe-b601-490a-b1fc-db71d3894e78.png) ![Screenshot (1411)](https://user-images.githubusercontent.com/119413823/229427952-4ec298f7-7bd4-46be-a18d-cdb535ac0e8e.png) ![Screenshot (1412)](https://user-images.githubusercontent.com/119413823/229427946-3e3e483a-2f9c-433b-a693-f193d4f4c91f.png) Thank you for your interest in Lane Attire! If you have any further questions or feedback, please feel free to reach out.
An E-commerce website that offers a wide range of fashion clothing products and accessories
chakra-ui,css3,html5,javascript,json-api,json-server,react
2023-03-28T11:08:27Z
2023-08-14T10:10:43Z
null
2
8
24
0
1
2
null
null
JavaScript
EricNeves/crudCLI
main
null
:sparkles: CRUD CLI with Javascript, NodeJS, JSON, CommanderJS, Test (MochaJS) and more..
commanderjs,javascript,json,mochajs,nodejs,test
2023-03-30T15:19:31Z
2023-04-22T21:36:18Z
null
1
0
18
0
0
2
null
MIT
JavaScript
Dan1Nicolas/Little-Nightmares-II-Synopsis
main
<h1 align="center"> Little Nightmares II - Synopsis</h1> <p align="center"> project aimed at electronic game companies and the gamer community. <br/> </p> <p align="center"> <a href="#-Preview">Preview</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; <a href="#-tecnologias">technologies</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; <a href="#-projeto">Project</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p> <br> ## 🔖 Preview see the preview of the project: <img alt="This is the project preview" src="./src/imagens/imagePreview.png" width="100%"> ## 🚀 technologies This project was developed with the following technologies: - HTML and CSS - JavaScript - Git and Github ## 💻 Project The project and synopsis of the game Little Nightmare II. - [Visit the project online] (https://dan1nicolas.github.io/Little-Nightmares-II-Synopsis/) --- Made with ♥ <br> Daniel Nicolas Leoterio
Project aimed at electronic game companies and the gamer community.
css,git,github,javascript,html,html5
2023-03-28T17:09:12Z
2023-10-31T10:23:23Z
null
1
0
4
0
0
2
null
null
HTML
Christelle-12/To-do-list
main
# To-do-list # 📗 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) - [👥 Authors](#authors) - [🔭 Future Features](#future-features) - [🤝 Contributing](#contributing) - [⭐️ Show your support](#support) - [🙏 Acknowledgements](#acknowledgements) - [❓ FAQ (OPTIONAL)](#faq) - [📝 License](#license) # 📖 Awesome books project <a name="about-project"></a> ## HTML+CSS Setup **HTML+CSS Setup** is an open source project aimed at building a safer, secure, fast, efficient and more realiable website ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> <details> <summary>Client</summary> <ul> <li>HTML</li> <li>CSS</li> <li>JS</li> </ul> </details> <details> <summary>Server</summary> </details> <p align="right">(<a href="#readme-top">back to top</a>)</p> ## Key Features - npm packages - html, css, and js renders the 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: <ul> <li>Vs code</li> <li>npm packages</li> </ul> ### Setup Clone this repository to your desired folder: https://github.com/Christelle-12/To-do-list.git <p align="right">(<a href="#readme-top">back to top</a>)</p> ### Install 1. Clone the repo: https://github.com/Christelle-12/To-do-list.git 2. Install npm packages: npm.install 3. Install webpack: webpack.config.js <p align="right">(<a href="#readme-top">back to top</a>)</p> ### Usage To run tests, run the following command: <ul> <li>run npm i</li> <li>run npm start</li> <li>npm run build </li> </ul> ### Run Tests to run tests, run the following command <ul> <li>npx stylelint "**/*.{css,scss}"</li> <li>npx eslint .</li> <li>npx hint .</li> </ul> ## 👥 Authors <a name="authors"></a> 👤 **Author** 👤 Nirere Marie Christelle - GitHub: [@Christelle-12](https://github.com/Christelle-12) - Twitter: [@Chr1Nirere](https://twitter.com/Chr1Nirere) <p align="right">(<a href="#readme-top">back to top</a>)</p> ## Future Features - Make it a complete project - Make user friendly interface <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/BranBayou/awsome-books-project/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 to give a positive feedback and comments that will go along way in making the project even better. <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 🙏 Acknowledgments <a name="acknowledgements"></a> I would like to thank Microverse for this exercise. <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 📝 License <a name="license"></a> This project is [MIT](LICENSE) licensed.
In this milestone I created a to do list website which allows the user to add,upadte and remove tasks from the list as they want,In order to accomplish this I used HTML,CSS and JAVASCRIPT
css,html,javascript,webapack
2023-04-05T11:07:00Z
2023-04-08T12:56:40Z
null
1
4
28
1
1
2
null
MIT
JavaScript
harshi0102/SetupWebpack-
main
<a name="readme-top"></a> # 📖 Webpack-project<a name="about-project"></a> **webpack-project** is a project done for the activity "Set up project with webpack" of the Microverse Program. The goal is to learn to use webpack. # Desktop Version View <img src="Screenshot_3.jpg" alt="desktop-version" width="650" height="auto"> ## 🛠 Built With <a name="built-with"></a> - HTML - CSS - JavaScript ### Key Features <a name="key-features"></a> - **Use Webpack** - **Use Custom Webpack Configuration** <p align="right">(<a href="#readme-top">back to top</a>)</p> <p align="right">(<a href="#readme-top">back to top</a>)</p> ## 👥 Authors <a name="authors"></a> 👤 **Harshika Govind** - GitHub: [@githubhandle](https://github.com/harshi0102) - Twitter: [@twitterhandle](https://twitter.com/harshika0102me/) - LinkedIn: [LinkedIn](https://www.linkedin.com/in/harshikagovind) ## ⭐️ Show your support <a name="support"></a> Give a ⭐️ if you like this project! <p align="right">(<a href="#readme-top">back to top</a>)</p>
webpack-project is a project done for the activity "Set up project with webpack" of the Microverse Program. The goal is to learn to use webpack.
css,javascript,webpack
2023-04-03T18:54:26Z
2023-04-03T21:00:14Z
null
1
0
4
0
0
2
null
MIT
JavaScript
Mk4Levi/Manthan-MK-WebApp
main
# MK-Backend Web App => MK-Backend Web App is a backend app built with Javascript and it's server is built with Express.js. It has Signup and Login page where user's credentials will be stored in my MongoDB-Atlas Database. ## Website Link => https://manthan-mk-web.onrender.com/ ## Project's Screenshots => ![image](./public/images/ss1.png) ![image](./public/images/ss2.png) ![image](./public/images/ss3.png) ![image](./public/images/ss4.png) <h2>Getting Started</h2> 1. To get started with this project, you will need to have `Node.js` and `NPM` installed on your system. 2. First, you need to open a `Terminal` in your system and `Clone` this repository by using : ```bash git clone https://github.com/Mk4Levi/Manthan-MK-WebApp.git ``` 3. Navigate to the Project's directory : ```bash cd Manthan-MK-WebApp ``` 4. Install all Dependencies used in this Project : ```bash npm install ``` 5. Finally, host it on local server : ```bash node app.js ``` 6. Now just search this in your browser to view the live running application in your Local sysytem : ```bash http://localhost:3000 ``` <h2>Paths & Files</h2> ### Structure of the Folders & Files in this Repo : ```text . ├── public │ └──images | └──css ├── src │ └──db | └──models | └──app.js ├── templates │ └── partials | └──footer.hbs | └──header.hbs | └──navbar.hbs | └── views │ └──aboutmk.hbs | └──index.hbs │ └──login.hbs | └──register.hbs ├── .eslintrc.json ├── .gitattributes ├── .gitignore ├── package-lock.json ├── package.json ├── README.md ``` # Thank You
MK-Backend Web App is a backend app built with Javascript and it's server is built with Express.js. It has Signup and Login page where user's credentials will be stored in my MongoDB-Atlas Database.
bootstrap5,css,expressjs,handlebars,javascript,mongodb,nodejs
2023-04-01T15:54:53Z
2023-07-13T06:41:13Z
null
1
2
29
0
0
2
null
null
Handlebars
Eggy115/TypeScript
main
<h1 align="center">TypeScript</h1> <p align="center"> <a href="#overview">Overview</a> • <a href="#about">About</a> • <a href="#usage">Usage</a> • <a href="#contributing">Contributing</a> • <a href="#license">License</a> </p> ## Overview This repository contains various TypeScript programs and scripts that can be used for different purposes. ## About TypeScript is a statically-typed programming language that is a superset of JavaScript. It was developed by Microsoft and released in 2012. TypeScript adds optional static typing, classes, and interfaces to JavaScript, making it easier to build and maintain large-scale applications. TypeScript code is transpiled into JavaScript code that can run in any modern web browser or server-side environment that supports JavaScript. Some of the benefits of using TypeScript include improved code quality, better maintainability, and enhanced tooling support. ## Usage 1. Make sure you have Node.js installed on your system. You can download it from the official website at https://nodejs.org. 2. Open a command prompt or terminal window. 3. Run the following command to install TypeScript globally: ``` npm install -g typescript ``` This will install the latest version of TypeScript globally on your system. 4. Verify that TypeScript is installed by running the following command: ``` tsc --version ``` This should print the version number of TypeScript that you just installed. 5. Clone the repository ``` git clone https://github.com/Eggy115/TypeScript.git ``` 6. Navigate to the directory 7. Run `npm install` to install dependencies 8. Run `npm start` to start the program ## Contributing Contributions are always welcome! Follow these steps to contribute: 1. Fork the repository and make your changes. 2. Submit a pull request with your changes. 3. Create an issue if you find a bug or have a feature request. Please make sure to adhere to the [code of conduct](CODE_OF_CONDUCT.md) and the [contributing guidelines](CONTRIBUTING.md). ## License This repository is licensed under the [GPLv3 License](https://www.gnu.org/licenses/gpl-3.0.html). See the [LICENSE](LICENSE) file for more information.
TypeScript
typescript,javascript,ts,typescript-examples,typescript-lang,typescript-language,typescript-library,lots-of-boilerplate,eggy115,star
2023-04-01T15:43:36Z
2023-04-12T12:19:20Z
null
1
0
31
0
2
2
null
GPL-3.0
TypeScript
ErsaGunTosun/HowManyMinutes
main
# How Many Minutes Chrome extension that calculates the remaining time of iftar and sahur. ## How To Use ``` * Project file is downloaded and unzipped * Enters the extensions page of the web browser * Developer mode on Extensions Page is activated * After the developer mode is turned on, the unpackaged item has been uploaded section is clicked and the project file is selected. * extensions are enabled. ``` ## Details ### API * Used API [link](https://namaz-vakti.vercel.app/) ### Cities json file * Used cities json [file](https://gist.github.com/serong/9b25594a7b9d85d3c7f7)
Chrome extension that calculates the time until iftar and suhoor
browser-extension,chrome,chrome-extension,javascript,timer
2023-03-28T12:34:28Z
2023-04-06T04:49:25Z
null
1
0
6
0
0
2
null
null
JavaScript
mahabubx7/awesome-books-es6
main
<!-- 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](#triangular_flag_on_post-deployment) - [👥 Authors](#authors) - [🔭 Future Features](#future-features) - [🤝 Contributing](#contributing) - [⭐️ Show your support](#support) - [🙏 Acknowledgements](#acknowledgements) - [📝 License](#license) <!-- PROJECT DESCRIPTION --> # 📖 First Capstone <a name="about-project"></a> > This site is built as part of an exercise at Microverse. The site is about a Awesome Books **The Awesom Books project** i ## 🛠 Built With <a name="built-with"></a> ### Tech Stack <a name="tech-stack"></a> > This project is built with HTML and CSS and javascript for the most part. <details> <summary>Client</summary> <ul> <li><a href="#">HTML</a></li> </ul> </details> <details> <summary>Server</summary> <ul> <li><a href="#">Live server</a></li> </ul> </details> <details> <summary>Database</summary> <ul> <li><a href="#">No Databse</a></li> </ul> </details> <!-- Features --> ### Key Features <a name="key-features"></a> - **Explore Casts** - **About page** - **Buy Tickets** <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LIVE DEMO --> ## 🚀 Live Demo <a name="live-demo"></a> - [Live Demo](https://mahabubx7.github.io/awesome-books-es6/) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- GETTING STARTED --> ## 💻 Getting Started <a name="getting-started"></a> > This project is made using Mostly HTML and CSS To get a local copy up and running, follow these steps. ### Prerequisites In order to run this project you need to follow the below steps ### Setup Clone this repository to your desired folder: ```sh cd my-folder git clone https://github.com/mahabubx7/awesome-books-es6.git ``` - ### Install Install this project with: `Luxon` for Date-time. ### Usage To run the project, execute the following command: <!-- Example command: ```sh index.html ``` ---> ### Deployment You can deploy this project using github pages <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS --> ## 👥 Authors <a name="authors"></a> 👤 **Author: Mahabub** - GitHub: [@githubhandle](https://github.com/mahabubx7) - Twitter: [@twitterhandle](https://twitter.com/mahabub__7) - LinkedIn: [LinkedIn](https://linkedin.com/in/mahabubx7) <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FUTURE FEATURES --> ## 🔭 Future Features <a name="future-features"></a> > In the Future the project may include - [ ] **Live Chat** - [ ] **Twitter Feed** - [ ] **Youtube Integration** <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 you can buy me coffee. Contact detail is above. <p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS --> ## 🙏 Acknowledgments <a name="acknowledgements"></a> Thank you 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>
This Awesome books project is based on an online website that allows users to add/remove books and their authors from a list of books or to form a library of books which are stored in a local storage
css,es6,html,javascript
2023-03-27T07:55:39Z
2023-03-27T10:46:07Z
null
1
1
12
0
0
2
null
MIT
JavaScript
guicostads/gaming-platform-registration
main
# gaming-platform-registration Multi step form for a gaming platform - made with React. / Formulário para cadastro em plataforma de jogos - feito com React. ### Development In this project I used the Context API for sharing data between components and react-router for page routing. All the styling was made with pure CSS. # Screenshots ### Desktop ![2023-05-08](https://user-images.githubusercontent.com/104312621/236832123-e2afad5e-c201-4111-a111-07ccd528561b.png) ![2023-05-08 (1)](https://user-images.githubusercontent.com/104312621/236832387-5607ea55-29aa-4f9b-8c0e-13fadde4f0c4.png) ![2023-05-08 (2)](https://user-images.githubusercontent.com/104312621/236832533-a15c57cb-a695-4296-ae31-ee8723122e7f.png) ![2023-05-08 (3)](https://user-images.githubusercontent.com/104312621/236832786-2aab2434-4234-4b76-91a0-f55ef6d9b658.png) ![2023-05-08 (9)](https://user-images.githubusercontent.com/104312621/236833173-cd62a07d-58df-4bc7-a781-59c9e3feab1e.png) ### Mobile ![2023-05-08 (4)](https://user-images.githubusercontent.com/104312621/236833373-af00de5a-394f-4b2e-ada1-384ebcfd269b.png) ![2023-05-08 (5)](https://user-images.githubusercontent.com/104312621/236833586-e7ca9dc6-8169-4aee-ae44-913202044645.png) ![2023-05-08 (6)](https://user-images.githubusercontent.com/104312621/236833812-84223e0c-9077-4420-bb6e-8613d26a79c2.png) ![2023-05-08 (7)](https://user-images.githubusercontent.com/104312621/236833973-f59402ec-aa5c-4822-b215-149bd104837b.png) ![2023-05-08 (8)](https://user-images.githubusercontent.com/104312621/236834137-f1c71428-a109-4832-976b-8e53eb78723c.png)
Multi step form for a gaming platform made with React. / Formulário para cadastro em plataforma de jogos feito com React.
javascript,react
2023-04-05T19:19:20Z
2023-05-29T18:48:25Z
null
1
0
25
0
0
2
null
null
JavaScript
harshi0102/todolistpractice
main
# To Do List Live-Demo (https://harshi0102.github.io/todolistpractice/) <div align="left"> <img src="to-do-list-javascript.gif" alt="image" width="650" height="auto"> </div> I have a working to-do list app. It is very simple to use and it is very easy to add new tasks. You can add, edit, remove and mark tasks as completed. You can also save your tasks to local storage and load them when you open the app again.
To Do List - it is a self practice todolist app built on html,css and javascript that allows the user to add or remove todos in the todo list app
css,html5,javascript
2023-04-04T15:39:50Z
2023-05-28T14:57:38Z
null
1
0
4
0
0
2
null
MIT
JavaScript
maik-emanoel/credit-card-form
main
<h1 align="center"> Formulário de Cartão de Crédito - BoraCodar#13 </h1> ![preview](./.github/preview.png) [Clique aqui para acessar](https://maik-emanoel.github.io/credit-card-form/) ## 🚀 Tecnologias Esse projeto foi desenvolvido com as seguintes tecnologias: - HTML - CSS - JavaScript - Git and GitHub ## 💻 Projeto Este é um projeto de uma interface de um Formulário de Cartão de Crédito.<br> Obs: Projeto construído a partir do layout proposto no desafio [#BoraCodar13](https://boracodar.dev/) realizado pela [Rocketseat](https://rocketseat.com.br). Após o desenvolvimento do projeto inicial, adicionei novas features, tais quais: - Layout responsivo (Adaptado para telas menores) - Animação ao tocar no cartão - Animação de loading ao clicar no botão - Inputs com pequenas validações - Mensagem de êxito - Mudança do tipo do cartão de acordo com o número inicial - Entre outras pequenas modificações. ## 🔖 Layout Você pode visualizar o layout do projeto proposto através [DESSE LINK](https://www.figma.com/community/file/1222904930776225825). É necessário ter conta no [Figma](https://figma.com) para acessá-lo.
Credit card form interface
css,html,javascript
2023-04-01T02:48:25Z
2023-04-22T00:09:10Z
null
1
0
30
0
1
2
null
null
CSS
HeyPuter/kv.js
main
<h3 align="center"><img width="300" alt="KV.JS logo" src="https://raw.githubusercontent.com/HeyPuter/kv.js/main/logo.png"></h3> <h3 align="center">Advanced in-memory caching module for JavaScript.</h3> <h4 align="center">For when you need caching but running Redis would be an overkill.</h4> <hr> KV.JS is a fast, in-memory data store written in pure JavaScript, heavily inspired by Redis and Memcached. It is capable of handling multiple data types, including strings, lists, sets, sorted sets, hashes, and geospatial indexes. Additionally, **with more than 140 functions**, KV.JS supports a vast variety of operations, ranging from `SET`, `GET`, `EXPIRE`, `DEL` to `INCR`, `DECR`, `LPUSH`, `RPUSH`, `SADD`, `SREM`, `HSET`, `HGET`, and many many more. ## Installation ```bash npm install @heyputer/kv.js ``` ## Usage ```javascript const kvjs = require('@heyputer/kv.js'); // Create a new kv.js instance const kv = new kvjs(); // Set a key kv.set('foo', 'bar'); // Get the key's value kv.get('foo'); // "bar" // Delete the key kv.del('foo'); // Set another key kv.set('username', 'heyputer'); // Automatically delete the key after 60 seconds kv.expire('username', 60); ``` ## More usage examples <details> <summary><strong><code>decr</code></strong></summary> ```javascript // Assuming the key 'counter' has been set, decrement the value of the key by 1 kv.decr('counter'); ``` </details> <details> <summary><strong><code>decrby</code></strong></summary> ```javascript // Assuming the key 'counter' has been set, decrement the value of the key by 5 (output: -5) kv.decrby('counter', 5); // Assuming the key 'counter' has been set, decrement the value of the key by -3 (output: 3) kv.decrby('counter', -3); // Assuming the key 'counter' has been set, decrement the value of the key by 10 (output: -7) kv.decrby('counter', 10); // Assuming the key 'counter' has been set, decrement the value of the key by 0 (output: 0) kv.decrby('counter', 0); // Assuming the key 'counter' has been set, decrement the value of the key by -7 (output: 4) kv.decrby('counter', -7); ``` </details> <details> <summary><strong><code>del</code></strong></summary> Delete specified key(s). If a key does not exist, it is ignored. ```javascript // Delete a single key ("key1"), returns 1 if the key was deleted, 0 if it did not exist or has expired. kv.del("key1"); // Delete multiple keys ("key2" and "key3"), returns the number of keys deleted (0, 1, or 2) depending on which keys existed and were not expired. kv.del("key2", "key3"); // Attempt to delete a non-existent key ("nonExistentKey"), returns 0 since the key does not exist. kv.del("nonExistentKey"); // Attempt to delete an expired key ("expiredKey"), returns 0 if the key has expired. kv.del("expiredKey"); // Delete multiple keys ("key4", "key5", "key6"), returns the number of keys deleted (0 to 3) depending on which keys existed and were not expired. kv.del("key4", "key5", "key6"); ``` </details> <details> <summary><strong><code>exists</code></strong></summary> Check if one or more keys exist. ```javascript // Check if a single key ("key1") exists, returns 1 if the key exists and is not expired, 0 otherwise. kv.exists("key1"); // Check if multiple keys ("key2" and "key3") exist, returns the number of existing keys (0, 1, or 2) that are not expired. kv.exists("key2", "key3"); // Check if a non-existent key ("nonExistentKey") exists, returns 0 since the key does not exist. kv.exists("nonExistentKey"); // Check if an expired key ("expiredKey") exists, returns 0 if the key has expired. kv.exists("expiredKey"); // Check if multiple keys ("key4", "key5", "key6") exist, returns the number of existing keys (0 to 3) that are not expired. kv.exists("key4", "key5", "key6"); ``` </details> <details> <summary><strong><code>expire</code></strong></summary> ```javascript // Set a key's time to live in seconds without any option kv.expire('username', 60); // Set a key's time to live in seconds only if the key does not have an expiry time kv.expire('username', 120, {NX: true}); // Set a key's time to live in seconds only if the key already has an expiry time kv.expire('username', 180, {XX: true}); // Set a key's time to live in seconds only if the key's expiry time is greater than the specified time kv.expire('username', 240, {GT: true}); // Set a key's time to live in seconds only if the key's expiry time is less than the specified time kv.expire('username', 300, {LT: true}); ``` </details> <details> <summary><strong><code>expireat</code></strong></summary> ```javascript // Set the TTL for key "user1" to expire in 30 seconds. kv.expireat("user1", Math.floor(Date.now() / 1000) + 30); // Set the TTL for key "user2" to expire at a specific UNIX timestamp (e.g. 1700000000), only if the key does not already have an expiry time. kv.expireat("user2", 1700000000, {NX: true}); // Set the TTL for key "user3" to expire in 45 seconds, only if the key already has an expiry time. kv.expireat("user3", Math.floor(Date.now() / 1000) + 45, {XX: true}); // Set the TTL for key "user4" to expire in 60 seconds, only if the new TTL is greater than the current TTL. kv.expireat("user4", Math.floor(Date.now() / 1000) + 60, {GT: true}); // Set the TTL for key "user5" to expire in 15 seconds, only if the new TTL is less than the current TTL. kv.expireat("user5", Math.floor(Date.now() / 1000) + 15, {LT: true}); // Set the TTL for key "user6" to expire at a specific UNIX timestamp (e.g. 1705000000), only if the key already have an expiry time. kv.expireat("user6", 1705000000, {XX: true}); // Set the TTL for key "user7" to expire in 90 seconds, only if the key does not already have an expiry time. kv.expireat("user7", Math.floor(Date.now() / 1000) + 90, {NX: true}); // Set the TTL for key "user8" to expire at a specific UNIX timestamp (e.g. 1710000000), only if the new TTL is greater than the current TTL. kv.expireat("user8", 1710000000, {GT: true}); // Set the TTL for key "user9" to expire in 120 seconds, only if the new TTL is less than the current TTL. kv.expireat("user9", Math.floor(Date.now() / 1000) + 120, {LT: true}); // Set the TTL for key "user10" to expire in 5 seconds. kv.expireat("user10", Math.floor(Date.now() / 1000) + 5); ``` </details> <details> <summary><strong><code>get</code></strong></summary> Get the value of a key. ```javascript // Example 1: Get the value of an existing key kv.get('username'); // Returns the value associated with the key 'username' // Example 2: Get the value of a non-existent key kv.get('nonexistent'); // Returns null // Example 3: Get the value of an expired key (assuming 'expiredKey' was set with an expiration) kv.get('expiredKey'); // Returns null // Example 4: Get the value of a key after updating its value kv.set('color', 'red'); // Sets the key 'color' to the value 'red' kv.get('color'); // Returns 'red' // Example 5: Get the value of a key after deleting it (assuming 'deletedKey' was previously set) kv.delete('deletedKey'); // Deletes the key 'deletedKey' kv.get('deletedKey'); // Returns null ``` </details> <details> <summary><strong><code>getset</code></strong></summary> ```javascript // Set initial values for key. kv.set("username", "John"); // Replace the value of "username" with "Alice" and return the old value ("John"). kv.getset("username", "Alice"); // Returns "John" // Replace the value of "nonExistentKey" with "Bob" and return the old value (null). kv.getset("nonExistentKey", "Bob"); // Returns null ``` </details> <details> <summary><strong><code>incr</code></strong></summary> ```javascript // Increment the value of an existing key ("key1") by 1, returns the new value of the key. kv.incr("key1"); // Increment the value of a non-existing key ("nonExistentKey"), returns 1 as the new value of the key (since it's initialized as 0 and incremented by 1). kv.incr("nonExistentKey"); // Increment the value of an expired key ("expiredKey"), if the key has expired, it will be treated as a new key, returns 1 as the new value of the key. kv.incr("expiredKey"); // Increment the value of an existing key ("key2") with a non-numeric value, throws an error. kv.incr("key2"); // Assuming "key2" has a non-numeric value // Increment the value of an existing key ("key3") with a numeric value, returns the incremented value of the key. kv.incr("key3"); // Assuming "key3" has a numeric value ``` </details> <details> <summary><strong><code>incrby</code></strong></summary> ```javascript // Increment the value of a key by 5 (assuming the key does not exist or its value is an integer) kv.incrby('counter', 5); // Increment the value of a key by -3 (assuming the key does not exist or its value is an integer) kv.incrby('counter', -3); // Increment the value of a key by 10 (assuming the key does not exist or its value is an integer) kv.incrby('counter', 10); // Increment the value of a key by 0 (assuming the key does not exist or its value is an integer) kv.incrby('counter', 0); // Increment the value of a key by -7 (assuming the key does not exist or its value is an integer) kv.incrby('counter', -7); ``` </details> <details> <summary><strong><code>keys</code></strong></summary> ```javascript // Find all keys matching the pattern 'user:*' (assuming some keys matching the pattern exist) kv.keys('user:*'); // Find all keys matching the pattern 'product:*' (assuming some keys matching the pattern exist) kv.keys('product:*'); // Find all keys matching the pattern '*:email' (assuming some keys matching the pattern exist) kv.keys('*:email'); // Find all keys matching the pattern 'username' (assuming some keys matching the pattern exist) kv.keys('username'); ``` </details> <details> <summary><strong><code>mget</code></strong></summary> ```javascript // Retrieve the values of key 'username' kv.mget('username'); // Retrieve the values of keys 'username' and 'email' (assuming they exist) kv.mget('username', 'email'); ``` </details> <details> <summary><strong><code>mset</code></strong></summary> ```javascript // Set the values of keys 'username' and 'email' to 'johndoe' and 'johndoe@example.com', respectively kv.mset('username', 'johndoe', 'email', 'johndoe@example.com'); // Set the values of keys 'counter' and 'score' to 0 and 100, respectively kv.mset('counter', 0, 'score', 100); ``` </details> <details> <summary><strong><code>persist</code></strong></summary> ```javascript // Remove the expiration from the key "key1". kv.persist("key1"); ``` </details> <details> <summary><strong><code>rename</code></strong></summary> ```javascript // Rename the key 'username' to 'email' (assuming 'username' exists) kv.rename('username', 'email'); ``` </details> <details> <summary><strong><code>sadd</code></strong></summary> Add one or more members to a set stored at key. ```javascript // add a member to a set kv.sadd('set1', 'member1'); // Output: true // add multiple members to a set kv.sadd('set1', 'member2', 'member3'); // Output: true // print the members of a set kv.smembers('set1'); // Output: ['member1', 'member2', 'member3'] // add a member to a set that already contains the member kv.sadd('set1', 'member1'); // Output: false // add a member to a non-existent set kv.sadd('set2', 'member1'); // Output: true ``` </details> <details> <summary><strong><code>scard</code></strong></summary> Returns the number of members of the set stored at key. ```javascript // add a few members to a set kv.sadd('set1', 'member1', 'member2', 'member3'); // Output: true // print the number of members in a set kv.scard('set1'); // Output: 3 ``` </details> <details> <summary><strong><code>sdiff</code></strong></summary> This method retrieves the members of a set that are present in the first set but not in any of the subsequent sets, and returns them as a new set. ```javascript // add a few members to a set kv.sadd('set1', 'member1', 'member2', 'member3'); // Output: true // add a few members to a second set kv.sadd('set2', 'member2', 'member3', 'member4'); // Output: true // print the members of the first set that are not in the second set kv.sdiff('set1', 'set2'); // Output: ['member1'] ``` </details> <details> <summary><strong><code>set</code></strong></summary> Set the string value of a key with optional NX/XX/GET/EX/PX/EXAT/PXAT/KEEPTTL, GET, and expiration options. ```javascript // Set a basic key-value pair kv.set('username', 'john_doe'); // Output: true // Set a key-value pair only if the key does not already exist (NX option) kv.set('username', 'jane_doe', {NX: true}); // Set a key-value pair only if the key already exists (XX option) kv.set('email', 'jane@example.com', {XX: true}); // Set a key-value pair with an expiration time in seconds (EX option) kv.set('session_token', 'abc123', {EX: 3600}); // Get the existing value and set a new value for a key (GET option) kv.set('username', 'mary_smith', {GET: true}); // Set a key-value pair with an expiration time in milliseconds (PX option) kv.set('temp_data', '42', {PX: 1000}); // Set a key-value pair with an expiration time at a specific Unix timestamp in seconds (EXAT option) kv.set('event_data', 'event1', {EXAT: 1677649420}); // Set a key-value pair with an expiration time at a specific Unix timestamp in milliseconds (PXAT option) kv.set('event_data2', 'event2', {PXAT: 1677649420000}); // Set a key-value pair and keep the original TTL if the key already exists (KEEPTTL option) kv.set('username', 'alice_wonder', {KEEPTTL: true}); // Set a key-value pair with multiple options (NX, EX, and GET options) kv.set('new_user', 'carol_baker', {NX: true, EX: 7200, GET: true}); ``` </details> <details> <summary><strong><code>sinter</code></strong></summary> This method retrieves the members that are present in all the sets provided as arguments, and returns them as a new set representing the intersection of those sets. ```javascript // add a few members to a set kv.sadd('set1', 'member1', 'member2', 'member3'); // Output: true // add a few members to a second set kv.sadd('set2', 'member2', 'member3', 'member4'); // Output: true // print the members that are present in both sets kv.sinter('set1', 'set2'); // Output: ['member2', 'member3'] ``` </details> <details> <summary><strong><code>sismember</code></strong></summary> This method determines if a given value is a member of a set. ```javascript // add a few members to a set kv.sadd('set1', 'member1', 'member2', 'member3'); // Output: true // check if a member is present in a set kv.sismember('set1', 'member1'); // Output: true // check if a member is not present in a set kv.sismember('set1', 'member4'); // Output: false ``` </details> <details> <summary><strong><code>smove</code></strong></summary> This method moves a member from one set to another. ```javascript // add a few members to a set kv.sadd('set1', 'member1', 'member2', 'member3'); // Output: true // add a few members to a second set kv.sadd('set2', 'member4', 'member5', 'member6'); // Output: true // move a member from one set to another kv.smove('set1', 'set2', 'member1'); // Output: true // print the members of the first set kv.smembers('set1'); // Output: ['member2', 'member3'] // print the members of the second set kv.smembers('set2'); // Output: ['member1', 'member4', 'member5', 'member6'] ``` </details> <details> <summary><strong><code>sort</code></strong></summary> Sort the elements in a list, set or sorted set. ```javascript // add a few members to a set kv.sadd('set1', 'member1', 'member2', 'member3'); // Output: true // sort the members of a set kv.sort('set1'); // Output: ['member1', 'member2', 'member3'] // add a few members to a sorted set kv.zadd('zset1', 1, 'member1', 2, 'member2', 3, 'member3'); // Output: true // sort the members of a sorted set kv.sort('zset1'); // Output: ['member1', 'member2', 'member3'] // add a few members to a list kv.rpush('list1', 'member1', 'member2', 'member3'); // Output: true // sort the members of a list kv.sort('list1'); // Output: ['member1', 'member2', 'member3'] ``` </details> <details> <summary><strong><code>smembers</code></strong></summary> This method retrieves all the members of the set value stored at key. ```javascript // add a few members to a set kv.sadd('set1', 'member1', 'member2', 'member3'); // Output: true // print the members of a set kv.smembers('set1'); // Output: ['member1', 'member2', 'member3'] ``` </details> <details> <summary><strong><code>spop</code></strong></summary> Removes and returns one or multiple random members from a set. ```javascript // add a few members to a set kv.sadd('set1', 'member1', 'member2', 'member3', ',member4', 'member5'); // Output: true // remove and return a random member from a set kv.spop('set1'); // Output: one of the members // remove and return a random member from a set kv.spop('set1', 2); // Output: two of the remaining members ``` </details> <details> <summary><strong><code>ttl</code></strong></summary> ```javascript // Set key 'username' to 'heyputer' and set its expiration to 60 seconds kv.set('username', 'heyputer'); kv.expire('username', 60); // Check the time-to-live of key 'username' kv.ttl('username'); // Returns 60 ``` </details> <details> <summary><strong><code>zadd</code></strong></summary> ```javascript // Add a new member 'Alice' with a score of 10 to the sorted set 'students'. kv.zadd('students', 10, 'Alice'); // Add a new member 'Bob' with a score of 25 to the sorted set 'students'. kv.zadd('students', 25, 'Bob'); // Since 'Bob' already exists in the sorted set 'students', his score is updated to 26. kv.zadd('students', 26, 'Bob'); ``` </details> <details> <summary><strong><code>zcard</code></strong></summary> ```javascript // Add two members to the sorted set 'students'. kv.zadd('students', 10, 'Alice'); kv.zadd('students', 25, 'Bob'); // Get the number of members in the sorted set 'students'. kv.zcard('students'); // Output: 2 ``` </details> <details> <summary><strong><code>zcount</code></strong></summary> ```javascript // Add three members to the sorted set 'students'. kv.zadd('students', 10, 'Alice'); kv.zadd('students', 25, 'Bob'); kv.zadd('students', 30, 'Carol'); // Get the number of members in the sorted set 'students' with a score between 10 and 25. kv.zcount('students', 10, 25); // Output: 2 ``` </details> <details> <summary><strong><code>zincrby</code></strong></summary> ```javascript // Add two members to the sorted set 'students'. kv.zadd('students', 10, 'Alice'); kv.zadd('students', 25, 'Bob'); // Increment the score of member 'Alice' by 5. kv.zincrby('students', 5, 'Alice'); // Get the score of member 'Alice'. kv.zscore('students', 'Alice'); // Output: 15 ``` </details> <details> <summary><strong><code>zrange</code></strong></summary> ```javascript // Add three members to the sorted set 'students'. kv.zadd('students', 10, 'Alice'); kv.zadd('students', 25, 'Bob'); kv.zadd('students', 30, 'Carol'); // Get the members of the sorted set 'students' with a score between 10 and 25. kv.zrange('students', 10, 25); // Output: ['Alice', 'Bob'] ``` </details> <details> <summary><strong><code>zrangebyscore</code></strong></summary> ```javascript // Add three members to the sorted set 'students'. kv.zadd('students', 10, 'Alice'); kv.zadd('students', 25, 'Bob'); kv.zadd('students', 30, 'Carol'); // Get the members of the sorted set 'students' with a score between 10 and 25. kv.zrangebyscore('students', 10, 25); // Output: ['Alice', 'Bob'] ``` </details> <details> <summary><strong><code>zrank</code></strong></summary> ```javascript // Add three members to the sorted set 'students'. kv.zadd('students', 10, 'Alice'); kv.zadd('students', 25, 'Bob'); kv.zadd('students', 30, 'Carol'); // Get the rank of member 'Bob' in the sorted set 'students'. kv.zrank('students', 'Bob'); // Output: 1 ``` </details> <details> <summary><strong><code>zrem</code></strong></summary> ```javascript // Add three members to the sorted set 'students'. kv.zadd('students', 10, 'Alice'); kv.zadd('students', 25, 'Bob'); kv.zadd('students', 30, 'Carol'); // Remove member 'Bob' from the sorted set 'students'. kv.zrem('students', 'Bob'); // Get the members of the sorted set 'students'. kv.zrange('students', 0, -1); // Output: [ [ 'Alice', 10 ], [ 'Carol', 30 ] ] ``` </details> ## License Distributed under the MIT License. See `LICENSE.txt` for more information.
⚡️ Advanced in-memory caching for JavaScript.
cache,javascript,key-value,memcached,redis,in-memory-caching,node-cache
2023-04-17T04:22:35Z
2024-02-23T05:13:07Z
null
4
4
59
3
23
1,406
null
MIT
JavaScript
ColonelParrot/jscanify
master
<p align="center"> <img src="docs/images/logo-full.png" height="100"> </p> <p align="center"> <a href="https://www.jsdelivr.com/package/gh/ColonelParrot/jscanify"><img src="https://data.jsdelivr.com/v1/package/gh/ColonelParrot/jscanify/badge"></a> <a href="https://cdnjs.com/libraries/jscanify"><img src="https://img.shields.io/cdnjs/v/jscanify"></a> <a href="https://npmjs.com/package/jscanify"><img src="https://badgen.net/npm/dw/jscanify"></a> <br /> <a href="https://github.com/ColonelParrot/jscanify/blob/master/LICENSE"><img src="https://img.shields.io/github/license/ColonelParrot/jscanify.svg"></a> <a href="https://GitHub.com/ColonelParrot/jscanify/releases/"><img src="https://img.shields.io/github/release/ColonelParrot/jscanify.svg"></a> <a href="https://npmjs.com/package/jscanify"><img src="https://badgen.net/npm/v/jscanify"></a> </p> <p align="center"> <a href="https://nodei.co/npm/jscanify/"><img src="https://nodei.co/npm/jscanify.png"></a> </p> <p align="center"> Open-source pure Javascript implemented mobile document scanner. Powered with <a href="https://docs.opencv.org/3.4/d5/d10/tutorial_js_root.html">opencv.js</a><br/> Supports the web, NodeJS, <a href="https://github.com/ColonelParrot/react-scanify-demo">React</a>, and others. <br/><br/> Available on <a href="https://www.npmjs.com/package/jscanify">npm</a> or via <a href="https://www.jsdelivr.com/package/gh/ColonelParrot/jscanify">cdn</a><br/> </p> **Features**: - paper detection & highlighting - paper scanning with distortion correction | Image Highlighting | Scanned Result | | -------------------------------------------- | ------------------------------------------ | | <img src="docs/images/highlight-paper1.png"> | <img src="docs/images/scanned-paper1.png"> | | <img src="docs/images/highlight-paper2.png"> | <img src="docs/images/scanned-paper2.png"> | ## Quickstart > **Developers Note**: you can now use the [jscanify debugging tool](https://colonelparrot.github.io/jscanify/tester.html) to observe the result (highlighting, extraction) on test images. ### Import npm: ```js $ npm i jscanify import jscanify from 'jscanify' ``` cdn: ```html <script src="https://docs.opencv.org/4.7.0/opencv.js" async></script> <!-- warning: loading OpenCV can take some time. Load asynchronously --> <script src="https://cdn.jsdelivr.net/gh/ColonelParrot/jscanify@master/src/jscanify.min.js"></script> ``` > **Note**: jscanify on NodeJS is slightly different. See [wiki: use on NodeJS](https://github.com/ColonelParrot/jscanify/wiki#use-on-nodejs). ### Highlight Paper in Image ```html <img src="/path/to/your/image.png" id="image" /> ``` ```js const scanner = new jscanify(); image.onload = function () { const highlightedCanvas = scanner.highlightPaper(image); document.body.appendChild(highlightedCanvas); }; ``` ### Extract Paper ```js const scanner = new jscanify(); const paperWidth = 500; const paperHeight = 1000; image.onload = function () { const resultCanvas = scanner.extractPaper(image, paperWidth, paperHeight); document.body.appendChild(resultCanvas); }; ``` ### Highlighting Paper in User Camera The following code continuously reads from the user's camera and highlights the paper: ```html <video id="video"></video> <canvas id="canvas"></canvas> <!-- original video --> <canvas id="result"></canvas> <!-- highlighted video --> ``` ```js const scanner = new jscanify(); const canvasCtx = canvas.getContext("2d"); const resultCtx = result.getContext("2d"); navigator.mediaDevices.getUserMedia({ video: true }).then((stream) => { video.srcObject = stream; video.onloadedmetadata = () => { video.play(); setInterval(() => { canvasCtx.drawImage(video, 0, 0); const resultCanvas = scanner.highlightPaper(canvas); resultCtx.drawImage(resultCanvas, 0, 0); }, 10); }; }); ``` To export the paper to a PDF, see [here](https://stackoverflow.com/questions/23681325/convert-canvas-to-pdf) ### Notes - for optimal paper detection, the paper should be placed on a flat surface with a solid background color - we recommend wrapping your code using `jscanify` in a window `load` event listener to ensure OpenCV is loaded
Open-source Javascript mobile document scanner.
js,scanner,javascript,document-scanner,nodejs
2023-04-13T16:11:12Z
2024-01-03T23:02:44Z
2023-05-10T19:41:06Z
2
1
50
4
46
912
null
MIT
JavaScript
shyamtawli/devFind
master
<div align="center"> <h1>👩‍💻 devFind - Discover and Connect with Skilled Developers!</h1> </div> <p align="center"> <a href="https://github.com/shyamtawli/devFind/blob/master/LICENSE" target="blank"> <img src="https://img.shields.io/github/license/shyamtawli/devFind?style=for-the-badge&logo=appveyor" alt="License" /> </a> <a href="https://github.com/shyamtawli/devFind/fork" target="blank"> <img src="https://img.shields.io/github/forks/shyamtawli/devFind?style=for-the-badge&logo=appveyor" alt="Forks"/> </a> <a href="https://github.com/shyamtawli/devFind/stargazers" target="blank"> <img src="https://img.shields.io/github/stars/shyamtawli/devFind?style=for-the-badge&logo=appveyor" alt="Star"/> </a> <a href="https://github.com/shyamtawli/devFind/issues" target="blank"> <img src="https://img.shields.io/github/issues/shyamtawli/devFind.svg?style=for-the-badge&logo=appveyor" alt="Click Vote Issue"/> </a> <a href="https://github.com/shyamtawli/devFind/pulls" target="blank"> <img src="https://img.shields.io/github/issues-pr/shyamtawli/devFind.svg?style=for-the-badge&logo=appveyor" alt="Click Vote Open Pull Request"/> </a> </p> ## Table of Contents - [Table of Contents](#table-of-contents) - [About 🚀](#about-) - [Features 💪](#features-) - [How to add your profile Data 🤔](#how-to-add-your-profile-data-) - [Prerequisites](#prerequisites) - [How to Install Git](#how-to-install-git) - [How to Install Node.js and npm](#how-to-install-nodejs-and-npm) - [Steps to Add Your Profile Data](#steps-to-add-your-profile-data) - [Contributing 👨‍💻](#contributing-) - [Contributors 🤝](#contributors-) - [License](#license) - [Support 🙏](#support-) <a id="about"></a> ## About 🚀 - devFind - [Website](https://dev-find.vercel.app/) - **`devFind`** is an open source project that aims to create a platform for developers to showcase their skills and connect with potential collaborators, all in a user-friendly and searchable format. - With **`devFind`**, developers can create their profiles in JSON format, which are then displayed on the web for others to discover. <a id="features"></a> ## Features 💪 - One of the key features of **`devFind`** is its powerful search functionality. - Users can search for developers based on specific skills, locations or name, making it easy to find developers with expertise in a particular technology or programming language. - This makes **`devFind`** a valuable resource for project managers, recruiters, and anyone looking to connect with skilled developers for collaboration or employment opportunities. <a id="how-to-add-your-profile-data"></a> ## How to add your profile Data 🤔 > Thank you for your interest in contributing to our open-source project! <br> <a id="prerequisites"></a> ### Prerequisites - A GitHub account - Git installed on your local development environment - Node Package Manager (npm) installed on your local development environment ### How to Install Git Git is a version control system that is used to manage the source code of your project. To install Git, follow these steps: 1. Download and install Git from the [Official Website](https://git-scm.com/downloads) 2. Open the terminal or command prompt on your local development environment 3. Verify the installation of Git by running the following command: ```bash git --version ``` ### How to Install Node.js and npm Node.js is a JavaScript runtime environment that allows you to run JavaScript code outside of a web browser. npm (Node Package Manager) is a package manager for JavaScript, essential for managing dependencies in Node.js projects. Here's how to install Node.js and npm: 1. **Download Node.js:** - Visit the [official Node.js website](https://nodejs.org/en/download/) and download the appropriate installer for your operating system (Windows, macOS, or Linux). - Choose the LTS (Long Term Support) version for stable releases or the latest version for cutting-edge features. - Follow the installation instructions provided by the installer. 2. **Verify Node.js Installation:** - After the installation is complete, open your terminal or command prompt. - To verify that Node.js has been installed successfully, type the following command and press Enter: ``` node -v ``` - This command should display the version of Node.js installed on your system. If it does, Node.js installation was successful. 3. **Verify npm Installation:** - npm comes bundled with Node.js, so once Node.js is installed, npm is automatically installed as well. - To confirm that npm is installed, in your terminal or command prompt, type: ``` npm -v ``` - Press Enter. This command should display the version of npm installed on your system. If it does, npm installation was successful. 4. **Optional: Update npm (recommended):** - It's recommended to keep npm up to date to access the latest features and bug fixes. - To update npm to the latest version, type the following command and press Enter: ``` npm install -g npm@latest ``` - This command will update npm to the latest stable version globally (-g flag). By following these steps, you have successfully installed Node.js and npm on your system. You are now ready to start building JavaScript applications and managing dependencies with npm. ### Steps to Add Your Profile Data 1. **Fork the repository:** To create a copy of the repository in your GitHub account, click on the "Fork" button in the top right corner of the project repository page. 2. **Clone the forked repository:** To clone the repository to your local development environment, open the terminal or command prompt and run the following command: ```bash git clone https://github.com/<your-github-username>/devFind.git ``` 3. **Install dependencies:** To install the necessary dependencies for the project, navigate to the project directory and run the following command: ```bash npm install ``` 4. **Navigate** to the **`public/data`** folder in your project directory. 5. **Create a new JSON file** named **`your_github_username.json`** (replace your_github_username with your actual GitHub username). Open the file you just created. 6. **Add** the following JSON object, replacing the placeholder values with your own details: ```json { "name": "Your Name", "location": "Your Location", "bio": "Your Bio should be 20-30 words not more then that", "avatar": "https://github.com/<your-github-username>.png", "portfolio": "Your Portfolio URL or Github URL", "skills": ["Your Skill 1", "Your Skill 2", "..."], "social": { "GitHub": "https://github.com/<github-username>", "Twitter": "https://twitter.com/<twitter-username>", "LinkedIn": "https://www.linkedin.com/in/<linkedin-username>" } } ``` 7. **Save** the **`your_github_username.json`** file. 8. **Navigate** to the **`src`** folder in your project directory. Open the **`ProfilesList.json`** file. 9. **Add your JSON filename** (your_github_username.json) to the array of filenames in the ProfileList.json file, like this: ```json ["filename1.json", "filename2.json", "your_github_username.json"] ``` 10. **Save** the **`ProfileLists.json`** file. 11. **Create a new branch:** To create a new branch for your profile, run the following command: ```bash git checkout -b add-profile ``` 12. **Add your changed files:** Add changed files to the stage by running the following command: ```bash git add . ``` 13. **Commit your changes:** To save your changes to the branch,, run the following command: ```bash git commit -m "add: <your-name>" ``` 14. **Push to the branch:** To push the changes to the remote repository, run the following command: ```bash git push origin add-profile ``` 15. **Create a pull request:** To submit your changes to the main repository, create a pull request by clicking on the "Compare & pull request" button on your forked repository page. 16. **Wait for review and merge:** Wait for the project maintainers to review and merge your changes. Once your changes are merged, your profile data will be added to the project's **`Profile.json`** file and your profile will be displayed on the project's website. <a id="contributing"></a> ## Contributing 👨‍💻 Contributions make the open source community such an amazing place to learn, inspire, and create. <br> **Any contributions you make are truly appreciated!** <a id="contributors"></a> ## Contributors 🤝 <a href="https://github.com/shyamtawli/devFind/graphs/contributors"> <img src="https://contrib.rocks/image?repo=shyamtawli/devFind" /> </a> <a id="license"></a> ## License <table> <tr> <td> <p align="center"> <img src="https://github.com/malivinayak/malivinayak/blob/main/LICENSE-Logo/MIT.png?raw=true" width="80%"></img> </td> <td> <img src="https://img.shields.io/badge/License-MIT-yellow.svg"/> <br> This project is licensed under <a href="./LICENSE">MIT</a>. <img width=2300/> </td> </tr> </table> <a id="support"></a> ## Support 🙏 Thank you for contributing to our open-source project! We appreciate your support 🚀 <br> Don't forget to leave a star ⭐
devFind is an open source project that aims to create a platform for developers to showcase their skills and connect with potential collaborators, all in a user-friendly and searchable format.
add-data,good-first-issue,open-source,react,javascript,css,tailwindcss,beginner,gssoc24,vscode
2023-04-17T14:03:41Z
2024-05-15T13:25:03Z
2024-01-31T13:58:31Z
446
798
577
36
543
512
null
MIT
JavaScript
Exifly/ApiVault
main
<h1 align="center"> <img src="https://raw.githubusercontent.com/Exifly/ApiVault/main/frontend/public/img/apivault-full-dark-nobg.png#gh-dark-mode-only" alt="apivault dark" width="200"> <img src="https://raw.githubusercontent.com/Exifly/ApiVault/main/frontend/public/img/apivault-full-light-nobg.png#gh-light-mode-only" alt="ApiVault" width="200"> <br> </h1> ![screenshot](./assets/Hero.png) <p align="center"> <a href="https://www.producthunt.com/posts/apivault?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-apivault" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=414441&theme=light" alt="Apivault - Your&#0032;gateway&#0032;to&#0032;a&#0032;world&#0032;of&#0032;public&#0032;APIs&#0046; | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> </p> <p align="center"> <a href="https://github.com/Exifly/ApiVault/tree/release" alt="Stable"> <img src="https://img.shields.io/badge/stable-2.1.0-blue?style=for-the-badge" /></a> <a href="https://github.com/exifly/apivault/graphs/contributors" alt="Contributors"> <img src="https://img.shields.io/github/contributors/exifly/apivault?style=for-the-badge" /></a> <a href="https://github.com/exifly/apivault/pulse" alt="Activity"> <img src="https://img.shields.io/github/commit-activity/m/exifly/apivault?style=for-the-badge" /></a> <a href="https://github.com/exifly/apivault/graphs/contributors" alt="Contributors"> <img src="https://img.shields.io/github/actions/workflow/status/exifly/apivault/node.js.yml?style=for-the-badge" /></a> <a href="https://discord.gg/e4KbstNqtk" alt="Discord Server"> <img src="https://dcbadge.vercel.app/api/server/e4KbstNqtk" /></a> <br> </p> <p align="center"> <a href="#prerequisites">Prerequisites</a> • <a href="#how-to-use">How To Use</a> • <a href="#credits">Credits</a> • <a href="#contributing">Contributing</a> • <a href="#support">Support</a> • <a href="#license">License</a> </p> <h1 align="center"> <a href="https://github.com/Exifly/ApiVault/issues/new?assignees=&labels=add+api&template=add-your-api.md&title=%5BAPIFT%5D">Click here to submit your API</a> </h1> <div align="center"> # Built with [![Nuxt.js](https://img.shields.io/badge/nuxt.js-35495E?style=for-the-badge&logo=nuxtdotjs&logoColor=4FC08D)](https://nuxt.com/) [![Vue.js](https://img.shields.io/badge/Vue.js-35495E?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D)](https://vuejs.org/) [![Django](https://img.shields.io/badge/Django-000000?style=for-the-badge&logo=django&logoColor=white)](https://www.djangoproject.com/start/overview/) </div> <hr /> # Prerequisites Before starting to use the software make sure you have <a href="https://www.docker.com/">docker</a> installed. # How To Use ## Clone the repository ```bash git clone https://github.com/exifly/ApiVault ``` ## Set .env file Inside root repository folder rename .env.dev file ```bash cat .env.dev > .env ``` Inside /frontend folder rename .env.sample file ```bash cd frontend cat .env.dev > .env ``` Same action inside /backend folder ```bash cd backend cat .env.dev > .env ``` ## Client/Server side using Docker ```bash # Go into the root folder cd ApiVault # Run docker docker-compose up ``` ## Important note: On first docker-compose launch, your terminal could tell you: ```bash database_dev | 2023-05-26 13:38:01.598 UTC [83] ERROR: relation "vault_api" does not exist at character 232 database_dev | 2023-05-26 13:38:01.598 UTC [83] STATEMENT: SELECT "vault_api"."id", "vault_api"."name", "vault_api"."auth", "vault_api"."category_id", "vault_api"."cors", "vault_api"."description", "vault_api"."https", "vault_api"."url", "vault_api"."view_count", "vault_api"."source" FROM "vault_api" LIMIT 21 database_dev | 2023-05-26 13:38:01.624 UTC [83] ERROR: relation "vault_api" does not exist at character 232 ``` or ```bash server_dev | File "/usr/local/lib/python3.8/dist-packages/psycopg2/__init__.py", line 122, in connect server_dev | conn = _connect(dsn, connection_factory=connection_factory, **kwasync) server_dev | psycopg2.OperationalError: connection to server at "database" (172.20.0.2), port 5432 failed: Connection refused server_dev | Is the server running on that host and accepting TCP/IP connections? ``` To fix those erros just stop it and relaunch `docker-compose up` **Note**: Please open an [Issue](https://github.com/Exifly/ApiVault/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=) if you see docker errors! (You can try fix on your own if you want) Now just go on **localhost:3000** on your browser. ### Done <hr /> # Credits This software uses the following open source packages: ### Tools 🔧 - [GSAP](https://greensock.com/gsap/) - [public-apis](https://github.com/public-apis/public-apis) (a portion of our data) <hr /> # Contributing If you've ever wanted to contribute to open source, and a great cause, now is your chance! > When contributing to this repository, please first discuss the change you wish to make via issues with the authors of this repository before making a change. <br> > Make sure to go through the **[CODE OF CONDUCT](https://github.com/Exifly/ApiVault/blob/main/CODE_OF_CONDUCT.md)** once before making changes! ### How to Contribute 🤔 - Look at the existing [**Issues**](https://github.com/Exifly/ApiVault/issues) or [**create a new issue**](https://github.com/Exifly/ApiVault/issues/new/choose)! - [**Fork the Repo**](https://github.com/Exifly/ApiVault/fork) to make changes. - Then, create a branch for any issue that you are working on. - Finally, implement your changes by committing your work. - Create a **[Pull Request](https://github.com/Exifly/ApiVault/compare)** (_PR_), which will be promptly reviewed and given suggestions for improvements by the community. - Add screenshots or screen captures to your Pull Request to help us understand the effects of the changes proposed in your PR. > For more detailed instructions ---> **[CONTRIBUTING.md](https://github.com/Exifly/ApiVault/blob/main/CONTRIBUTING.md)** ## Contributors ✨ Thanks go to these wonderful people ✨: <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center"><a href="https://github.com/gdjohn4s"><img src="https://avatars.githubusercontent.com/u/19678157?v=4?s=100" width="100px;" alt="gdjohn4s"/><br /><sub><b>gdjohn4s</b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/FlavioAdamo"><img src="https://avatars.githubusercontent.com/u/46765573?v=4?s=100" width="100px;" alt="Flavio Adamo"/><br /><sub><b>Flavio Adamo</b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/NirajD10"><img src="https://avatars.githubusercontent.com/u/66014487?v=4" width="100px;" alt="NirajD10"/><br /><sub><b>NirajD10</b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/kiabq"><img src="https://avatars.githubusercontent.com/u/44178907?v=4" width="100px;" alt="kiabq"/><br /><sub><b>kiabq</b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/the-amazing-atharva"><img src="https://avatars.githubusercontent.com/u/121221252?v=4" width="100px;" alt="Atharva Salitri"/><br /><sub><b>Atharva Salitri</b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/caickPassarella"><img src="https://avatars.githubusercontent.com/u/25408543?v=4" width="100px;" alt="Caick"/><br /><sub><b>Caick</b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/kotkaravishkar"><img src="https://avatars.githubusercontent.com/u/94035734?v=4" width="100px;" alt="Avishkar Kotkar "/><br /><sub><b>Avishkar Kotkar </b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/iamjamesfrancis"><img src="https://avatars.githubusercontent.com/u/55175085?v=4" width="100px;" alt="James Francis "/><br /><sub><b>James Francis </b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/MOHDNEHALKHAN"><img src="https://avatars.githubusercontent.com/u/125626654?v=4" width="100px;" alt="MOHD NEHAL KHAN "/><br /><sub><b>MOHD NEHAL </b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/tarunsamanta2k20"><img src="https://avatars.githubusercontent.com/u/55488549?v=4" width="100px;" alt="Tarun Samanta"/><br /><sub><b>Tarun Samanta </b></sub></a><br />🥳</td> </tr> <tr> <td align="center"><a href="https://github.com/realrohitgurav"><img src="https://avatars.githubusercontent.com/u/110970889?v=4" width="100px;" alt="Rohit Gurav"/><br /><sub><b>Rohit Gurav </b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/Badrnyali"><img src="https://avatars.githubusercontent.com/u/71897147?v=4" width="100px;" alt="Badrnyali"/><br /><sub><b>Badrnyali </b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/gianmazzoran"><img src="https://avatars.githubusercontent.com/u/16735648?v=4" width="100px;" alt="bytemore"/><br /><sub><b>bytemore </b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/HassanTanveer"><img src="https://avatars.githubusercontent.com/u/57575219?v=4" width="100px;" alt="Hassan Tanveer"/><br /><sub><b>Hassan Tanveer </b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/cyberGHostJs"><img src="https://avatars.githubusercontent.com/u/105425922?v=4" width="100px;" alt="cyberGHostJs"/><br /><sub><b>cyberGHostJs </b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/et-c"><img src="https://avatars.githubusercontent.com/u/54663819?v=4" width="100px;" alt="et-c"/><br /><sub><b>et-c </b></sub></a><br />🥳</td> <td align="center"><a href="https://github.com/DomeT99"><img src="https://avatars.githubusercontent.com/u/85518808?v=4" width="100px;" alt="Domenico Tenace"/><br /><sub><b>Domenico Tenace </b></sub></a><br />🥳</td> </tr> </tbody> </table> ## Support Feel free to open issues and pull requests and **Don't forget to leave a star ⭐** If you want to support us with a coffee, that's how to do it! ❤️ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/T6T0LL2YG) ## License ApiVault is licensed under the terms of **CC BY-NC-ND 4.0**. Check out [LICENSE](https://github.com/Exifly/ApiVault/blob/main/LICENSE) for details. <br> > [exifly.it](https://exifly.it) &nbsp;&middot;&nbsp; > GitHub [@exifly](https://github.com/Exifly) &nbsp;
Your gateway to a world of public APIs.
api,apis,free,javascript,open-source,public-api,public-apis,python,python3,vue
2023-04-15T13:41:00Z
2024-03-16T15:55:42Z
2023-09-13T22:47:23Z
19
198
687
4
33
346
null
NOASSERTION
JavaScript
HiNinoJay/hexo-theme-A4
main
# hexo-theme-A4 <div align="right"> <a title="zh-CN" href="/"><img src="https://img.shields.io/badge/-简体中文-24292f?style=for-the-badge" alt="简体中文" /></a> <a title="EN" href="README-EN.md"> <img src="https://img.shields.io/badge/-English-ffffff?style=for-the-badge" alt="English"></a> <a title="zh-TW" href="README_zh-TW.md"><img src="https://img.shields.io/badge/-繁体中文-ffffff?style=for-the-badge" alt="繁体中文"></a> </div> <div align="center" > <a href="https://ninojay.top"> <img width=200px height=200px src="https://jsd.onmicrosoft.cn/npm/hexo-theme-a4@latest/source/img/A4-favicon.png" alt="A4" /> </a> </div> <div align="center"> 模仿A4纸张的一个hexo极简主题。主打一个简洁,体积小,配置少。 [![](https://img.shields.io/npm/v/hexo-theme-a4?label=VERSION&logo=npm&style=for-the-badge)]() [![](https://img.shields.io/badge/HEXO-v6.3.0-blue?style=for-the-badge&logo=hexo)](https://hexo.io/zh-cn/index.html) [![](https://img.shields.io/node/v/hexo?style=for-the-badge&logo=node)](https://nodejs.org/en) 「让读者专注于阅读文字,写者专注于写作。」➡️ [效果展示](https://ninojay.top) ➡️ [使用文档](https://doc.ninojay.top) _右上角一个star,更快更新功能_ </div> [![](https://jsd.onmicrosoft.cn/npm/hexo-theme-a4@latest/source/img/market.png)](https://github.com/HiNinoJay/hexo-theme-A4) ## 🏹️特点 - [x] 博客网站基本功能:归档/标签/分类/目录 - [x] 首页简历化,word化,内容自定义化 - [x] 页面的页脚页眉自定义 - [x] 文章可单独配置:隐藏文章、开关评论、开关目录、文章置顶、[数学公式支持](https://ninojay.top/hexoplugin/hexo-filter-mathjax/)、[文章加密访问](https://ninojay.top/hexoplugin/hexo-blog-encrypt/) - [x] [**全局色调可自定义配置,预览多种配色**](https://ninojay.top/hexoplugin/A4-color-change/) - [x] 采用最美评论模块waline - [x] 预置md可使用的css样式 - [x] 自带CDN加速国内访问速度 - [x] [可压缩图片/css/js资源大幅度提升网站访问速度](https://ninojay.top/hexoplugin/hexo-all-minifier/) - [x] [详细的使用文档](https://doc.ninojay.top) - [x] [经过作者验证可支持的hexo插件](https://ninojay.top/tags/hexoPlugin/) - [x] [mathjax 数学公式](https://ninojay.top/hexoplugin/hexo-filter-mathjax/) - [x] [encrypt 特定文章加密访问](https://ninojay.top/hexoplugin/hexo-blog-encrypt/) - [x] [github-emojis 语法支持](https://ninojay.top/hexoplugin/hexo-filter-github-emojis/) - [x] [reference 脚标支持](https://ninojay.top/hexoplugin/hexo-reference/) - [x] [minifier 压缩网站图片/css/js等资源](https://ninojay.top/hexoplugin/hexo-all-minifier/) ## 🔥效果展示 ### 多种主题配色 #### 灰白配色(默认) ![](https://jsd.onmicrosoft.cn/gh/hininojay/images/a4color/greywhite.png) #### 绿金配色(已预置|可一键启用) ![](https://jsd.onmicrosoft.cn/gh/hininojay/images/a4color/greengolden.png) `颜色搭配是一门学问`,除A4推荐的两种配色外,你可以自行调色,并把颜色方案分享给大家。更多配色请看:[预览](https://ninojay.top/hexoplugin/A4-color-change/)。 ### 首页 ![](https://jsd.onmicrosoft.cn/npm/hexo-theme-a4@latest/source/img/index.png) ### 文章列表 ![](https://jsd.onmicrosoft.cn/npm/hexo-theme-a4@latest/source/img/archive.png) ### 文章标签和分类信息 ![](https://jsd.onmicrosoft.cn/npm/hexo-theme-a4@latest/source/img/tags&&categories.png) ### 评论 ![](https://jsd.onmicrosoft.cn/npm/hexo-theme-a4@latest/source/img/comment.png) ## 👋如何使用 - 确认已通过命令`hexo init`创建好了文件夹,这里举例你的文件夹名为`website` - `命令行`进入到`website`文件夹路径下 - 将`website`文件夹下的`_config.yml`文件中将主题设置为A4 - 接下来正式安装`a4主题`,有两种方式,任选其一 ### npm方式(推荐) - 执行命令 `npm install hexo-theme-a4@latest` - 在`website`文件夹路径下创建`_config.a4.yml`文件,将[这里的内容](https://github.com/HiNinoJay/hexo-theme-A4/blob/main/_config.yml)复制进去 - 对主题的所有个性化配置都将在`_config.a4.yml`文件中进行,可按照文件中的注释自行配置 - 执行命令:`hexo s` 运行项目查看效果 ### git方式 - 执行命令:`git clone git@github.com:HiNinoJay/hexo-theme-A4.git themes/A4` - 在`website`文件夹路径下创建`_config.a4.yml`文件,将[这里的内容](https://github.com/HiNinoJay/hexo-theme-A4/blob/main/_config.yml) 复制进去 - 对主题的所有个性化配置都将在`_config.a4.yml`文件中进行,可按照文件中的注释自行配置 - 执行命令:`hexo s` 运行项目查看效果 ## ⚠️必读配置 首页和文章列表页需要手动生成,执行以下命令即可: ```shell hexo new page index hexo new page list ``` 其他详细配置请看: ➡️ [使用文档](https://doc.ninojay.top),已上线。 ## ⬆️如何更新 根据你`安装`的方式,选择`对应的`更新方式。 ### npm方式 命令行进入到你的博客网站`根目录`下 执行命令: ```shell npm install hexo-theme-a4@latest ``` ### git方式 命令行进入到`themes/A4`目录下 执行命令: ```shell git pull ``` --- ### 注意 以上两种方式更新后,请去该[github页面](https://github.com/HiNinoJay/hexo-theme-A4/releases)查看最新的版本,作者会告诉配置文件有无新增/修改。 如果有,则需要复制最新的[该文件](https://github.com/HiNinoJay/hexo-theme-A4/blob/main/_config.yml)对应到你的`_config.a4.yml`新增/修改的部分。 ## ☕️支持 欢迎提交 pull request 或 issue,请提交至dev分支。 其他任何想交流的事,可发送邮件至:welcome@ninojay.top 如果觉得我做的不错,请给该项目一个star,或者[请我喝杯咖啡☕️](https://ninojay.top/supportbymoney/) ## 💗感谢 由衷感谢A4支持者们:https://github.com/HiNinoJay/hexo-theme-A4/blob/main/DONATION.md ## Stargazers over time [![Stargazers over time](https://starchart.cc/HiNinoJay/hexo-theme-A4.svg)](https://starchart.cc/HiNinoJay/hexo-theme-A4)
A hexo theme that looks like an A4 paper.
blog,hexo,hexo-theme,theme,website,a4,blog-theme,javascript,hexo-theme-a4
2023-04-14T08:29:49Z
2024-03-19T13:59:06Z
2024-03-17T10:34:47Z
8
101
491
9
19
294
null
MIT
JavaScript
forge42dev/remix-hook-form
main
# remix-hook-form ![GitHub Repo stars](https://img.shields.io/github/stars/Code-Forge-Net/remix-hook-form?style=social) ![npm](https://img.shields.io/npm/v/remix-hook-form?style=plastic) ![GitHub](https://img.shields.io/github/license/Code-Forge-Net/remix-hook-form?style=plastic) ![npm](https://img.shields.io/npm/dy/remix-hook-form?style=plastic) ![GitHub top language](https://img.shields.io/github/languages/top/Code-Forge-Net/remix-hook-form?style=plastic) Remix-hook-form is a powerful and lightweight wrapper around [react-hook-form](https://react-hook-form.com/) that streamlines the process of working with forms and form data in your [Remix](https://remix.run) applications. With a comprehensive set of hooks and utilities, you'll be able to easily leverage the flexibility of react-hook-form without the headache of boilerplate code. And the best part? Remix-hook-form has zero dependencies, making it easy to integrate into your existing projects and workflows. Say goodbye to bloated dependencies and hello to a cleaner, more efficient development process with Remix-hook-form. Oh, and did we mention that this is fully Progressively enhanced? That's right, you can use this with or without javascript! ## Install npm install remix-hook-form react-hook-form ## Basic usage Here is an example usage of remix-hook-form. It will work with **and without** JS. Before running the example, ensure to install additional dependencies: npm install zod @hookform/resolvers ```ts import { useRemixForm, getValidatedFormData } from "remix-hook-form"; import { Form } from "@remix-run/react"; import { zodResolver } from "@hookform/resolvers/zod"; import * as zod from "zod"; import { ActionFunctionArgs, json } from "@remix-run/node"; // or cloudflare/deno const schema = zod.object({ name: zod.string().min(1), email: zod.string().email().min(1), }); type FormData = zod.infer<typeof schema>; const resolver = zodResolver(schema); export const action = async ({ request }: ActionFunctionArgs) => { const { errors, data, receivedValues: defaultValues } = await getValidatedFormData<FormData>(request, resolver); if (errors) { // The keys "errors" and "defaultValues" are picked up automatically by useRemixForm return json({ errors, defaultValues }); } // Do something with the data return json(data); }; export default function MyForm() { const { handleSubmit, formState: { errors }, register, } = useRemixForm<FormData>({ mode: "onSubmit", resolver, }); return ( <Form onSubmit={handleSubmit} method="POST"> <label> Name: <input type="text" {...register("name")} /> {errors.name && <p>{errors.name.message}</p>} </label> <label> Email: <input type="email" {...register("email")} /> {errors.email && <p>{errors.email.message}</p>} </label> <button type="submit">Submit</button> </Form> ); } ``` ## File Upload example For more details see [File Uploads guide](https://remix.run/docs/en/main/guides/file-uploads) in Remix docs. ```ts import { unstable_createMemoryUploadHandler, unstable_parseMultipartFormData, ActionFunctionArgs, json } from "@remix-run/node"; // or cloudflare/deno export const action = async ({ request }: ActionFunctionArgs) => { // use the upload handler to parse the file const formData = await unstable_parseMultipartFormData( request, unstable_createMemoryUploadHandler(), ); // The file will be there console.log(formData.get("file")); // validate the form data const { errors, data } = await validateFormData(formData, resolver); if (errors) { return json({ errors }, { status: 422, }); } return json({ result: "success" }); }; ``` ## Fetcher usage You can pass in a fetcher as an optional prop and `useRemixForm` will use that fetcher to submit the data and read the errors instead of the default behavior. For more info see the docs on `useRemixForm` below. ## Video example and tutorial If you wish to learn in depth on how form handling works in Remix and want an example using this package I have prepared a video tutorial on how to do it. It's a bit long but it covers everything you need to know about form handling in Remix. It also covers how to use this package. You can find it here: https://youtu.be/iom5nnj29sY?si=l52WRE2bqpkS2QUh ## API's ### getValidatedFormData Now supports no-js form submissions! If you made a GET request instead of a POST request and you are using this inside of a loader it will try to extract the data from the search params If the form is submitted without js it will try to parse the formData object and covert it to the same format as the data object returned by `useRemixForm`. If the form is submitted with js it will automatically extract the data from the request object and validate it. getValidatedFormData is a utility function that can be used to validate form data in your action. It takes two arguments: the request object and the resolver function. It returns an object with three properties: `errors`, `receivedValues` and `data`. If there are no errors, `errors` will be `undefined`. If there are errors, `errors` will be an object with the same shape as the `errors` object returned by `useRemixForm`. If there are no errors, `data` will be an object with the same shape as the `data` object returned by `useRemixForm`. The `receivedValues` property allows you to set the default values of your form to the values that were received from the request object. This is useful if you want to display the form again with the values that were submitted by the user when there is no JS present #### Example with errors only If you don't want the form to persist submitted values in the case of validation errors then you can just return the `errors` object directly from the action. ```jsx /** all the same code from above */ export const action = async ({ request }: ActionFunctionArgs) => { // Takes the request from the frontend, parses and validates it and returns the data const { errors, data } = await getValidatedFormData<FormData>(request, resolver); if (errors) { return json({ errors }); } // Do something with the data }; ``` #### Example with errors and receivedValues If your action returrns `defaultValues` key then it will be automatically used by `useRemixForm` to populate the default values of the form. ```jsx /** all the same code from above */ export const action = async ({ request }: ActionFunctionArgs) => { // Takes the request from the frontend, parses and validates it and returns the data const { errors, data, receivedValues: defaultValues } = await getValidatedFormData<FormData>(request, resolver); if (errors) { return json({ errors, defaultValues }); } // Do something with the data }; ``` ### validateFormData validateFormData is a utility function that can be used to validate form data in your action. It takes two arguments: the request object and the resolver function. It returns an object with two properties: `errors` and `data`. If there are no errors, `errors` will be `undefined`. If there are errors, `errors` will be an object with the same shape as the `errors` object returned by `useRemixForm`. If there are no errors, `data` will be an object with the same shape as the `data` object returned by `useRemixForm`. The difference between `validateFormData` and `getValidatedFormData` is that `validateFormData` only validates the data while the `getValidatedFormData` function also extracts the data automatically from the request object assuming you were using the default setup. ```jsx /** all the same code from above */ export const action = async ({ request }: ActionFunctionArgs) => { // Lets assume you get the data in a different way here but still want to validate it const formData = await yourWayOfGettingFormData(request); // Takes the request from the frontend, parses and validates it and returns the data const { errors, data } = await validateFormData<FormData>(formData, resolver); if (errors) { return json({ errors }); } // Do something with the data }; ``` ### createFormData createFormData is a utility function that can be used to create a FormData object from the data returned by the handleSubmit function from `react-hook-form`. It takes one argument, the `data` from the `handleSubmit` function and it converts everything it can to strings and appends files as well. It returns a FormData object. ```jsx /** all the same code from above */ export default function MyForm() { const { ... } = useRemixForm({ ..., submitHandlers: { onValid: data => { // This will create a FormData instance ready to be sent to the server, by default all your data is converted to a string before sent const formData = createFormData(data); // Do something with the formData } } }); return ( ... ); } ``` ### parseFormData parseFormData is a utility function that can be used to parse the data submitted to the action by the handleSubmit function from `react-hook-form`. It takes two arguments, first one is the `request` submitted from the frontend and the second one is `preserveStringified`, the form data you submit will be cast to strings because that is how form data works, when retrieving it you can either keep everything as strings or let the helper try to parse it back to original types (eg number to string), default is `false`. It returns an object that contains unvalidated `data` submitted from the frontend. ```jsx /** all the same code from above */ export const action = async ({ request }: ActionFunctionArgs) => { // Allows you to get the data from the request object without having to validate it const formData = await parseFormData(request); // formData.age will be a number const formDataStringified = await parseFormData(request, true); // formDataStringified.age will be a string // Do something with the data }; ``` ### getFormDataFromSearchParams If you're using a GET request formData is not available on the request so you can use this method to extract your formData from the search parameters assuming you set all your data in the search parameters ## Hooks ### useRemixForm `useRemixForm` is a hook that can be used to create a form in your Remix application. It's basically the same as react-hook-form's [`useForm`](https://www.react-hook-form.com/api/useform/) hook, with the following differences: **Additional options** - `submitHandlers`: an object containing two properties: - `onValid`: can be passed into the function to override the default behavior of the `handleSubmit` success case provided by the hook. - `onInvalid`: can be passed into the function to override the default behavior of the `handleSubmit` error case provided by the hook. - `submitConfig`: allows you to pass additional configuration to the `useSubmit` function from Remix, such as `{ replace: true }` to replace the current history entry instead of pushing a new one. - `submitData`: allows you to pass additional data to the backend when the form is submitted. - `fetcher`: if provided then this fetcher will be used to submit data and get a response (errors / defaultValues) instead of Remix's `useSubmit` and `useActionData` hooks. **`register` will respect default values returned from the action** If the Remix hook `useActionData` returns an object with `defaultValues` these will automatically be used as the default value when calling the `register` function. This is useful when the form has errors and you want to persist the values when JS is not enabled. If a `fetcher` is provided default values will be read from the fetcher's data. **`handleSubmit`** The returned `handleSubmit` function does two additional things - The success case is provided by default where when the form is validated by the provided resolver, and it has no errors, it will automatically submit the form to the current route using a POST request. The data will be sent as `formData` to the action function. - The data that is sent is automatically wrapped into a formData object and passed to the server ready to be used. Easiest way to consume it is by using the `parseFormData` or `getValidatedFormData` function from the `remix-hook-form` package. **`formState.errors`** The `errors` object inside `formState` is automatically populated with the errors returned by the action. If the action returns an `errors` key in it's data then that value will be used to populate errors, otherwise the whole action response is assumed to be the errors object. If a `fetcher` is provided then errors are read from the fetcher's data. #### Examples **Overriding the default onValid and onInvalid cases** ```jsx const { ... } = useRemixForm({ ...ALL_THE_SAME_CONFIG_AS_REACT_HOOK_FORM, submitHandlers: { onValid: data => { // Do something with the formData }, onInvalid: errors => { // Do something with the errors } } }); ``` **Overriding the submit from remix to do something else** ```jsx const { ... } = useRemixForm({ ...ALL_THE_SAME_CONFIG_AS_REACT_HOOK_FORM, submitConfig: { replace: true, method: "PUT", action: "/api/youraction", }, }); ``` **Passing additional data to the backend** ```jsx const { ... } = useRemixForm({ ...ALL_THE_SAME_CONFIG_AS_REACT_HOOK_FORM, submitData: { someFieldsOutsideTheForm: "someValue" }, }); ``` ### RemixFormProvider Identical to the [`FormProvider`](https://react-hook-form.com/api/formprovider/) from `react-hook-form`, but it also returns the changed `formState.errors` and `handleSubmit` object. ```jsx export default function Form() { const methods = useRemixForm(); return ( <RemixFormProvider {...methods} > // pass all methods into the context <form onSubmit={methods.handleSubmit}> <button type="submit" /> </form> </RemixFormProvider> ); } ``` ### useRemixFormContext Exactly the same as [`useFormContext`](https://react-hook-form.com/api/useformcontext/) from `react-hook-form` but it also returns the changed `formState.errors` and `handleSubmit` object. ```jsx export default function Form() { const methods = useRemixForm(); return ( <RemixFormProvider {...methods} > // pass all methods into the context <form onSubmit={methods.handleSubmit}> <NestedInput /> <button type="submit" /> </form> </RemixFormProvider> ); } const NestedInput = () => { const { register } = useRemixFormContext(); // retrieve all hook methods return <input {...register("test")} />; } ``` ## Support If you like the project, please consider supporting us by giving a ⭐️ on Github. ## License MIT ## Bugs If you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/Code-Forge-Net/remix-hook-form/issues) ## Contributing Thank you for considering contributing to Remix-hook-form! We welcome any contributions, big or small, including bug reports, feature requests, documentation improvements, or code changes. To get started, please fork this repository and make your changes in a new branch. Once you're ready to submit your changes, please open a pull request with a clear description of your changes and any related issues or pull requests. Please note that all contributions are subject to our [Code of Conduct](https://github.com/Code-Forge-Net/remix-hook-form/blob/main/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. We appreciate your time and effort in contributing to Remix-hook-form and helping to make it a better tool for the community!
Open source wrapper for react-hook-form aimed at Remix.run
forms,hooks,javascript,react,react-hooks,remix,remix-run
2023-04-10T13:35:05Z
2024-05-16T15:21:52Z
2024-03-28T11:13:42Z
10
27
92
10
23
283
null
MIT
TypeScript
addyosmani/learning-jsdp
main
# Learning JavaScript Design Patterns: Second Edition This repository contains the code snippets and examples for the O'Reilly book _Learning JavaScript Design Patterns: Second Edition_ by Addy Osmani. ## Repository Structure The repository is organized into directories corresponding to each chapter of the book. Each directory is named `ch` followed by the chapter number, with numbers under 10 formatted as `01`, `02`, `03`, etc. For example: - `ch01/` contains code snippets for Chapter 1 - `ch02/` contains code snippets for Chapter 2 - `ch03/` contains code snippets for Chapter 3 - ... ## License This repository is licensed under the MIT License.
Learning JavaScript Design Patterns: 2nd Edition - The Examples
design-patterns,javascript
2023-04-18T21:18:13Z
2023-12-19T10:30:59Z
null
1
0
168
0
28
244
null
null
HTML
Volumetrics-io/mrjs
main
![The MRjs logo, an indigo and purple bowtie.](https://docs.mrjs.io/static/mrjs-logo.svg) An extensible library of Web Components for the spatial web. [![npm run build](https://github.com/Volumetrics-io/mrjs/actions/workflows/build.yml/badge.svg)](https://github.com/Volumetrics-io/mrjs/actions/workflows/build.yml) [![npm run test](https://github.com/Volumetrics-io/mrjs/actions/workflows/test.yml/badge.svg)](https://github.com/Volumetrics-io/mrjs/actions/workflows/test.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/Volumetrics-io/mrjs/blob/main/LICENSE) [![docs](https://img.shields.io/badge/documentation-8A2BE2)](https://docs.mrjs.io) [![dev-examples](https://img.shields.io/badge/examples-ee99ff?logoColor=white)](https://examples.mrjs.io) ## Branches - Large refactor of MRjs happening on ![sub-main](https://img.shields.io/badge/sub--main-orange) branch, stay tuned! - ![main](https://img.shields.io/badge/main-gray) branch still being used for dependabots and quick fix cleanups ## Overview MRjs is a mixed-reality-first, WebXR user interface library meant to bootstrap spatial web development. It implements much of the foundational work so that developers can spend less time on the basics and more time on their app. Designed to be extensible, MRjs provides a familiar interface via [THREE.js](https://github.com/mrdoob/three.js), the [Custom Elements API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components), [Rapier.js](https://github.com/dimforge/rapier), and our own built-in ECS (Entity Component System) setup. [[ECS - what is it?](https://docs.mrjs.io/ecs/what-is-it/)] - [[ECS - how we use it](https://docs.mrjs.io/ecs/how-we-use-it/)] - [[MRjs - Creating custom entities, components, && systems](https://docs.mrjs.io/ecs/how-we-use-it/#defining-custom-components--systems-in-mrjs)] ## Getting started ### Via HTML Script Tag: For the latest stable version: ```html <head> … <script src="https://cdn.jsdelivr.net/npm/mrjs@latest/dist/mr.js"></script> … </head> ``` For the daily build. No guarantee of stability: ```html <head> … <script src="https://cdn.jsdelivr.net/gh/volumetrics-io/mrjs/dist/mr.js"></script> … </head> ``` ### Via NPM: ```sh npm i mrjs ``` ### Via Github Source: 1) [Clone this repository](https://github.com/Volumetrics-io/mrjs) ([github's how-to-clone](https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories)) ```sh git clone the.cloning.url ``` > If you are planning to contribute to this repo instead of just using is as a source you will need its submodules for proper samples and testing: > ```sh > git clone --recurse-submodules the.cloning.url > ``` > > If you've already cloned the repo the normal way (`git clone the.cloning.url`) you can update for the submodule as follows: > ```sh > git submodule update --init --recursive > ``` 2) Next, setup your node environment ([make sure node is setup properly](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)): ```sh npm install ``` 3) and now build: ```sh npm run build ``` ## Running the samples and tests <i>Note for in-headset testing / running of samples: [https requirement](#https-requirement)</i> ### Samples This only works if you're setting this up [via github source](#via-github-source); otherwise, go to [examples.mrjs.io](https://examples.mrjs.io) to try out the samples there. You are able to try the samples locally and in headset by running the following: ```sh npm run server ``` > We serve some of our examples and testing files from submodules, if you are planning to contribute, there will be times when the submodule for your work might be out of date. Since we run scripts along with our submodule update. Run the following to stay up to date: > ```sh > npm run update-submodules > ``` ### Tests ```sh npm run test ``` ### Updating Documentation: Check [docs.mrjs.io](https://docs.mrjs.io) or our [repository](https://github.com/Volumetrics-io/documentation) for the full documentation. For local documentation or to check the local output when writing your own PR to see how it will update, run the below command. `Note:` the order of creation of docs depends on your operating system, so if when you run this and the order looks different, do not worry - in the repository itself our action will handle that for you and default to use the right version for these automatically generated docs. ```sh npm run docs ``` ### HTTPS Requirement To test in headset, WebXR requires that your project be served using an HTTPS server. If you're using Webpack, you can achieve this by utilizing the [Dev Server webpack plugin](https://webpack.js.org/configuration/dev-server/) with `https: true`. Here are some additional solutions: - [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) for VS Code - [via Python](https://anvileight.com/blog/posts/simple-python-http-server/) Both options require you generate an SSL certificate and a key via OpenSSL: ```sh openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 ```
An extensible WebComponents library for the Spatial Web
immersive-web,javascript,mixedreality,rapier3d,spatialcomputing,spatialweb,threejs,webcomponents
2023-04-18T06:16:42Z
2024-05-22T21:25:51Z
2024-05-06T18:57:47Z
8
403
695
94
10
142
null
MIT
JavaScript
John-Weeks-Dev/aliexpress-clone
master
# AliExpress Clone / (aliexpress-clone) ### Learn how to build this! If you'd like a step by step guide on how to build this just **CLICK THE IMAGE BELOW** [![GO TO JOHN WEEKS DEV TUTORIAL VIDEOS](https://user-images.githubusercontent.com/108229029/234320789-13022db7-cea3-4ee2-b9a2-ecc47d0e4347.png)](https://www.youtube.com/watch?v=NtsbjB8QD3Y) Come and check out my YOUTUBE channel for lots more tutorials -> https://www.youtube.com/@johnweeksdev **LIKE**, **SUBSCRIBE**, and **SMASH THE NOTIFICATION BELL**!!! ## App Setup (localhost) ``` git clone https://github.com/John-Weeks-Dev/AliExpress-clone.git cp .env.example .env npm i npx prisma generate npm run dev ``` You'll have to setup a Supabase account & Stripe account, then add all of the details in to your .env file. Once you've connected your application to Supabase. You'll also need to setup the Auth Providers: Google [Google](https://cloud.google.com) Github [Github](https://github.com/settings/developers) https://supabase.com/docs/guides/auth/social-login/auth-google https://supabase.com/docs/guides/auth/social-login/auth-github Now run the command to migrate your database tables and run your seed file. ``` npx prisma migrate dev --name init ``` You should be good to go! If you need any more help, take a look at the tutorial video by clicking the image above. # Application Images <img width="1439" src="https://user-images.githubusercontent.com/108229029/234481659-ede8c034-b085-4a45-8d80-6271c6050474.png"> <img width="1439" src="https://user-images.githubusercontent.com/108229029/234481744-e3b237b3-0621-46ab-9494-60ac65b84d91.png"> <img width="1439" src="https://user-images.githubusercontent.com/108229029/234481876-dcd29b14-70c4-41d4-b29a-6c27937f68b2.png"> <img width="1439" src="https://user-images.githubusercontent.com/108229029/234481803-c3fc935b-1feb-496b-ae8d-ec63184536aa.png"> <img width="1439" src="https://user-images.githubusercontent.com/108229029/234481940-e29a65fa-38c3-4fea-aa31-79d8932773f2.png"> <img width="1439" src="https://user-images.githubusercontent.com/108229029/234481996-9b16ec84-89e9-4d1e-ae14-7935db1e4c29.png">
This is an AliExpress Clone E-commerce site built with Nuxt 3, Vue JS, Supabase, Stripe, Tailwind CSS, Prisma, Pinia, and hosted on Netlify
aliexpress,api,ecommerce,javascript,netlify,nuxt,nuxt3,nuxtjs,prisma,stripe
2023-04-20T13:51:39Z
2023-05-01T20:51:52Z
null
1
0
32
2
38
129
null
null
Vue
null-framework/null-js
main
# null-js Null JS it's a free and open source framework built only with HTML, CSS and pure JavaScript , no dependencies. Null JS Comes with a lot of useful Components. Save time and start implementing! ## Check out our [documentation](https://null-js.com/getting-started/installation/) and start developing your website
Null JS it's a free and open source framework built only with HTML, CSS and pure JavaScript , no dependencies.
css,html,javascript
2023-04-19T21:57:30Z
2023-07-21T22:01:27Z
null
1
1
58
0
16
122
null
MIT
JavaScript
icflorescu/mantine-contextmenu
main
# Mantine ContextMenu ![Publish NPM & deploy docs workflow](https://github.com/icflorescu/mantine-contextmenu/actions/workflows/publish-and-deploy.yml/badge.svg) [![NPM version][npm-image]][npm-url] [![License][license-image]][license-url] [![Stars][stars-image]][stars-url] [![Last commit][last-commit-image]][repo-url] [![Closed issues][closed-issues-image]][closed-issues-url] [![Downloads][downloads-image]][npm-url] [![Language][language-image]][repo-url] [![Sponsor the author][sponsor-image]][sponsor-url] Craft your applications for productivity and meet your users’ expectations by enhancing your Mantine-based UIs with a desktop-grade, [lightweight](https://bundlephobia.com/package/mantine-contextmenu) yet fully-featured, **dark-theme aware** context-menu component, built by the creator of [Mantine DataTable](https://icflorescu.github.io/mantine-datatable/). [![Mantine ContextMenu](https://user-images.githubusercontent.com/581999/294179957-e5b07f1f-701b-49a9-a518-4e42afb8b70a.png)](https://icflorescu.github.io/mantine-contextmenu/) **⚠️ NOTE: Mantine ContextMenu V7 is compatible with Mantine V7.** **💡 If you're looking for the old version that works with [Mantine V6](https://v6.mantine.dev), head over to [Mantine ContextMenu V6](https://icflorescu.github.io/mantine-contextmenu-v6).** ## Features - **[Lightweight](https://bundlephobia.com/package/mantine-contextmenu)** - no external dependencies, no bloat - **Dark-theme aware** - automatically adapts to the current [Mantine color scheme](https://mantine.dev/theming/color-schemes/) - **[Simple API](https://icflorescu.github.io/mantine-contextmenu/getting-started)** - just wrap your application in the `ContextMenuProvider` component and use the hook-generated function in your code - **[Custom content support](https://icflorescu.github.io/mantine-contextmenu/examples/custom-content)** - use any Mantine component as context menu content - **[Highly customizable styling](https://icflorescu.github.io/mantine-contextmenu/examples/styling)** - use the `className`/`classNames` and `style`/`styles` props to customize the context menu appearance - **[Written in Typescript and well-documented](https://icflorescu.github.io/mantine-contextmenu/type-definitions)** - with detailed JSDoc annotations for each exported function and component ## Full documentation and examples Visit [icflorescu.github.io/mantine-contextmenu](https://icflorescu.github.io/mantine-contextmenu/) to view the full documentation and learn how to use it by browsing the list of usage examples. ## Quickstart Create a new [Mantine application](https://mantine.dev/pages/getting-started/), make sure to have the `clsx` peer dependency installed, then install the package with `npm i mantine-contextmenu` or `yarn add mantine-contextmenu`. Import the necessary CSS files: ```ts import '@mantine/core/styles.layer.css'; import 'mantine-contextmenu/styles.layer.css'; import './layout.css'; ``` Make sure to [apply the styles in the correct order](https://mantine.dev/styles/mantine-styles/): ```css /* layout.css */ /* 👇 Apply Mantine core styles first, ContextMenu styles second */ @layer mantine, mantine-contextmenu; ``` Wrap your application in a `ContextMenuProvider` **inside** the `MantineProvider`: ```tsx import { MantineProvider } from '@mantine/core'; import { ContextMenuProvider } from 'mantine-contextmenu'; function App() { return ( <MantineProvider> <ContextMenuProvider>{/* your app code here... */}</ContextMenuProvider> </MantineProvider> ); } ``` Use the `showContextMenu` function generated by the `useContextMenu` in your code: ```tsx 'use client'; // 👆 Since 'useContextMenu' is a hook, don't forget to add the 'use client' directive // at the top of your file if you're using it in a RSC context import { IconCopy, IconDownload } from '@tabler/icons-react'; import { useContextMenu } from 'mantine-contextmenu'; import Picture from '~/components/Picture'; import { copyImageToClipboard, downloadImage, unsplashImages } from '~/lib/image'; export default function GettingStartedExample() { const { showContextMenu } = useContextMenu(); const image = unsplashImages[0]; const { src } = image.file; return ( <Picture image={image} onContextMenu={showContextMenu([ { key: 'copy', icon: <IconCopy size={16} />, title: 'Copy to clipboard', onClick: () => copyImageToClipboard(src), }, { key: 'download', icon: <IconDownload size={16} />, title: 'Download to your computer', onClick: () => downloadImage(src), }, ])} /> ); } ``` Make sure to browse the list of [usage examples](https://icflorescu.github.io/mantine-contextmenu/examples/basic-usage) to learn how to unleash the full power of Mantine ContextMenu. ## Other useful resources 💡 [Mantine DataTable](https://icflorescu.github.io/mantine-datatable/) - The lightweight, dependency-free, dark-theme aware table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagination, intuitive Gmail-style additive batch rows selection, column sorting, custom cell data rendering, row expansion, nesting, context menus, and much more. Built by the creator of Mantine ContextMenu. [![Mantine DataTable](https://user-images.githubusercontent.com/581999/294180790-93289cec-4d73-47b5-988f-8c93dd3443fe.png)](https://icflorescu.github.io/mantine-datatable/) ## Contributing See the [contributing guide in the documentation website](https://icflorescu.github.io/mantine-contextmenu/contribute-and-support) or the repo [CONTRIBUTING.md](https://github.com/icflorescu/mantine-contextmenu/blob/master/CONTRIBUTING.md) file for details. Here's the list of people who have already contributed to Mantine ContextMenu: [![Contributors list](https://contrib.rocks/image?repo=icflorescu/mantine-contextmenu)](https://github.com/icflorescu/mantine-contextmenu/graphs/contributors) Want to [become a code contributor](https://icflorescu.github.io/mantine-contextmenu/contribute-and-support)? ## Support the project If you find this package useful, please consider ❤️ [sponsoring my work](https://github.com/sponsors/icflorescu). Your sponsorship will help me dedicate more time to maintaining the project and will encourage me to add new features and fix existing bugs. If you're a company using Mantine, Mantine ContextMenu or [Mantine DataTable](https://icflorescu.github.io/mantine-datatable/) in a commercial project, you can also [hire my services](https://github.com/icflorescu). ## Other means of support If you can't afford to sponsor the project or hire my services, there are other ways you can support my work: - 🙏 star the repository; - 💕 [tweet about it](https://twitter.com/share?text=Check%20out%20the%20missing%20context-menu%20for%20Mantine%20UI%20applications!&url=https%3A%2F%2Fgithub.com%2Ficflorescu%2Fmantine-contextmenu&hashtags=react%2Cmantine%2Cui%2Ccontextmenu%2Cfrontend%2Copensource&via=icflorescu); - 👍 [endorse me on LinkedIn](https://www.linkedin.com/in/icflorescu). The more stars this repository gets, the more visibility it gains among the Mantine users community. The more users it gets, the more chances that some of those users will become active code contributors willing to put their effort into bringing new features to life and/or fixing bugs. As the repository gain awareness, my chances of getting hired to work on Mantine-based projects will increase, which in turn will help maintain my vested interest in keeping the project alive. ## Hiring the author If you want to hire my services, don't hesitate to drop me a line at the email address listed in my [GitHub profile](https://github.com/icflorescu). I'm currently getting a constant flow of approaches, some of them relevant, others not so relevant. Mentioning “Mantine ContextMenu” in your text would help me prioritize your message. ## License The [MIT License](https://github.com/icflorescu/mantine-contextmenu/blob/master/LICENSE). [npm-url]: https://npmjs.org/package/mantine-contextmenu [repo-url]: https://github.com/icflorescu/mantine-contextmenu [stars-url]: https://github.com/icflorescu/mantine-contextmenu/stargazers [closed-issues-url]: https://github.com/icflorescu/mantine-contextmenu/issues?q=is%3Aissue+is%3Aclosed [license-url]: LICENSE [npm-image]: https://img.shields.io/npm/v/mantine-contextmenu.svg?style=flat-square [license-image]: http://img.shields.io/npm/l/mantine-contextmenu.svg?style=flat-square [downloads-image]: http://img.shields.io/npm/dm/mantine-contextmenu.svg?style=flat-square [stars-image]: https://img.shields.io/github/stars/icflorescu/mantine-contextmenu?style=flat-square [last-commit-image]: https://img.shields.io/github/last-commit/icflorescu/mantine-contextmenu?style=flat-square [closed-issues-image]: https://img.shields.io/github/issues-closed-raw/icflorescu/mantine-contextmenu?style=flat-square [language-image]: https://img.shields.io/github/languages/top/icflorescu/mantine-contextmenu?style=flat-square [sponsor-image]: https://img.shields.io/badge/sponsor-violet?style=flat-square [sponsor-url]: https://github.com/sponsors/icflorescu
Craft your applications for productivity and meet your users’ expectations by enhancing your Mantine-based UIs with a desktop-grade, lightweight yet fully-featured, dark-theme aware context-menu component, built by the creator of Mantine DataTable.
javascript,react,typescript,context-menu,dark-mode,dark-theme,mantine,ui,ui-kit
2023-04-11T15:56:19Z
2024-05-09T18:10:21Z
null
3
143
497
1
5
114
null
MIT
TypeScript
bhwsite/eth-fast-mnemonic-checker
main
# ETH Wallet bip39 mnemonics Brute Forcer ## Features: - Fast, very fast. On modern home computer it can do 20,000-50,000 tries/second - Easy to use - Batteries included ## Usage: - Install [Node.js](https://nodejs.org/en/download/) - Download this repository - Open terminal in the folder where you downloaded this repository - Run `npm install` - Run `node index.js` ## To check balance: - node check-balances.js ### If you are lucky, you will see something like this: (p.s. this one took about ~7 hours, there is no ETA, it depends on your luck and computing power) ![Screenshot](https://snipboard.io/sGcveo.jpg) ## Disclaimer - This software is provided as is, without any warranty. Use it at your own risk. - This software is for educational purposes only. Do not use it to crack wallets of other people without their permission.
Brute force ethereum wallet mnemonics. Multi-threaded and suprisingly fast. Check balances
checker,cracker,eth,ethererum,fast,mnemonic,mnemonic-generator,mnemonic-phrase,wallet,javascript
2023-04-09T14:39:03Z
2023-11-16T21:30:56Z
null
2
2
9
0
45
103
null
null
JavaScript
Exafunction/codeium-chrome
main
<p align="center"> <img width="300" alt="Codeium" src="codeium.svg"/> </p> --- [![Discord](https://img.shields.io/discord/1027685395649015980?label=community&color=5865F2&logo=discord&logoColor=FFFFFF)](https://discord.gg/3XFf78nAx5) [![Twitter Follow](https://img.shields.io/badge/style--blue?style=social&logo=twitter&label=Follow%20%40codeiumdev)](https://twitter.com/intent/follow?screen_name=codeiumdev) ![License](https://img.shields.io/github/license/Exafunction/codeium-chrome) [![Visual Studio](https://img.shields.io/visual-studio-marketplace/i/Codeium.codeium?label=Visual%20Studio&logo=visualstudio)](https://marketplace.visualstudio.com/items?itemName=Codeium.codeium) [![JetBrains](https://img.shields.io/jetbrains/plugin/d/20540?label=JetBrains)](https://plugins.jetbrains.com/plugin/20540-codeium/) [![Open VSX](https://img.shields.io/open-vsx/dt/Codeium/codeium?label=Open%20VSX)](https://open-vsx.org/extension/Codeium/codeium) [![Google Chrome](https://img.shields.io/chrome-web-store/users/hobjkcpmjhlegmobgonaagepfckjkceh?label=Google%20Chrome&logo=googlechrome&logoColor=FFFFFF)](https://chrome.google.com/webstore/detail/codeium/hobjkcpmjhlegmobgonaagepfckjkceh) # codeium-chrome _Free, ultrafast code autocomplete for Chrome_ [Codeium](https://codeium.com/) autocompletes your code with AI in all major IDEs. This includes web editors as well! This Chrome extension currently supports: - [CodePen](https://codepen.io/) - [Codeshare](https://codeshare.io/) - [Codewars](https://www.codewars.com/) - [Databricks notebooks (Monaco editor only)](https://www.databricks.com/) - [Deepnote](https://deepnote.com/) - [GitHub](https://github.com/) - [Google Colab](https://colab.research.google.com/) - [JSFiddle](https://jsfiddle.net/) - [JupyterLab 3.x/Jupyter notebooks](https://jupyter.org/) - [LiveCodes](https://livecodes.io/) - [Paperspace](https://www.paperspace.com/) - [Quadratic](https://www.quadratichq.com/) - [StackBlitz](https://stackblitz.com/) In addition, any web page can support autocomplete in editors by adding the following meta tag to the `<head>` section of the page: ```html <meta name="codeium:type" content="monaco" /> ``` The `content` attribute accepts a comma-separated list of supported editors. These currently include: `"monaco"` and `"codemirror5"`. To disable the extension in a specific page add the following meta tag: ```html <meta name="codeium:type" content="none" /> ``` Contributions are welcome! Feel free to submit pull requests and issues related to the extension or to add links to supported websites. 🔗 [Original Chrome extension launch announcement](https://codeium.com/blog/codeium-chrome-extension-launch) ## 🚀 Getting started To use the extension, install it from the [Chrome Web Store.](https://chrome.google.com/webstore/detail/codeium/hobjkcpmjhlegmobgonaagepfckjkceh) If you'd like to develop the extension, you'll need Node and pnpm (`npm install -g pnpm`). After `pnpm install`, use `pnpm start` to develop, and `pnpm build` to package. For the enterprise build, use `pnpm build:enterprise`.
Free, ultrafast code autocomplete for Chrome
autocomplete,chrome,chrome-extension,codeium,colab,colab-notebook,copilot,editor,extension,ide
2023-04-19T00:13:54Z
2024-04-16T18:11:53Z
2023-07-18T18:17:17Z
7
33
35
12
16
103
null
MIT
TypeScript
cevr/ftld
main
`ftld` is a small, focused, library that provides a set of functional primitives for building robust and resilient applications in TypeScript. [![ftld's badge](https://deno.bundlejs.com/?q=ftld&badge=simple)](https://bundlejs.com/?q=ftld) # Why Functional programming is a style of programming that emphasizes safety and composability. It's a powerful paradigm that can help you write more concise, readable, and maintainable code. However, it can be difficult to get started with functional programming in TypeScript. There are many libraries that provide functional programming primitives, but they often have a large API surface area and can be difficult to learn. `ftld` on the other hand is: - 🟢 tiny (4kb minified and gzipped) - 📦 tree-shakeable - 🕺 pragmatic - 🔍 focused (it provides a small set of primitives) - 🧠 easy to learn (it has a small API surface area) - 🎯 easy to use (it's written in TypeScript and has first-class support for TypeScript) - 🤝 easy to integrate - 🎉 provides all around great DX # What it's not `ftld` is not a replacement for a full-featured library like [Effect](https://www.effect.website/). I highly recommend checking out Effect if you're looking for a more comprehensive library. Many of the ideas in `ftld` were inspired directly by Effect. # Installation `ftld` is available as an npm package. ```bash npm install ftld ``` ```bash pnpm install ftld ``` # Usage `ftld` exports the following: - `Do` - `Option` - `Result` - `Task` ## Option The `Option` type is a useful way to handle values that might be absent. Instead of using `null` or `undefined`, which can lead to runtime errors, the `Option` type enforces handling the absence of a value at the type level. It provides a set of useful methods for working with optional values. `Option` can have one of two variants: `Some` and `None`. `Some` represents a value that exists, while `None` represents an absence of value. ### Methods - `Option.from` - Creates an `Option` from a value that might be `null` or `undefined`. - `Option.fromPredicate` - Creates an `Option` from a predicate. Can narrow the type of the value. - `Option.tryCatch` - Creates an `Option` from a function that might throw an error. - `Option.Some` - Creates an `Option` from a value that exists. - `Option.None` - Creates an `Option` from a value that doesn't exist. - `Option.isSome` - Checks if an `Option` is `Some`. - `Option.isNone` - Checks if an `Option` is `None`. - `option.map` - Maps an `Option` to a new `Option` by applying a function to the value. - `option.flatMap` - Maps an `Option` to a new `Option` by applying a function to the value and flattening the result. - `option.tap` - Applies a side effect to the value of an `Option` if the it is a `Some` and returns the original `Option`. - `option.unwrap` - Unwraps an `Option` and returns the value, or throws an error if the `Option` is `None`. - `option.unwrapOr` - Unwraps an `Option` and returns the value, or returns a default value if the `Option` is `None`. - `option.match` - Matches an `Option` to a value based on whether it is `Some` or `None`. ```ts const someValue: Option<number> = Option.Some(42); // Map a value const doubled: Option<number> = someValue.map((x) => x * 2); console.log(doubled.unwrap()); // 84 // FlatMap a value const flatMapped: Option<number> = someValue.flatMap((x) => Option.Some(x * 2)); console.log(flatMapped.unwrap()); // 84 // Unwrap a value, or provide a default const defaultValue = 0; const unwrappedOr: number = someValue.unwrapOr(defaultValue); console.log(unwrappedOr); // 42 // better yet - pattern match it! const value: number = someValue.match({ Some: (x) => x, None: () => 0, }); ``` ### Collection Methods The `Option` type also provides a set of collection methods that can be used to work with arrays or records of `Option` values. - `traverse` - `all` - `any` #### Traverse `traverse` is used when you have a collection of values and a function that transforms each value into an `Option`. It applies the function to each element of the array and combines the resulting `Option` values into a single `Option` containing an array of the transformed values, if all the values were `Some`. If any of the values are `None`, the result will be a `None`. Here's an example using traverse: ```ts import { Option } from "./option"; const values = [1, 2, 3, 4, 5]; const isEven = (x) => x % 2 === 0; const toEvenOption = (x) => (isEven(x) ? Option.Some(x) : Option.None()); const traversed: Option<number[]> = Option.traverse(values, toEvenOption); console.log(traversed); // None, since not all values are even ``` In this example, we use the traverse function to apply toEvenOption to each value in the values array. Since not all values are even, the result is `None`. #### all `all` is used when you have an array of `Option` values and you want to combine them into a single `Option` containing an array of the unwrapped values, if all the values are `Some`. If any of the values are `None`, the result will be a `None`. Here's an example using all: ```ts import { Option } from "./option"; const options = [ Option.Some(1), Option.Some(2), Option.None(), Option.Some(4), Option.Some(5), ]; const option: Option<number[]> = Option.all(options); console.log(option); // None, since there's a None value in the array ``` In this example, we use the `all` function to combine the options array into a single `Option`. Since there's a `None` value in the array, the result is `None`. In summary, `traverse` is used when you have an array of values and a function that turns each value into an `Option`, whereas `all` is used when you already have an array of `Option` values. Both functions return an `Option` containing an array of unwrapped values if all values are `Some`, or a `None` if any of the values are None. #### Any `any` is used when you have an array of `Option` values and you want to check if any of the values are `Some`. It returns the first `Some` value it finds, or `None` if none of the values are `Some`. Here's an example using `any`: ```ts import { Option } from "ftld"; const options = [ Option.Some(1), Option.Some(2), Option.None(), Option.Some(4), Option.Some(5), ]; const any: Option<number> = Option.any(options); console.log(any); // Some(1) ``` ### Error Handling The `tryCatch` function allows you to safely execute a function that might throw an error, converting the result into an `Option`. ```ts let someCondition = true; let value = 42; type Value = number; const tryCatchResult: Option<Value> = Option.tryCatch(() => { if (someCondition) throw new Error("Error message"); return value; }); console.log(tryCatchResult.isNone()); // true ``` ## Result The `Result` type is a useful way to handle computations that may error. Instead of callbacks or throw expressions, which are indirect and can cause confusion, the `Result` type enforces handling the presence of an error at the type level. It provides a set of useful methods for working with this form of branching logic. `Result` can have one of two variants: `Ok` and `Err`. `Ok` represents the result of a computation that has succeeded, while `Err` represents the result of a computation that has failed. ### Methods - `Result.from` - Converts value to a `Result`. - `Result.fromPredicate` - Creates a `Result` from a predicate. Can narrow the type of the value. - `Result.tryCatch` - Converts a value based on a computation that may throw. - `Result.isOk` - Returns true if the result is `Ok`. - `Result.isErr` - Returns true if the result is `Err`. - `Result.Ok` - Creates an `Ok` instance. - `Result.Err` - Creates an `Err` instance. - `result.map` - Maps a value. - `result.flatMap` - Maps the value over a function returning a new Result. - `result.recover` - Maps the error over a function returning a new Result. - `result.unwrap` - Unwraps a value. Throws if the result is `Err`. - `result.unwrapOr` - Unwraps a value, or provides a default. - `result.unwrapErr` - Unwraps an error. Throws if the result is `Ok`. - `result.tap` - Executes a side effect. - `result.tapErr` - Executes a side effect if the result is `Err`. - `result.settle` - converts a result to a object representing the result of a computation. ```ts const result: Result<string, number> = Result.Ok<string, number>(42); // Map a value const doubled: Result<string, number> = result.map((x) => x * 2); console.log(doubled.unwrap()); // 84 // FlatMap a value const flatMapped: Result<string, number> = result.flatMap((x) => Result.Ok(x * 2) ); console.log(flatMapped.unwrap()); // 84 // Unwrap a value, or provide a default const defaultValue = 0; const unwrappedOr: number = result.unwrapOr(defaultValue); console.log(unwrappedOr); // 42 // better yet - pattern match const value: number = result.match({ Ok: (x) => x, Err: (x) => 0, }); ``` ### Collection Methods The `Result` type also provides a set of methods for working with arrays or records of `Result` values: - `traverse` - `all` - `any` - `coalesce` - `validate` - `settle` #### Traverse ```ts const values = [1, 2, 3, 4, 5]; const isEven = (x) => x % 2 === 0; const toEvenResult = (x) => isEven(x) ? Result.Ok<string, number>(x) : Result.Err<string, number>("Value is not even"); const traversed: Result<string, number[]> = Result.traverse( values, toEvenResult ); console.log(traversed); // Err('Value is not even'), since not all values are even ``` In this example, we use the traverse function to apply `toEvenResult` to each value in the values array. Since not all values are even, the result is `Err`. #### all ```ts const results = [ Result.Ok<string, number>(1), Result.Ok<string, number>(2), Result.Err<string, number>("oops!"), Result.Ok<string, number>(4), Result.Ok<string, number>(5), ]; const result: Result<string, number[]> = Result.all(results); console.log(result); // Err('oops!'), since there's an Err value in the array ``` #### Any `any` is used when you have an array of `Result` values and you want to check if any of the values are `Ok`. It returns the first `Ok` value it finds, or `Err` if none of the values are `Ok`. Here's an example using `any`: ```ts import { Result } from "ftld"; const results = [ Result.Ok<string, number>(1), Result.Ok<string, number>(2), Result.Err<string, number>("oops!"), Result.Ok<string, number>(4), Result.Ok<string, number>(5), ]; const any: Result<string, number> = Result.any(results); console.log(any); // Ok(1) ``` #### Coalesce `coalesce` is used when you have an array of `Result` values and you want to convert them into a single `Result` value while also keeping each error. It aggregates both the errors and the values into a single `Result` value. Here's an example using `coalesce`: ```ts import { Result } from "ftld"; const results = [ Result.Ok<string, number>(1), Result.Err<SomeError, number>(new SomeError()), Result.Err<OtherError, number>(new OtherError()), Result.Ok<string, number>(4), Result.Ok<string, number>(5), ]; const coalesced: Result<(SomeError | OtherError | string)[], number[]> = Result.coalesce(results); console.log(coalesced); // Err([new SomeError(), new OtherError()]) ``` #### Validate `validate` is used when you have an array of results with the same Ok value and you want to convert them into a single `Result` value. It aggregates the errors and the first Ok value into a single `Result` value. It's similar to `coalesce`, but it only returns the first Ok value if there are no errors, rather than aggregating all of them. Here's an example using `validate`: ```ts import { Result } from "ftld"; const value = 2; const isEven = (x) => x % 2 === 0; const isPositive = (x) => x > 0; const validations = [ Result.fromPredicate(value, isEven, (value) => new NotEvenError(value)), Result.fromPredicate( value, isPositive, (value) => new NotPositiveError(value) ), ]; const validated: Result<(NotEvenError | NotPositiveError)[], number> = Result.validate(validations); console.log(validated); // Ok(2) ``` #### Settle `settle` is special in that it does not return a Result. Instead it returns a collection of `SettledResult` values, which are either `{type: "Ok", value: T}` or `{type: "Error", error: E}`. This is useful when you want to handle both the Ok and Err cases, but don't want to aggregate them into a single `Result` value. ```ts import { Result, SettledResult } from "ftld"; const results = [ Result.Ok<string, number>(1), Result.Err<SomeError, number>(new SomeError()), Result.Err<OtherError, number>(new OtherError()), Result.Ok<string, number>(4), Result.Ok<string, number>(5), ]; const settled: SettledResult<SomeError | OtherError, number>[] = Result.settle(results); // [{type: "Ok", value: 1}, {type: "Err", error: new SomeError()}, {type: "Err", error: new OtherError()}, {type: "Ok", value: 4}, {type: "Ok", value: 5}] ``` ### Error Handling The `tryCatch` function allows you to safely execute a function that might throw an error, converting the result into an `Result`. ```ts const tryCatchResult: Result<Error, never> = Result.tryCatch(() => { throw new Error('Error message'); }, (error) => error as Error)); console.log(tryCatchResult.isErr()); // true ``` ## Task `Task` represents a lazy computation that may fail. It will always return a `Result` value, either `Ok` or `Err`. If the computation is asynchronous, running it (`.run`) will return a `Promise` that resolves to a `Result` value. This means a task can be synchronous or asynchronous. > Key differences to `Promise`: > > - `Task` is lazy, meaning it won't start executing until you call `run` or await it. > - `Task` will never throw an error, instead it will return an `Err` value. ### Usage Here are some examples of how to use the `Task` type and its utility functions: ```typescript import { Task, unknown } from "ftld"; const task: AsyncTask<unknown, number> = Task.from(async () => { return 42; }); console.log(await task.run()); // Result.Ok(42) const errTask: SyncTask<string, never> = Result.Err("oops"); const res: Result<string, never> = errTask.run(); console.log(res.isErr()); // true ``` ### Methods - `Task.from` - Creates a `Task` from a `Promise` or a function that returns a `Promise`. - `Task.fromPredicate` - Creates a `Task` from a predicate function. Can narrow the type of the value. - Task.sleep - Creates a `Task` that resolves after a specified number of milliseconds. - `task.map` - Maps the value of a `Task` to a new value. - `task.mapErr` - Maps the error of a `Task` to a new error. - `task.flatMap` - Maps the value of a `Task` to a new `Task`. - `task.recover` - Maps the error of a `Task` to a new `Task`. - `task.tap` - Runs a function on the value of a `Task` without changing the value. - `task.tapErr` - Runs a function on the error of a `Task` without changing the error. - `task.run` - Runs the `Task` and returns a `Promise` that resolves to a `Result`. - `task.match` - Runs an object of cases against the `Result` value of a `Task`. - `task.schedule` - Schedules the `Task` by the provided options. This always returns an asynchronous `Task`. ```ts const someValue: Result<unknown, number> = await Task.from( async () => 42 ).run(); const someOtherValue: Result<unknown, number> = await Task.from( async () => 84 ).run(); // Map a value const doubled: SyncTask<unknown, number> = Task.from(42).map((x) => x * 2); // you can also call .run() to get the Promise as well console.log(doubled.run()); // Result.Ok(84) const flatMapped: SyncTask<unknown, number> = Task.from(42).flatMap((x) => Task.from(x * 2) ); console.log(flatMapped.run()); // 84 // if the task is syncronous - you can use unwrap like you would with a Result const result: SyncTask<unknown, number> = Task.from(42); console.log(result); // Result.Ok(42) console.log(result.unwrap()); // 42 ``` ### Scheduling The `Task` instance also allows for managing the scheduling of the computation. The result of a scheduled task is always asynchronous. It provides the following options: - `timeout`: The number of milliseconds to wait before timing out the task. - `delay`: The number of milliseconds to delay the execution of the task. - `retry`: The number of times to retry the task if it fails. - `repeat`: The number of times to repeat the task if it succeeds. Each option (except `timeout`) can be a number, boolean, or a function that returns a number or boolean or even a promise that resolves to a number or boolean. ```ts import { Task, TaskTimeoutError, TaskSchedulingError } from "ftld"; const task: SyncTask<Error, number> = Task.from(() => { if (Math.random() > 0.5) { return 42; } else { throw new Error("oops"); } }); const delayed: AsyncTask<Error, number> = task.schedule({ delay: 1000, }); const timedOut: AsyncTask<Error | TaskTimeoutError, number> = task.schedule({ timeout: 1000, }); const retried: AsyncTask<Error, number> = task.schedule({ retry: 3, }); const customRetry: AsyncTask<Error | TaskSchedulingError, number> = task.schedule({ retry: (attempt, err) => { if (err instanceof Error) { return 3; } return 0; }, }); const exponentialBackoff: AsyncTask<Error | TaskSchedulingError, number> = task.schedule({ retry: 5, delay: (retryAttempt) => 2 ** retryAttempt * 1000, }); const repeated: AsyncTask<Error, number> = task.schedule({ repeat: 3, }); const customRepeat: AsyncTask<Error | TaskSchedulingError, number> = task.schedule({ repeat: (attempt, value) => { if (value === 42) { return 3; } return false; }, }); // both repeat/retry can take a promise as well const repeatUntil: AsyncTask<Error | TaskSchedulingError, number> = task.schedule({ retry: async (attempt, err) => { retrun await shouldRetry(); }, repeat: async (attempt, value) => { return await jobIsDone(); }, }); ``` ### Collection Methods The `Task` type provides several methods for working with arrays or records of `Task` values: - `traverse` - `traversePar` - `any` - `sequential` - `parallel` - `race` - `coalesce` - `coalescePar` - `settle` - `settlePar` #### Parallel `parallel` allows you to run multiple tasks in parallel and combine the results into a single `Task` containing an array of the unwrapped values, if all the tasks were successful. If any of the tasks fail, the result will be a `Err`. This is always asynchronous. Here's an example using parallel: ```ts const tasks = [ Task.sleep(1000).map(() => 1), Task.sleep(1000).map(() => 2), Task.sleep(1000).map(() => 3), Task.sleep(1000).map(() => 4), Task.sleep(1000).map(() => 5), ]; const parallel: AsyncTask<unknown, number[]> = Task.parallel(tasks); console.log(await parallel.run()); // Result.Ok([1, 2, 3, 4, 5]) ``` in this example, we use the `parallel` function to run all tasks in parallel and combine the results into a single `Task`. Since all tasks are successful, the result is `Ok`. #### Sequential `sequential` allows you to run multiple tasks sequentially and combine the results into a single `Task` containing an array of the unwrapped values, if all the tasks were successful. If any of the tasks fail, the result will be a `Err`. This is synchronous if all tasks are synchronous. Here's an example using sequential: ```ts const syncTasks = [ Task.from(() => 1), Task.from(() => 2), Task.from(() => 3), Task.from(() => 4), Task.from(() => 5), ]; const asyncTasks = [ Task.sleep(1000).map(() => 1), Task.sleep(1000).map(() => 2), Task.sleep(1000).map(() => 3), Task.sleep(1000).map(() => 4), Task.sleep(1000).map(() => 5), ]; const sync: SyncTask<unknown, number[]> = Task.sequential(syncTasks); const async: AsyncTask<unknown, number[]> = Task.sequential(asyncTasks); console.log(sync.run()); // Result.Ok([1, 2, 3, 4, 5]) console.log(await async.run()); // Result.Ok([1, 2, 3, 4, 5]) ``` #### Race `race` allows you to run multiple tasks in parallel and combine the results into a single `Task` containing the unwrapped value of the first settled task. This is always asynchronous. ```ts const tasks = [ Task.sleep(1000).map(() => 1), Task.sleep(500).map(() => 2), Task.sleep(2000).map(() => 3), Task.sleep(10).flatMap(() => Result.Err(new Error("oops"))), ]; const res: AsycTask<Error, number> = Task.race(tasks); console.log(await res.run()); // Result.Err(Error('oops!')) ``` #### Traverse `traverse` allows you convert items in a collection into a collection of tasks sequentially and combine the results into a single `Task` containing an array of the unwrapped values, if all the tasks were successful. If any of the tasks fail, the result will be a `Err`. This is synchronous if all tasks are synchronous. ```ts const makeAsyncTask = (x: number) => Task.sleep(x * 2).map(() => x * 2); const makeSyncTask = (x: number) => Task.from(() => x * 2); const async: AsyncTask<unknown, number[]> = Task.traverse( [1, 2, 3, 4, 5], makeAsyncTask ); const sync: SyncTask<unknown, number[]> = Task.traverse( [1, 2, 3, 4, 5], makeSyncTask ); console.log(await async.run()); // Result.Ok([2, 4, 6, 8, 10]) console.log(sync.run()); // Result.Ok([2, 4, 6, 8, 10]) ``` #### TraversePar The parallel version of `traverse`. This is always asynchronous. ```ts const traversePar: AsyncTask<unknown, number[]> = Task.traversePar( [1, 2, 3, 4, 5], (x) => Task.sleep(x * 2).map(() => x * 2) ); console.log(await traversePar.run()); // Result.Ok([2, 4, 6, 8, 10]) ``` #### Any `any` allows you to take a collection of tasks and find the first successful task. If all tasks fail, the result will be a `Err`. This is synchronous if all tasks are synchronous. ```ts const syncTasks = [ Task.from(() => Result.Err(new Error("oops"))), Task.from(() => Result.Err(new Error("oops"))), Task.from(() => 3), Task.from(() => 4), Task.from(() => 5), ]; const asyncTasks = [ Task.sleep(1000).flatMap(() => Result.Err(new Error("oops"))), Task.sleep(1000).flatMap(() => Result.Err(new Error("oops"))), Task.sleep(1000).map(() => 3), Task.sleep(1000).map(() => 4), Task.sleep(1000).map(() => 5), ]; const asyncAny: AsyncTask<Error, number> = Task.any(asyncTasks); const syncAny: SyncTask<Error, number> = Task.any(syncTasks); console.log(await asyncAny.run()); // Result.Ok(3) console.log(sync.run()); // Result.Ok(3) ``` #### Coalesce `coalesce` allows you to take a collection of tasks and aggregate the results into a single Task. If any tasks fail, the result will be a `Err`, with a collection of all the errors. This is synchronous if all tasks are synchronous. ```ts const syncTasks = [ Task.from(() => Result.Err(new SomeError())), Task.from(() => Result.Err(new OtherError())), Task.from(() => 3), Task.from(() => 4), Task.from(() => 5), ]; const asyncTasks = [ Task.sleep(1000).flatMap(() => Result.Err(new SomeError())), Task.sleep(1000).flatMap(() => Result.Err(new OtherError())), Task.sleep(1000).map(() => 3), Task.sleep(1000).map(() => 4), Task.sleep(1000).map(() => 5), ]; const asyncCoalesce: AsyncTask<(SomeError | OtherError)[], number[]> = Task.coalesce(asyncTasks); const syncCoalesce: SyncTask<(SomeError | OtherError)[], number[]> = Task.coalesce(syncTasks); console.log(await coalesce.run()); // Result.Err([SomeError, OtherError]) console.log(sync.run()); // Result.Err([SomeError, OtherError]) ``` #### CoalescePar The parallel version of `coalesce`. This is always asynchronous. ```ts const tasks = [ Task.sleep(1000).flatMap(() => Result.Err(new SomeError())), Task.sleep(1000).flatMap(() => Result.Err(new OtherError())), Task.sleep(1000).map(() => 3), Task.sleep(1000).map(() => 4), Task.sleep(1000).map(() => 5), ]; const coalescePar: AsyncTask<(SomeError | OtherError)[], number[]> = Task.coalescePar(tasks); console.log(await coalescePar.run()); // Result.Err([SomeError, OtherError]) ``` #### Settle `settle` allows you to take a collection of tasks and aggregate the results into a `SettledTask`, similar to the `Result` type. This is synchronous if all tasks are synchronous. ```ts import { Task, SettledResult } from "ftld"; const syncTasks = [ Task.from(() => Result.Err(new SomeError())), Task.from(() => Result.Err(new OtherError())), Task.from(() => 3), Task.from(() => 4), Task.from(() => 5), ]; const asyncTasks = [ Task.sleep(1000).flatMap(() => Result.Err(new SomeError())), Task.sleep(1000).flatMap(() => Result.Err(new OtherError())), Task.sleep(1000).map(() => 3), Task.sleep(1000).map(() => 4), Task.sleep(1000).map(() => 5), ]; const asyncSettled: SettledResult<SomeError | OtherError | Error, number>[] = await Task.settle(asyncTasks); const syncSettled: SettledResult<SomeError | OtherError | Error, number>[] = Task.settle(syncTasks); ``` #### SettlePar The parallel version of `settle`. This is always asynchronous. ```ts import { Task, SettledResult } from "ftld"; const tasks = [ Task.sleep(1000).flatMap(() => Result.Err(new SomeError())), Task.sleep(1000).flatMap(() => Result.Err(new OtherError())), Task.sleep(1000).map(() => 3), Task.sleep(1000).map(() => 4), Task.sleep(1000).map(() => 5), ]; const settle: SettledResult<SomeError | OtherError | Error, number>[] = await Task.settlePar(tasks); ``` ## Do `Do` is a utility that allows you to unwrap monadic values in a synchronous manner. Provides the same benefits as async/await but for all types in ftld, albeit with a more cumbersome syntax. It handles `Task`, `Result`, `Option`, and even `Promise` types. It always returns a `Task`, which will be synchronous if all the computations are synchronous, or asynchronous if any of the computations are asynchronous. ```ts import { Do, Task, Result, UnwrapNoneError, unknown } from "ftld"; // without Do you get nesting hell function doSomething(): SyncTask<unknown, unknown> { return Task.from(() => { //... }).flatMap(() => { //... return Task.from().flatMap(() => { //... return Task.flatMap(() => { //... return Task.from().flatMap(() => { //... }); }); }); }); } // if there are any async computations, it will return an Async Task function doSomething(): AsyncTask< SomeError | OtherError | UnwrapNoneError, // <-- notice how the Option type has an error type number > { return Do(function* () { const a: number = yield* Result.from( () => 1, () => new SomeError() ); // async! const b: number = yield* Task.from( async () => 2, () => new OtherError() ); const c: number = yield* Option.from(3 as number | null); return a + b + c; }); } // if there are no async computations, it will return a sync Task function doSomething(): SyncTask< SomeError | OtherError | UnwrapNoneError, number > { return Do(function* ($) { const a: number = yield* Result.from( () => 1, () => new SomeError() ); const b: number = yield* Result.from( () => 2, () => new OtherError() ); const c: number = yield* Option.from(3 as number | null); return a + b + c; }); } ``` ## Recipes Here's a list of useful utilities, but don't justify an increase in bundle size. ### Wrapping Zod It's common to want to wrap a validation library like Zod in a Result type. Here's an example of how to do that: ```ts import { Result } from "ftld"; import { z } from "zod"; export const wrapZod = <T extends z.Schema>(schema: T) => <E = z.ZodIssue[]>( value: unknown, onErr: (issues: z.ZodIssue[]) => E = (issues) => issues as E ): Result<E, z.infer<T>> => { const res = schema.safeParse(value); if (res.success) { return Result.Ok(res.data); } return Result.Err(onErr(res.error.errors)); }; const emailSchema = wrapZod(z.string().email()); const email: Result<z.ZodIssue[], string> = emailSchema("test"); const emailWithCustomError: Result<CustomError, string> = emailSchema( "test", () => new CustomError() ); ``` ### Taskify You might have an API (like node:fs) that uses promises, but you want to use Tasks instead. You can create a `taskify` function to convert a promise-based API into a Task-based API. ```ts import { Task } from "ftld"; import * as fs from "fs/promises"; type Taskify = { // this is so we preserve the types of the original api if it includes overloads <A extends Record<string, unknown>>(obj: A): { [K in keyof A]: A[K] extends { (...args: infer P1): infer R1; (...args: infer P2): infer R2; (...args: infer P3): infer R3; } ? { (...args: P1): R1 extends Promise<infer RP1> ? AsyncTask<unknown, RP1> : SyncTask<unknown, R1>; (...args: P2): R2 extends Promise<infer RP2> ? AsyncTask<unknown, RP2> : SyncTask<unknown, R2>; (...args: P3): R3 extends Promise<infer RP3> ? AsyncTask<unknown, RP3> : SyncTask<unknown, R3>; } : A[K] extends { (...args: infer P1): infer R1; (...args: infer P2): infer R2; } ? { (...args: P1): R1 extends Promise<infer RP1> ? AsyncTask<unknown, RP1> : SyncTask<unknown, R1>; (...args: P2): R2 extends Promise<infer RP2> ? AsyncTask<unknown, RP2> : SyncTask<unknown, R2>; } : A[K] extends { (...args: infer P1): infer R1 } ? { (...args: P1): R1 extends Promise<infer RP1> ? AsyncTask<unknown, RP1> : SyncTask<unknown, R1>; } : A[K]; } & {}; < A extends { (...args: any[]): any; (...args: any[]): any; (...args: any[]): any; } >( fn: A ): A extends { (...args: infer P1): infer R1; (...args: infer P2): infer R2; (...args: infer P3): infer R3; } ? { (...args: P1): R1 extends Promise<infer RP1> ? AsyncTask<unknown, RP1> : SyncTask<unknown, R1>; (...args: P2): R2 extends Promise<infer RP2> ? AsyncTask<unknown, RP2> : SyncTask<unknown, R2>; (...args: P3): R3 extends Promise<infer RP3> ? AsyncTask<unknown, RP3> : SyncTask<unknown, R3>; } : never; < A extends { (...args: any[]): any; (...args: any[]): any; } >( fn: A ): A extends { (...args: infer P1): infer R1; (...args: infer P2): infer R2; } ? { (...args: P1): R1 extends Promise<infer RP1> ? AsyncTask<unknown, RP1> : SyncTask<unknown, R1>; (...args: P2): R2 extends Promise<infer RP2> ? AsyncTask<unknown, RP2> : SyncTask<unknown, R2>; } : never; < A extends { (...args: any[]): any; } >( fn: A ): A extends { (...args: infer P1): infer R1; } ? { (...args: P1): R1 extends Promise<infer RP1> ? AsyncTask<unknown, RP1> : SyncTask<unknown, R1>; } : never; }; const taskify: Taskify = (fnOrRecord: any): any => { if (fnOrRecord instanceof Function) { return (...args: any[]) => { return Task.from(() => fnOrRecord(...args)); }; } return Object.fromEntries( Object.entries(fnOrRecord).map(([key, value]) => { if (value instanceof Function) { return [ key, (...args: any[]) => { return Task.from(() => value(...args)); }, ]; } return [key, value]; }) ); }; // usage const readFile = taskify(fs.readFile); // overloads preserved! readFile("path", "utf8") .map((content) => { return content.toUpperCase(); }) .run(); const taskFs = taskify(fs); // overloads preserved! taskFs .readFile("path", "utf8") .map((string) => string.toUpperCase()) .run(); ``` ### Brand The `Brand` type is a wrapper around a value that allows you to create a new type from an existing type. It's useful for creating new types that are more specific than the original type, such as `Email` or `Password`. ```ts // credit to EffectTs/Data/Brand import { Result } from "./result"; // @ts-expect-error export const Brand: { /** * Create a validated brand constructor that checks the value using the provided validation function. */ <E, TBrand>( validate: (value: Unbrand<TBrand>) => boolean, onErr: (value: Unbrand<TBrand>) => E ): ValidatedBrandConstructor<E, TBrand>; /** * Create a nominal brand constructor. */ <TBrand>(): NominalBrandConstructor<TBrand>; /** * Compose multiple brand constructors into a single brand constructor. */ compose< TBrands extends readonly [ BrandConstructor<any, any>, ...BrandConstructor<any, any>[] ] >( ...brands: EnsureCommonBase<TBrands> ): ComposedBrandConstructor< { [B in keyof TBrands]: PickErrorFromBrandConstructor<TBrands[B]>; }[number], UnionToIntersection< { [B in keyof TBrands]: PickBrandFromConstructor<TBrands[B]> }[number] > extends infer X extends Brand<any> ? X : Brand<any> >; } = (validate, onErr) => (value) => { if (validate) { return Result.fromPredicate(value, validate, onErr); } return value; }; Brand.compose = (...brands) => (value) => { const results = brands.map((brand) => brand(value)); return Result.validate(results as any) as any; }; type EnsureCommonBase< TBrands extends readonly [ BrandConstructor<any, any>, ...BrandConstructor<any, any>[] ] > = { [B in keyof TBrands]: Unbrand< PickBrandFromConstructor<TBrands[0]> > extends Unbrand<PickBrandFromConstructor<TBrands[B]>> ? Unbrand<PickBrandFromConstructor<TBrands[B]>> extends Unbrand< PickBrandFromConstructor<TBrands[0]> > ? TBrands[B] : TBrands[B] : "ERROR: All brands should have the same base type"; }; declare const BrandSymbol: unique symbol; type BrandId = typeof BrandSymbol; type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends ( x: infer R ) => any ? R : never; type Brands<P> = P extends Brander<any> ? UnionToIntersection< { [k in keyof P[BrandId]]: k extends string | symbol ? Brander<k> : never; }[keyof P[BrandId]] > : never; export type Unbrand<P> = P extends infer Q & Brands<P> ? Q : P; export type Brand<A, K extends string | symbol = typeof BrandSymbol> = A & Brander<K>; export namespace Brand { export type Infer<A> = A extends Brand<infer B> ? B : A extends BrandConstructor<unknown, infer B> ? B : never; } interface Brander<in out K extends string | symbol> { readonly [BrandSymbol]: { readonly [k in K]: K; }; } type NominalBrandConstructor<A> = (value: Unbrand<A>) => A; type ValidatedBrandConstructor<E, A> = (value: Unbrand<A>) => Result<E, A>; type ComposedBrandConstructor<E, A> = (value: Unbrand<A>) => Result<E[], A>; type BrandConstructor<E, A> = | NominalBrandConstructor<A> | ValidatedBrandConstructor<E, A> | ComposedBrandConstructor<E, A>; type PickErrorFromBrandConstructor<BC> = BC extends BrandConstructor< infer E, infer _A > ? E : never; type PickBrandFromConstructor<BC> = BC extends BrandConstructor< infer _E, infer A > ? A : never; ``` ```ts import { Brand } from "./brand"; type Email = Brand<string, "Email">; const Email = Brand<Email>(); const email: Email = Email("email@provider.com"); ``` You can go further by refining the type to only allow valid email addresses: ```ts type Email = Brand<string, "Email">; const Email = Brand<Error, Email>( (value) => { return value.includes("@"); }, (value) => { return new Error(`Invalid email address: ${value}`); } ); const email: Result<Error, Email> = Email("test@provider.com"); ``` It is also composable, meaning you can create brands as the result of other brands: ```ts type Int = Brand<number, "Int">; type PositiveNumber = Brand<number, "PositiveNumber">; class InvalidIntegerError extends Error { constructor(value: number) { super(`Invalid integer: ${value}`); } } const Int = Brand<InvalidIntegerError, Int>( (value) => { return Number.isInteger(value); }, (value) => { return new InvalidIntegerError(value); } ); class InvalidPositiveNumberError extends Error { constructor(value: number) { super(`Invalid positive number: ${value}`); } } const PositiveNumber = Brand<InvalidPositiveNumberError, PositiveNumber>( (value) => { return value > 0; }, (value) => { return new InvalidPositiveNumberError(value); } ); type PositiveInt = Int & PositiveNumber; const PositiveInt = Brand.compose(Int, PositiveNumber); const positiveInt: Result< (InvalidIntegerError | InvalidPositiveNumberError)[], PositiveInt > = PositiveInt(42); ```
A pragmatic entry into a functional fantasy land.
functional,functional-programming,javascript,monad,typescript
2023-04-10T00:06:15Z
2024-05-08T22:47:24Z
2024-05-08T22:48:04Z
4
87
500
0
4
54
null
MIT
TypeScript
Armanidrisi/frontend-projects
main
# Frontend Projects 🌐 [![GitHub contributors](https://img.shields.io/github/contributors/ArmanIdrisi/frontend-projects)](https://github.com/ArmanIdrisi/frontend-projects/graphs/contributors) [![GitHub last commit](https://img.shields.io/github/last-commit/ArmanIdrisi/frontend-projects)](https://github.com/ArmanIdrisi/frontend-projects/commits/main) This repository contains a collection of frontend projects.Each project is built using HTML, CSS, and JavaScript. ## Projects 📂 <table> <tr> <th>#</th> <th>Project Name</th> <th>Link</th> </tr> <tr> <td>01</td> <td>Landing Page</td> <td><a href="./project-1_landing-page">Click Here</a></td> </tr> <tr> <td>02</td> <td>Calculator</td> <td><a href="./project-2_calculator">Click Here</a></td> </tr> <tr> <td>03</td> <td>Wavy Login Form</td> <td><a href="./project-3_wavy_login_form">Click Here</a></td> </tr> <tr> <td>04</td> <td>Random Quote Generator</td> <td><a href="./project-4_random_quote_generator">Click Here</a></td> </tr> <tr> <td>05</td> <td>Random Background Changer</td> <td><a href="./project-5_random_color_changer">Click Here</a></td> </tr> <tr> <td>06</td> <td>Qr Code Generator</td> <td><a href="./project-6_qr_code_generator">Click Here</a></td> </tr> <tr> <td>07</td> <td>Stopwatch Timer</td> <td><a href="./project-7_stopwatch_timer">Click Here</a></td> </tr> <tr> <td>08</td> <td>Password Generator</td> <td><a href="./project-8_password_generator">Click Here</a></td> </tr> <tr> <td>09</td> <td>Responsive Navbar</td> <td><a href="./project-9_responsive_navbar">Click Here</a></td> </tr> <tr> <td>10</td> <td>404 Error Page</td> <td><a href="./project-10_404_error_page">Click Here</a></td> </tr> <tr> <td>11</td> <td>Analog Clock</td> <td><a href="./project-11_analog_clock">Click Here</a></td> </tr> <tr> <td>12</td> <td>Contact Form</td> <td><a href="./project-12_contact_form">Click Here</a></td> </tr> <tr> <td>13</td> <td>Profile Card</td> <td><a href="./project-13_profile_card">Click Here</a></td> </tr> <tr> <td>14</td> <td>Music Preloader</td> <td><a href="./project-14_music_loader">Click Here</a></td> </tr> <tr> <td>15</td> <td>Currency Converter</td> <td><a href="./project-15_currrency_convertor">Click Here</a></td> </tr> <tr> <td>16</td> <td>Pricing card</td> <td><a href="./project-16_pricing_component">Click Here</a></td> </tr> <tr> <td>17</td> <td>Background Remover App</td> <td><a href="./project-17_remove_Signature_bg">Click Here</a></td> </tr> <tr> <td>18</td> <td>Toggle Dark & Light Mode</td> <td><a href="./project-18_toggle_dark_light_mode">Click Here</a></td> </tr> <tr> <td>19</td> <td>Weather App</td> <td><a href="./project-19_weather_app">Click Here</a></td> </tr> <tr> <td>20</td> <td>Bubble Game</td> <td><a href="./project-20_bubble_game">Click Here</a></td> </tr> </table> ## Installation 🚀 To run any of the projects locally, simply clone this repository using the following command: ```bash git clone https://github.com/ArmanIdrisi/frontend-projects.git ``` ## Usage 💻 Each project is contained in its own directory, and can be opened and run directly in a web browser. ## Contributing 🤝 Contributions to this repository are welcome! If you have a project you'd like to add, simply create a new branch, add your project, and create a pull request. ## License 📝 This repository is licensed under the MIT license. See [LICENSE](/LICENSE) for more information.
This repository contains a collection of frontend. Each project is built using HTML, CSS, and JavaScript.
css,fornt-end,front-end,frontend,frontend-project,frontend-projects,html,html-css-javascript,html-css-javascript-project,javascript
2023-04-11T13:37:12Z
2024-05-11T11:51:46Z
null
6
8
75
2
17
47
null
MIT
CSS
fingerthief/minimal-chat
main
# [**MinimalChat: A Simple and Customizable LLM Chat App (public site link)**](https://minimalchat.app) ![Version](https://img.shields.io/badge/version-6.1.3-blue) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/fingerthief/minimal-chat/firebase-hosting-merge.yml) ![License](https://img.shields.io/badge/license-MIT-green) ![Website](https://img.shields.io/website?url=https%3A%2F%2Fminimalchat.app) ![GitHub repo size](https://img.shields.io/github/repo-size/fingerthief/minimal-chat) ![Docker Image Size](https://img.shields.io/docker/image-size/tannermiddleton/minimal-chat) ![GitHub top language](https://img.shields.io/github/languages/top/fingerthief/minimal-chat) ![GitHub Repo stars](https://img.shields.io/github/stars/fingerthief/minimal-chat) ## **What is MinimalChat?** MinimalChat is a minimal and lightweight open-source chat application with full mobile PWA support that allows you to interact with various language models, including GPT-4, Claude Opus, various Local/Custom Model Endpoints. A focus on being simple to setup and use while being fully featured and very responsive is always the top priority. ![cropped_mockup](https://github.com/fingerthief/minimal-chat/assets/2380471/1e80c15a-c805-43d3-80e3-46eacbc29913) ## Self Host with Docker - `docker pull tannermiddleton/minimal-chat:latest` - Enter the port number to run on and that is it! --- ### Application Demo [Visit the Application Demos Wiki Page](https://github.com/fingerthief/minimal-chat/wiki/Application-Demos) for more demos. https://github.com/fingerthief/minimal-chat/assets/2380471/51fde475-1b3f-4904-8c5a-48188e95ea31 ## **Experience the Power of Web Local LLM Models** A huge thank you to the innovative folks at [Web LLM](https://github.com/mlc-ai/web-llm) for making it possible to bring the magic of large language models (LLMs) directly to your browser! With this integration, you can now seamlessly download and cache popular LLM models like `llama-3-8b-instruct` locally and run them entirely within your browser, without any hassle or reliance on external servers. This means you can enjoy greater control and unparalleled flexibility in how you choose to interact with models. [More notes in the Wiki](https://github.com/fingerthief/minimal-chat/wiki/Host-and-Run-Entire-LLM-Models-Directly-in-the-Browser-Locally) ### Fast and Lightweight ![minimalchat-memory](https://github.com/fingerthief/minimal-chat/assets/2380471/432d77dc-78dd-469f-9844-71c770b59f06) ## **Getting Started** ### [Check Out the Wiki!](https://github.com/fingerthief/minimal-chat/wiki) for more detailed information ### Installation To run the web app locally, you'll need NodeJS installed. Then, navigate to the project directory and run the following commands: 1. Install needed packages: `npm install` 2. Build the app `npm run build` 3. Start local server: `npm run preview` (terminal will output the IP and port the server is running on). Optionally you can run `npm run dev` to run the application in development mode. 4. That's it! The app is now running locally. ### Configuration [Visit the Wiki for a detailed explanation of available configuration options.](https://github.com/fingerthief/minimal-chat/wiki/Configuration-Options-Explained) ## **Features** - Minimal layout - Supports multiple language models, including: - GPT Model - Claude 3 Models - Open AI Response Formatted APIs (custom/local) models - Local Browser Loaded Models - Switch models mid-conversations and maintain context - Swipe Gestures for quick settings and conversations access - Edit, Regenerate or Delete past message responses - Markdown Support - Code Syntax Highlighting - Basic DALL-E 3 Integration (Prefix GPT model messages with **image::** and then your description to generate images) - Conversation Importing/Exporting - Responsive layout for mobile use - Progressive Web Application Support ## **FAQs** ### Is MinimalChat free to use? Yes, MinimalChat is open-source and free to use. However, you'll need to provide your own API keys for the language models you want to use if they require one. Local models etc..would not require an API key and could be used freely. ### Can I use MinimalChat without an internet connection? Yes! If you use LM Studio to locally host a LLM Model, you can connect and chat with any model that returns a response in the OpenAI Response format standard. You can even load a full model into your browser directly and run interact with it all within MinimalChat. After the model is initially downloaded and cached the first time it can be used without an internet connection. ### Are my conversations secure and private? Yes, all conversations are stored locally on your device and are not sent to any servers other than the necessary API calls to the language models. ### Can I use MinimalChat on my mobile device? Yes, MinimalChat is designed to be fully mobile compatible. You can even install it as a PWA for a native app-like experience. ## **Mobile Swipe Gestures** - Swipe to the **Left** on the bottom input box and your **Conversations** dialog will appear. - Swipe to the **Right** on the bottom input box and your **Settings** dialog will appear. ## **Integration with Open AI Response Formatted APIs** MinimalChat supports integration with any API endpoint that returns responses formatted according to OpenAI's specifications. This feature allows users to connect with a variety of language models hosted externally, providing flexibility and extending the capabilities of the app. Get more information in the [Open AI API Format Wiki](https://github.com/fingerthief/minimal-chat/wiki/Open-AI-Formatted-Response-APIs) ## **Contributing** We welcome contributions from the community! If you'd like to contribute to MinimalChat, please follow these guidelines: - Submit bug reports and feature requests using the [issue tracker](https://github.com/fingerthief/minimal-chat/issues). - For code contributions, fork the repository, make your changes, and submit a pull request. - Ensure that your code follows the project's coding style and conventions. - Provide clear and concise commit messages and pull request descriptions. ## **Troubleshooting** If you encounter any issues while using MinimalChat, try the following: - Make sure you have a stable internet connection. - Verify that your API keys are correct and have the necessary permissions. - As a **LAST STEP** Clear your browser cache and reload the app. - This also clears all of your saved configured settings. You should never really need to do this, but weirder things have happened. - If the issue persists, please report it using the [issue tracker](https://github.com/fingerthief/minimal-chat/issues). ## **License** MinimalChat is licensed under the MIT License. See [LICENSE](LICENSE) for more information. ## **Contact** If you have any questions, feedback, or suggestions, feel free to reach out to us: - [GitHub Issues](https://github.com/fingerthief/minimal-chat/issues) --- **Thank you for using MinimalChat!** _Buy me a coffee for some reason: ☕️ [![Buy Me a Coffee](https://cdn.buymeacoffee.com/buttons/v2/default-yellow-btn.png)](https://buymeacoffee.com/fingerthief) ☕️_
MinimalChat is a lightweight, open-source chat application that allows you to interact with various large language models.
chatgpt,webapplication,artificial-intelligence,claude-3,gpt,gpt-vision,vue,vue3,vuejs,llama
2023-04-15T05:12:38Z
2024-05-19T19:09:21Z
2024-05-19T18:10:33Z
3
53
643
1
5
46
null
MIT
Vue
semicognitive/sveltekit-chat
main
<img width="1676" alt="Xnapper-2023-04-16-02 58 44" src="https://user-images.githubusercontent.com/20548516/232283556-67a5e493-5685-4335-98bd-23d26b262667.png"> # sveltekit-chat Built for ***Intelligent Svelte***. An example SvelteKit project. ## This example - Includes a frontend written in [TailwindCSS](https://tailwindcss.com) - Has a `api/chat` endpoint which takes chats, and returns a response from the OpenAI Api! Written in Python with [LangChain](https://langchain.readthedocs.io/en/latest/)
An example SvelteKit project, with a server endpoint written with LangChain.
ai,chatgpt,javascript,openai,svelte,sveltekit,typescript
2023-04-16T07:34:39Z
2023-04-17T03:39:45Z
null
1
0
9
1
8
46
null
null
JavaScript
inkasadev/inks2d
main
![inks2d](.readme/header.png) # inks2d <!-- omit in toc --> [![npm](https://img.shields.io/npm/v/inks2d?style=flat-square)](https://www.npmjs.com/package/inks2d) ![minzip](https://img.shields.io/bundlephobia/minzip/inks2d?style=flat-square) [![npm-dt](https://img.shields.io/npm/dt/inks2d?style=flat-square)](#installation) [![stars](https://img.shields.io/github/stars/inkasadev/inks2d?style=flat-square)](https://github.com/inkasadev/inks2d) [![code-quality](https://img.shields.io/codefactor/grade/github/inkasadev/inks2d/main?style=flat-square)](https://www.codefactor.io/repository/github/inkasadev/inks2d) [![license](https://img.shields.io/github/license/inkasadev/inks2d?style=flat-square)](https://github.com/inkasadev/inks2d/blob/main/LICENSE.md) inks2d is a free no-dependency Typescript game engine designed for developing 2D games. It provides you with a fast, friendly and clean framework to prototype and develop your games on. This means that most of the hard work is already done, letting you concentrate on the design and testing of your game. ## Table of contents <!-- omit in toc --> - [Features](#features) - [Packages](#packages) - [Installation](#installation) - [Basic Example](#basic-example) - [Support and Resources](#support-and-resources) - [Contributing](#contributing) - [Showcase](#showcase) - [Web](#web) - [Android](#android) - [Authors](#authors) - [License](#license) --- ## Features - API inspired in part by Flash's display list, and should be easy to pick up for JS/TS developers. - All the most important sprites you need: rectangles, circles, triangles, lines, text and image sprites. You can make any of these sprites with only one line of code. You can also create your own custom sprite types. - Sound effect support with volume, panning, and fading, complete with one-line sound playback. - Quick and efficient particle effects and emitters for beautiful particle systems without slowing things down. - Simple keyboard, mouse and touch input state checking makes setting keys and events incredibly easy, yet powerful. - Universal asset loader to pre-load images, fonts, sounds and JSON data files. All popular file formats are supported. You can load new assets into the game at any time. - A lot of helper functions for animations, tilemaps, text, backdrops, and more. - Tree shaking support. --- ## Packages | Package | Version (click for changelogs) | | --------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------ | | [inks2d](packages/lib) | [![vite version](https://img.shields.io/npm/v/inks2d.svg?label=%20&style=flat-square)](packages/lib/CHANGELOG.md) | | [create-inks2d](packages/create-inks2d) | [![create-inks2d version](https://img.shields.io/npm/v/create-inks2d.svg?label=%20&style=flat-square)](packages/create-inks2d/CHANGELOG.md) | --- ## Installation With NPM: ```bash $ npm create inks2d@latest ``` With Yarn: ```bash $ yarn create inks2d ``` With PNPM: ```bash $ pnpm create inks2d ``` Then follow the prompts! You can also directly specify the project name and the platform you want to use via additional command line options. For example, to scaffold a inks2d + Web project, run: ```bash # npm 6.x npm create inks2d@latest my-inks2d-game --platform web # npm 7+, extra double-dash is needed: npm create inks2d@latest my-inks2d-game -- --platform web # yarn yarn create inks2d my-inks2d-game --platform web # pnpm pnpm create inks2d my-inks2d-game --platform web ``` See [create-inks2d](https://github.com/inkasadev/inks2d/tree/main/packages/create-inks2d) for more details on each supported platform --- ## Basic Example ```js import { Engine, Scene } from "inks2d"; import { Rectangle } from "inks2d/geom"; const g = new Engine(640, 480); class Main extends Scene { constructor() { super(); } async start(e: Engine) { super.start(e); const rect = new Rectangle(50, 50, "blue"); rect.position.x = g.stage.width / 2; rect.position.y = g.stage.height / 2; g.stage.addChild(rect); } } g.scene = new Main(); g.start(); ``` --- ## Support and Resources - Find examples in the [examples folder](https://github.com/inkasadev/inks2d/tree/main/packages/examples). - Read the [documentation](https://inkasadev.github.io/inks2d/). - Discuss, share projects, ask technical questions and interact with other users on [Discussions](https://github.com/inkasadev/inks2d/discussions). - Again, have a look at the included [examples](https://github.com/inkasadev/inks2d/tree/main/packages/examples) and [API documentation](https://inkasadev.github.io/inks2d/) for more in-depth information. It was built by [Phillipe Martins (aka "Inkasa Dev")](https://github.com/inkasadev), and is released for free under the MIT license, which means you can use it for almost any purpose (including commercial projects). We appreciate credit where possible, but it is not a requirement. --- ## Contributing Please read [CONTRIBUTING.md](https://github.com/inkasadev/inks2d/blob/master/.github/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us. --- ## Showcase ### Web | ![Pimi Jumpers](./.readme/showcase/pimi-jumpers.png) | ![Lolly Balls](./.readme/showcase/lolly-balls.png) | | :---------------------------------------------------------: | :------------------------------------------------------: | | [Pimi Jumpers](https://www.ojogos.com.br/jogo/pimi-jumpers) | [Lolly Balls](https://www.jogos123.net/jogo/lolly-balls) | ### Android | ![Noah Crush Mania](./.readme/showcase/noah-crush-mania.png) | ![Shinobi Way](./.readme/showcase/shinobi-way.png) | ![Two Dots](./.readme/showcase/two-dots.png) | ![Get the Blacks](./.readme/showcase/get-the-black-dots.png) | | :------------------------------------------------------------------------------: | :----------------------------------------------------------------------------: | :-------------------------------------------------------------------------: | :---------------------------------------------------------------------------------: | | [Noah Crush Mania](https://play.google.com/store/apps/details?id=me.inkasa.noah) | [Shinobi Way](https://play.google.com/store/apps/details?id=me.inkasa.shinobi) | [Two Dots](https://play.google.com/store/apps/details?id=me.inkasa.twodots) | [Get the Blacks](https://play.google.com/store/apps/details?id=me.inkasa.getblacks) | --- ## Authors | ![Phillipe Martins](https://avatars.githubusercontent.com/u/7750404?v=4&s=150) | | :----------------------------------------------------------------------------: | | [Phillipe Martins](https://github.com/inkasadev/) | See also the list of [contributors](https://github.com/inkasadev/inks2d/contributors) who participated in this project. --- ## License This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
A free no-dependency Typescript game engine designed for developing 2D games
2d,canvas,game,game-development,game-frameworks,gamedev,html5,html5-game-development,javascript,physics
2023-04-19T21:13:35Z
2023-08-23T23:27:49Z
2023-08-23T02:24:42Z
2
26
136
5
2
45
null
MIT
TypeScript
arjuncvinod/Blogging-Website
main
## Blogging-Website ![Repo Views](https://views.whatilearened.today/views/github/arjuncvinod/Blogging-Website.svg?cache=remove) ### Languages Used: #### Front end : ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=flat&logo=html5&logoColor=white) ![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=flat&logo=css3&logoColor=white) #### Backend : ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=flat&logo=node.js&logoColor=white) ![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=flat&logo=express&logoColor=%2361DAFB) #### Database : ![MongoDB](https://img.shields.io/badge/MongoDB-%234ea94b.svg?style=flat&logo=mongodb&logoColor=white) <br /> ### Live Preview : [www.myblog.com](https://blogwebsite-1rl3.onrender.com/) ## Installation ### Clone the Repository ```bash git clone https://github.com/arjuncvinod/Blogging-Website.git cd Blogging-Website ``` ### Install dependencies ```console npm install ``` ### Start ```console node src/App.js ``` ```sh The Website will be available at http://localhost:3000 ``` **Screenshots**: <h3 align="center"> Login section</h3> <img src="SH4.jpg"> <h3 align="center"> Home Page</h3> <img src="SH2.jpg"> <h3 align="center"> Post View</h3> <img src="SH1.jpg"> <h3 align="center"> Profile Section</h3> <img src="SH3.jpg"> <h3 align="center"> Admin Dashboard </h3> ![image](https://github.com/arjuncvinod/Blogging-Website/assets/68469520/4c9f0f3c-3ac7-43e9-9854-d671f237c795) <h3 align="center" > Don't forget to hit the :star: if you like this repo. </h3> <h1 align="center"> Made with ❤️ by <a href="https://arjuncvinod.github.io">Arjun</a> </h1>
A complete blogging platform bulit using Node.js
css3,ejs,expressjs,html5,javascript,mongodb,mongoose,nodejs,hacktoberfest
2023-04-14T14:00:18Z
2024-04-06T17:05:13Z
null
2
16
63
2
10
42
null
MIT
EJS
LivioAlvarenga/API-Rest-Node-SOLID
master
<h1 align="center"> API Rest NodeJs com SOLID </h1> <p align="center"> <a href="#-sobre-o-projeto">Sobre</a> • <a href="#-vitrine-dev">Vitrine Dev</a> • <a href="#-tecnologias">Tecnologias</a> • <a href="#-instalação">Instalações</a> • <a href="#-funcionalidades">Funcionalidades</a> • <a href="#-deploy">Deploy</a> • <a href="#-autor">Autor</a> • <a href="#-licença">Licença</a> </p> &nbsp; <a id="-sobre-o-projeto"></a> ![OpenAPI Swagger](https://github.com/LivioAlvarenga/API-Rest-Node-SOLID/blob/master/files/openAPI-swagger.png?raw=true#vitrinedev) ## 💻 Sobre o projeto 🚀 Neste projeto, será desenvolvido uma aplicação para check-ins em academias, aplicando conceitos do SOLID, Design Patterns, Docker para iniciar o banco de dados, JWT e Refresh Token, RBAC e diversos outros conceitos. O objetivo é fornecer um template completo e bem estruturado para o desenvolvimento de APIs RESTful com Node.js, Docker e Prisma, proporcionando uma base sólida para criar aplicações web escaláveis e de alta qualidade. A primeira parte do projeto inclui a configuração de variáveis de ambiente para bancos de dados MySQL, utilizando o arquivo .env e o Prisma como ORM. As variáveis de ambiente são usadas para armazenar informações confidenciais, como credenciais de banco de dados, e para configurar o projeto de acordo com o ambiente de desenvolvimento ou produção. Na segunda parte, é apresentada a arquitetura do projeto, utilizando a biblioteca Vitest para testes e cobertura de testes. Isso inclui a instalação de várias dependências, a criação de arquivos de configuração e a adição de scripts no package.json para executar testes e outras tarefas relacionadas. A aplicação possui testes unitários de integração e testes e2e e uma cobertura de testes de 100%. Além disso, utilizamos o GitHub Actions para executar os testes unitários de integração e e2e e verificar a cobertura de testes a cada push na branch main. Por fim, são apresentadas algumas funcionalidades adicionais e bibliotecas utilizadas no projeto, como bcryptjs para criptografia de senhas e dayjs para manipulação de datas. Além disso, o projeto inclui uma lista detalhada de requisitos funcionais e não funcionais, bem como regras de negócio que orientam o desenvolvimento das funcionalidades da aplicação. Dessa forma, este projeto oferece um ponto de partida sólido para o desenvolvimento de aplicações web, incluindo configurações e ferramentas para garantir a qualidade do código e a manutenção do projeto ao longo do tempo. &nbsp; <p align="center"> <a href="#license"><img src="https://img.shields.io/github/license/LivioAlvarenga/Template-Api-Rest-Node-Docker-Prisma?color=ff0000"></a> <a href="https://github.com/LivioAlvarenga/Template-Api-Rest-Node-Docker-Prisma/issues"><img src="https://img.shields.io/github/issues/LivioAlvarenga/Template-Api-Rest-Node-Docker-Prisma" alt="issue site Template-Api-Rest-Node-Docker-Prisma" /></a> <a href="https://github.com/LivioAlvarenga/Template-Api-Rest-Node-Docker-Prisma"><img src="https://img.shields.io/github/languages/count/LivioAlvarenga/Template-Api-Rest-Node-Docker-Prisma" alt="total amount of programming languages used in the project" /></a> <a href="https://github.com/LivioAlvarenga/Template-Api-Rest-Node-Docker-Prisma"><img src="https://img.shields.io/github/languages/top/LivioAlvarenga/Template-Api-Rest-Node-Docker-Prisma" alt="most used language in the projects" /></a> <a href="https://github.com/LivioAlvarenga/Template-Api-Rest-Node-Docker-Prisma"><img src="https://img.shields.io/github/repo-size/LivioAlvarenga/Template-Api-Rest-Node-Docker-Prisma" alt="repository size" /></a> <p> <p align="center"> <a href= "https://api-rest-node-solid.onrender.com/docs"><img alt="deploy badge Render" height=40 src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/16529b41db0c4089f62eccbe301f46b3d8f157cf/files/render-badge.svg"></a> <a href= "https://api-rest-node-solid.onrender.com/docs"><img alt="swagger badge" height=40 src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/e8e5c3d2752ae17cbffa11142d8513fe1f405873/files/swagger-badge.svg"></a> <p> &nbsp; --- &nbsp; <a id="-vitrine-dev"></a> ## 📺 Vitrine Dev | :placard: Vitrine.Dev | | | --------------------- | ---------------------------------------------------------------------------------------------------------------- | | :sparkles: Nome | **API Rest NodeJs com SOLID** | | :label: Tecnologias | NodeJs, TypeScript, JavaScript, .ENV, Fastify, PrismaJs, Zod, MySql, Docker, Vitest, GitHub Actions, Swagger, EsLint, Insomnia e JSON Web Token. | | --- &nbsp; <a id="-tecnologias"></a> ## 🛠 Tecnologias As seguintes ferramentas foram usadas na construção do projeto &nbsp; <p align="center"> <!-- <a href= ""><img alt="" src="https://img.shields.io/static/v1?logoWidth=15&logoColor=ECD53F&logo=.ENV&label=Managing Environment Variables&message=.ENV&color=ECD53F"></a> --> <a href= "https://nodejs.org/en/" target="_blank" rel="noopener noreferrer"><img alt="Node.js badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/2467074c4c912dd04b12bcee1076cb5ca7ba9eaf/files/nodejs-badge.svg"></a> <a href= "https://www.typescriptlang.org/" target="_blank" rel="noopener noreferrer"><img alt="TypeScript badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/2467074c4c912dd04b12bcee1076cb5ca7ba9eaf/files/typescript-badge.svg"></a> <a href= "https://www.javascript.com/" target="_blank" rel="noopener noreferrer"><img alt="JavaScript badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/2467074c4c912dd04b12bcee1076cb5ca7ba9eaf/files/javascript-badge.svg"></a> <a href= "https://www.fastify.io/" target="_blank" rel="noopener noreferrer"><img alt="Fastify badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/2467074c4c912dd04b12bcee1076cb5ca7ba9eaf/files/fastify-badge.svg"></a> <a href= "https://www.dotenv.org/" target="_blank" rel="noopener noreferrer"><img alt="Dotenv badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/4eed338fdcd547570ed365f2b344e43c8202e88f/files/dotenv-badge.svg"></a> <a href= "https://www.prisma.io/"><img alt="Prisma badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/ef5ebd0021ccb0a8d244f5636b2b238ab0af09e7/files/prisma-badge.svg"></a> <a href= "https://zod.dev/" target="_blank" rel="noopener noreferrer"><img alt="ZOD badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/7caba2f743ee9b61f0225a22da57466ecb67097c/files/zod-badge.svg"></a> <a href= "https://www.docker.com/"><img alt="Docker badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/d7f6873e652db237a89583607eb70757ebaaa6d1/files/docker-badge.svg"></a> <a href= "https://www.mysql.com/"><img alt="MySQL badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/d7f6873e652db237a89583607eb70757ebaaa6d1/files/mysql-badge.svg"></a> <a href= "https://vitest.dev/"><img alt="Vitest Badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/28993b470420f2c44db532b4e6e662e60a186954/files/vitest-badge.svg"></a> <a href= "https://insomnia.rest/" target="_blank" rel="noopener noreferrer"><img alt="Insomnia badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/2467074c4c912dd04b12bcee1076cb5ca7ba9eaf/files/insomnia-badge.svg"></a> <a href= "https://swagger.io/"><img alt="swagger badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/e8e5c3d2752ae17cbffa11142d8513fe1f405873/files/swagger-badge.svg"></a> <a href= "https://jwt.io/"><img alt="JSON Web Tokens Badge" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/af3b694b2d536d66113468df616d3f165d881eb7/files/jwt-badge.svg"></a> <a href= "https://code.visualstudio.com/download" target="_blank" rel="noopener noreferrer"><img alt="vscode download" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/2467074c4c912dd04b12bcee1076cb5ca7ba9eaf/files/vsCode-badge.svg"></a> <a href= "https://github.com/LivioAlvarenga/API-Rest-Node-SOLID/actions"><img alt="badge github actions" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/7f97047760406ed30c106dcf1114a674914da66b/files/github-actions-badge.svg"></a> <a href= "https://github.com/prettier/prettier" target="_blank" rel="noopener noreferrer"><img alt="code formatter prettier" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/2467074c4c912dd04b12bcee1076cb5ca7ba9eaf/files/prettier-badge.svg"></a> <a href= "https://eslint.org/" target="_blank" rel="noopener noreferrer"><img alt="code standardization eslint" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/59575ed19b13121cd113cfc66a71f18dea210c79/files/eslint-badge.svg"></a> </p> --- &nbsp; <a id="-instalação"></a> ## ⚙️ Instalações &nbsp; ### Criando **projeto NodeJs** ```bash # Create project nodejs with npm and -y to accept all default options npm init -y ``` ```json // Create scripts in package.json "scripts": { "dev": "set NODE_ENV=dev&& tsx watch src/server.ts", // Create script to run server in development mode "build": "tsup src !src/**/*.spec.ts !src/**/test/**/* --out-dir build --minify --publicDir src/docs", // Create script to build server in production mode "start": "set NODE_ENV=production&& node build/server.js", // Create script to run server in production mode }, ``` _Create **`.gitignore`** file_ _Create **`.npmrc`** file with `save-exact=true` to save exact version of dependencies_ &nbsp; ### **.env** architecture ```bash npm install dotenv # Install dotenv to use environment variables in NodeJs ``` _Create **`.env`** file with all environment variables and gitignore this file_ _Create **`.env.example`** file with all environment variables and not gitignore this file_ &nbsp; ### Configurando **ESlint** ```bash npm install -D @rocketseat/eslint-config # Install Rocketseat ESLint config ``` _Create **`.eslintrc.json`** file with all ESLint config_ _Create **`.eslintignore`** file with all ESLint ignore files_ &nbsp; ### **TypeScript** architecture ```bash npm install -D typescript # Install TypeScript npm install -D @types/node # Install @types/node to use types in NodeJs npm install -D tsx # Install tsx to use compiler TypeScript in NodeJs in development mode npm install -D tsup # Install tsup to use compiler TypeScript in NodeJs in production mode npm install zod # Install zod to use types in NodeJs and validate data npx tsc --init # Create tsconfig.json ``` ```json "target": "es2020", // Change TypeScript target to ES2020 in tsconfig.json "baseUrl": "./", // Specify the base directory to resolve non-relative module names. "paths": { "@/*": [ "./src/*" ], } // Specify path aliases to import files in tsconfig.json ``` &nbsp; ### **Fastify** architecture ```bash npm install fastify # Install Fastify npm install @fastify/jwt # Install @fastify/jwt to use JWT in Fastify npm install @fastify/cookie # Install @fastify/cookie to use cookie in Fastify npm install @fastify/swagger # Install @fastify/swagger to use Swagger in Fastify npm install @fastify/swagger-ui # Install @fastify/swagger-ui to use Swagger UI in Fastify ``` _Create **`fastify-jwt.d.ts`** file in @types folder with all types of JWT in Fastify_ ```typescript import '@fastify/jwt' declare module '@fastify/jwt' { export interface FastifyJWT { user: { sub: string } } } ``` _Create **`JWT_SECRET`** in .env and .env.example_ ```.env # Auth token in development mode JWT_SECRET="secret" ``` _Create script **`fastifyJwt`** in app.ts to use JWT in Fastify_ ```typescript app.register(fastifyJwt, { secret: env.JWT_SECRET, }) ``` _Create **`openapi.json`** file to documentation open API 3.0.1, save src/docs_ &nbsp; ### **Docker** architecture >Instalando Docker https://docs.docker.com/get-docker/ ```bash # Command to run postgres image database without docker-compose. This image is from bitnami (https://hub.docker.com/r/bitnami/postgresql) docker run --name api-solid-pg -e POSTGRESQL_USERNAME=docker -e POSTGRESQL_PASSWORD=docker -e POSTGRESQL_DATABASE=apisolid -p 5432:5432 bitnami/postgresql # We don't use this command because we use docker-compose to run all images, this command is just to show how to run a single image ``` ```json // Create scripts in package.json "scripts": { "start-docker": "docker-compose up -d", // Create script to run docker-compose in background "stop-docker": "docker-compose stop" // Create script to stop docker-compose }, ``` _Create **`docker-compose.yml`** file with all docker-compose config_ _Create **`.dockerignore`** file with all docker-compose ignore files_ ```bash # Commands to use docker docker ps # List all running containers docker ps -a # List all containers docker images # List all images docker pull mysql # Pull mysql image database (if you want to use mysql) docker pull postgres # Pull postgres image database (if you want to use postgres) docker pull mariadb # Pull mariadb image database (if you want to use mariadb) docker start <container_id or container_name> # <container_id> Start container with id | <container_name> Start container with name docker stop <container_id or container_name> # <container_id> Stop container with id | <container_name> Stop container with name docker pause <container_id or container_name> # <container_id> Pause container with id | <container_name> Pause container with name docker unpause <container_id or container_name> # <container_id> Unpause container with id | <container_name> Unpause container with name docker rm <container_id or container_name> # <container_id> Remove container with id | <container_name> Remove container with name docker logs <container_id or container_name> # <container_id> Show logs of container with id | <container_name> Show logs of container with name docker inspect <container_id or container_name> # <container_id> Show all information of container with id | <container_name> Show all information of container with name docker-compose --version # Show docker-compose version docker-compose up # Run docker-compose, show logs in terminal docker-compose up -d # Run docker-compose in background, not show logs in terminal docker-compose start # Start o docker-compose docker-compose stop # Stop o docker-compose, not remove all data in database docker-compose down # Stop and remove o docker-compose, obs remove all data in database ``` &nbsp; ### **PrismaJs** database architecture ```bash npm install prisma # Install Prisma npm i prisma-erd-generator @mermaid-js/mermaid-cli # Install Prisma ERD generator npm i @prisma/client # Install Prisma client npx prisma init # Create prisma folder with prisma.schema and prisma folder npx prisma migrate dev # Enter a name for the new migration: » created tab Habits npx prisma studio # Open Prisma Studio in browser npx prisma studio -b firefox -p 5173 # Open Prisma Studio in browser with specific port and browser npx prisma generate # Generate diagram in prisma folder npx prisma db seed # Seed database with data in prisma/seed.ts - Populate database with data for development ``` ```typescript // Add generator in prisma.schema generator erd { provider = "prisma-erd-generator" } ``` ```json // Create scripts in package.json "scripts": { "studio": "npx prisma studio -b firefox -p 5173", // Create script to open Prisma Studio in browser with specific port and browser "generate": "npx prisma generate", // Create script to generate diagram in prisma folder "migrate": "npx prisma migrate dev", // Create script to migrate database "seed": "npx prisma db seed" // Create script to seed database }, ``` **`Environment variables to databases mysql`** &nbsp; _Create **`DATABASE_URL`** in .env and .env.example file with **`MySql`**_ ```.env DATABASE_URL="mysql://USER:PASSWORD@HOST:PORT/DATABASE_NAME" SHADOW_DATABASE_URL="mysql://OTHER_USER:PASSWORD@HOST:PORT/OTHER_DATABASE_NAME" ``` > I used mysql, but you can use postgresql, mariadb, sqlite, sqlserver, mongodb, etc. ```typescript // Add datasource in prisma.schema to mysql database datasource db { provider = "mysql" url = env("DATABASE_URL") shadowDatabaseUrl = env("SHADOW_DATABASE_URL") } // https://www.prisma.io/docs/concepts/components/prisma-migrate/shadow-database // Exist provider that user cannot have access to create a database, to resolve this problem, you can use shadow database ``` &nbsp; ### **Vitest** architecture ```bash npm install -D vitest # Install Vitest npm install -D vite-tsconfig-paths # To vite understand tsconfig paths npm install -D @vitest/coverage-c8 # Install coverage vitest npm install -D @vitest/ui # Install vitest ui npm install -D supertest # Install supertest to test http requests npm install -D @types/supertest # Install types supertest ``` _Create **`vite.config.ts`** file with all vitest config_ ```typescript import tsconfigPaths from 'vite-tsconfig-paths' import { defineConfig } from 'vitest/config' export default defineConfig({ plugins: [tsconfigPaths()], }) // now vitest can understand tsconfig paths ``` ```json // Create scripts in package.json "scripts": { "test:create-prisma-environment": "npm link ./prisma/vitest-environment-prisma", // Create vitest-environment-prisma in node_modules "test:install-prisma-environment": "npm link vitest-environment-prisma", // Install vitest-environment-prisma in node_modules "test": "vitest run --dir src/use-cases", // Run all tests without watch "test:watch": "vitest --dir src/use-cases", // Run all tests with watch "pretest:e2e": "run-s test:create-prisma-environment test:install-prisma-environment", // Run before test:e2e, run-s is to run scripts in sequence (npm install -D npm-run-all) "test:e2e": "vitest run --dir src/http", // Run all tests without watch in specific folder "test:e2e:watch": "vitest --dir src/http", // Run all tests with watch in specific folder "test:coverage": "vitest run --coverage", // Run all tests with coverage "test:ui": "vitest --ui", // Run all tests with ui }, ``` _Create **`vitest-environment-prisma`** to test environment with prisma_ ```bash cd prisma/vitest-environment-prisma # Enter in vitest-environment-prisma folder npm init -y # Create package.json npm link # Link vitest-environment-prisma to node_modules cd ../../ # Return to root folder npm link vitest-environment-prisma # Link vitest-environment-prisma to node_modules ``` Edit **`package.json`** file like this ```json { "name": "vitest-environment-prisma", "main": "prisma-test-environment.ts" } ``` _Create **`prisma-test-environment.ts`** in vitest-environment-prisma folder_ _Edit **`vite.config.ts`** file with all vitest config_ ```typescript // Any test inside src/http/controllers will run in environment with prisma/vitest-environment-prisma test: { environmentMatchGlobs: [['src/http/controllers/**', 'prisma']], }, ``` &nbsp; ### **Others** libraries ```bash npm install -D npm-run-all # Install npm-run-all to run multiple scripts in parallel or sequential npm install bcryptjs # Install bcryptjs to encrypt password npm install -D @types/bcryptjs # Install typescript types for bcryptjs npm install dayjs # Install dayjs to manipulate date ``` --- &nbsp; <a id="-funcionalidades"></a> ## ⚙️ Funcionalidades ### RF - Requisitos Funcionais - Deve ser possível se cadastrar na aplicação; - Deve ser possível se autenticar na aplicação; - Deve ser possível obter o perfil do usuário logado; - Deve ser possível obter o número de check-ins do usuário logado; - Deve ser possível o usuário obter seu histórico de check-ins; - Deve ser possível o usuário buscar academias próximas a ele (até 10km); - Deve ser possível o usuário buscar academias por nome; - Deve ser possível o usuário fazer check-in em uma academia; - Deve ser possível validar o check-in do usuário em uma academia; - Deve ser possível cadastrar uma academia; ### RN - Regras de Negócio - O usuário não pode se cadastrar com um e-mail já existente; - O usuário não pode fazer dois check-ins no mesmo dia; - O usuário não pode fazer check-in se não estiver perto (100m) da academia; - O check-in só pode ser validado até 20 minutos após criação; - O check-in só pode ser validado por usuários administradores; - A academia só pode ser cadastrada por usuários administradores; ### RNF - Requisitos Não Funcionais - A senha do usuário deve ser armazenada com hash; - Todas as listas de dados devem ser paginadas com 20 itens por página; - O usuário deve ser identificado pelo token JWT; - Uso de PostgreSQL em ambiente Dev e MySql em ambiente Prod; - Uso de PrismaJs para migrations, queries e diagrama de banco de dados; - Uso de Fastify para rotas e middlewares; - Uso de Zod para validação de dados de entrada; - Uso de SupertestJs para testes de integração; - Uso de Tsup para compilar o TypeScript em modo de produção; - Uso de Tsx para compilar o TypeScript em modo de desenvolvimento; - Uso de Eslint para padronização de código; - Uso de Prettier para padronização de código; - Uso de Docker para deploy da aplicação e padronização de ambiente de desenvolvimento; - Uso de Insonmia para testes de requisições; - Uso de Github para versionamento de código; - Uso Swagger para documentação da API; &nbsp; ### 🧭 Rodando a aplicação (Modo desenvolvimento) ```bash git clone https://github.com/livioalvarenga/Template-Api-Rest-Node-Docker-Prisma.git # Clone este repositório cd Template-Api-Rest-Node-Docker-Prisma # Acesse a pasta do projeto no seu terminal/cmd npm install # Instale as dependências npm run start-docker # Subir o banco de dados em modo de desenvolvimento na porta 5432 npm run dev # Execute a aplicação em modo de desenvolvimento, a aplicação será aberta na porta:3333 - acesse http://localhost:3333 npm run stop-docker # Parar o banco de dados em modo de desenvolvimento # Ou npm run lets-code # Sobe o banco de dados em modo de desenvolvimento e executa a aplicação em modo de desenvolvimento ``` ### 🧭 Rodando a aplicação (Modo produção) ```bash npm run build # Compilar o TypeScript em modo de produção npm run start # Iniciar o servidor em modo de produção ``` ### 🧭 Prisma ```bash npm run studio # Iniciar o Prisma Studio para visualizar o banco de dados npm run migrate # Criar migrations do banco de dados npm run seed # Popular o banco de dados com dados de desenvolvimento npm run generate # Gerar diagrama do banco de dados ``` ### 🧭 Testes A aplicação possui testes unitários de integração e testes e2e e uma cobertura de testes de 100%. Para executar os testes, execute os comandos abaixo: ```bash npm run test # Executar os testes unitários de integração npm run test:watch # Executar os testes unitários de integração com watch npm run test:e2e # Executar os testes e2e npm run test:e2e:watch # Executar os testes e2e com watch npm run test:coverage # Verificar a cobertura de testes npm run test:ui # Executar os testes de integração com Vitest ui ``` Além disso, utilizamos o GitHub Actions para executar os testes unitários de integração e e2e e verificar a cobertura de testes a cada push na branch main. ### Testando API com openAPI (Swagger) - Acesse http://localhost:3333/docs - Create User in POST /users - Authenticate User in POST /sessions _ Copy the token - Click on Authorize button - Paste the token in Value input ![OpenAPI Swagger](https://github.com/LivioAlvarenga/API-Rest-Node-SOLID/blob/master/files/openAPI-swagger.png?raw=true) &nbsp; --- &nbsp; <a id="-deploy"></a> ## 🚀 Deploy O deploy foi realizado na plataforma Render.com. Para acessar a rota de documentação (docs) da API, clique no link abaixo: [API-Rest-Node-SOLID](https://api-rest-node-solid.onrender.com/docs) As variáveis de ambiente configuradas incluem: - DATABASE_URL - SHADOW_DATABASE_URL - JWT_SECRET - NODE_ENV O comando para construção (Build command) foi configurado da seguinte forma: ```bash npm install && npx prisma migrate deploy && npx prisma generate && npm run build ``` O banco de dados utilizado foi o MySQL MariaDB. Foi necessário criar um banco de dados sombra (Shadow), pois o serviço utilizado para criar o banco de dados não permite a criação de um banco de dados para testes. O Prisma utiliza um banco de dados sombra para realizar seus processos de migrações (migrations) e testes. --- &nbsp; <a id="-autor"></a> ## 🦸 Autor Olá, eu sou Livio Alvarenga, Engenheiro de Produção | Dev Back-end e Front-end. Sou aficcionado por tecnologia, programação, processos e planejamento. Uni todas essas paixões em uma só profissão. Dúvidas, sugestões e críticas são super bem vindas. Seguem meus contatos. - [www.livioalvarenga.com](https://livioalvarenga.com) - contato@livioalvarenga.com &nbsp; <p align="center"> <a href= "https://www.livioalvarenga.com/"><img alt="portfólio livio alvarenga" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/3109a24e71f07dbad193ae0ddbc43b69b39c7adf/files/badgePortifolioLivio.svg"></a> <a href= "https://www.linkedin.com/in/livio-alvarenga-planejamento-mrp-engenheiro-produ%C3%A7%C3%A3o-materiais-vba-powerbi/"><img alt="perfil LinkedIn livio alvarenga" src="https://img.shields.io/static/v1?logoWidth=15&logoColor=0A66C2&logo=LinkedIn&label=LinkedIn&message=Livio Alvarenga&color=0A66C2"></a> <a href= "https://twitter.com/AlvarengaLivio"><img alt="perfil twitter livio alvarenga" src="https://img.shields.io/static/v1?logoWidth=15&logoColor=1DA1F2&logo=Twitter&label=Twitter&message=@AlvarengaLivio&color=1DA1F2"></a> <a href= "https://www.instagram.com/livio_alvarenga/"><img alt="perfil Instagram livio alvarenga" src="https://img.shields.io/static/v1?logoWidth=15&logoColor=E4405F&logo=Instagram&label=Instagram&message=@livio_alvarenga&color=E4405F"></a> <a href= "https://www.facebook.com/profile.php?id=100083957091312"><img alt="perfil Facebook livio alvarenga" src="https://img.shields.io/static/v1?logoWidth=15&logoColor=1877F2&logo=Facebook&label=Facebook&message=Livio Alvarenga&color=1877F2"></a> <a href= "https://www.youtube.com/channel/UCrZgsh8IWyyNrRZ7cjrPbcg"><img alt="perfil YouTube livio alvarenga" src="https://img.shields.io/static/v1?logoWidth=15&logoColor=FF0000&logo=YouTube&label=Youtube&message=Livio Alvarenga&color=FF0000"></a> </p> <p align="center"> <a href= "https://cursos.alura.com.br/vitrinedev/livioalvarenga"><img alt="perfil vitrinedev livio alvarenga" align="center" height="30" src="https://raw.githubusercontent.com/LivioAlvarenga/LivioAlvarenga/e0f5b5a82976af114d957c20f0c78b4d304a68a0/files/vitrinedev.svg"></a> </p> --- &nbsp; <a id="-licença"></a> ## 📝 Licença Este projeto é [MIT licensed](./LICENSE). ##### _#CompartilheConhecimento_
Nesse projeto será desenvolvido uma aplicação para check-ins em academias. Aqui vamos aplicar sobre alguns conceitos do SOLID, Design Patterns, Docker para iniciar o banco de dados, JWT e Refresh Token, RBAC e diversos outros conceitos.
docker,docker-compose,dotenv,eslint,fastify,insomnia,javascript,mysql,nodejs,prettier
2023-04-13T08:43:48Z
2023-05-06T10:18:40Z
null
1
0
96
0
4
39
null
MIT
TypeScript
improveTheWorld/ChatGPT-Bridge
master
# ![ChatGPT-Bridge Logo](./src/assets/Logo/logo.png) **ChatGPT-Bridge** # Tired of waiting for access to the GPT-4 API? Frustrated by the fees charged for using the GPT-API? We have the perfect solution for you! Introducing **[ChatGPT-Driver](https://youtu.be/9fCtMJQxQ4c)**, a system comprised of two components: **ChatGPT-Bridge** (referred to as **"Bridge"**) and **[ChatGPT-Executor](https://github.com/improveTheWorld/ChatGPT-Executor)** (referred to as **"Executor"**). **Bridge** is a web browser plugin compatible with Microsoft Edge and Google Chrome. It offers API-like access to **ChatGPT**. When combined with **Executor** (a server application that receives and executes Windows commands), they unlock the full potential of ChatGPT without any waiting list or additional fees. **Bridge** offers API-like access to GPT-3.5 and GPT-4 for third-party software via webSockets. Bridge provides free API-like access to GPT-3.5. It also provides free API-like access to GPT-4 if you have a ChatGPT Plus account. **✨ 🎉🌟 No fees are charged for the use of the API-like access!** We are continuously striving to maintain and improve this project. If you love our work and find it useful, consider supporting us. Every small donation will go a long way in helping us to keep this project alive and free. **💌[Donate Here](https://www.paypal.com/donate/?hosted_button_id=SJTG7U2E6PC4W)💌** To fully benefit from ChatGPT-Driver, install and set up both components. ## 🆕 Most recent Release Notes (Version 1.2.0) - Add authentification token mechanism to use ChatGPT-Executor-1.2.0 - Support the newest ChatGPT page's html ( ChatGPT May 24 Version) - Add a donate link into pupup.html. If interressted you may do it directly from **[Here](https://www.paypal.com/donate/?hosted_button_id=SJTG7U2E6PC4W)** **Note:** While ChatGPT-Driver has been significantly improved and tested, there may still be potential bugs and limitations. We appreciate your understanding and welcome any feedback to help us enhance the system. ## 🌟 Features - 🔗 Seamlessly connects ChatGPT with third-party software - 🌐 Utilizes WebSocket for real-time communication - 🤖 Supports both GPT-3.5 and GPT-4 - 🆓 Free API-like access to GPT-3.5 and GPT-4 with a ChatGPT Plus account - 📚 Enables ChatGPT to read large files that exceed the size of a single prompt ## 🔧 Installation and Usage To utilize ChatGPT-Driver, you'll need to install both the Bridge plugin and the Executor server application. ### ChatGPT-Bridge Follow the instructions in the [Getting Started](https://github.com/improveTheWorld/ChatGPT-Bridge#getting-started) section to install the Bridge plugin. ### ChatGPT-Executor You can download and install ChatGPT-Executor-1.2.0 directly from [Here](https://bit.ly/46rz4zE). For more information you may visit the [Executor GitHub Repository](https://github.com/improveTheWorld/ChatGPT-Executor) and follow the instructions. You also can download the correct version of ChatGPT-Executor which is compatible of your ChatGPT-Bridge version , from the ChatGPT-Bridge popup. 1. click on Entensions button ( on the top left corner of your web navigator) : ![popup_1.png](./src/assets/Usage/popup_1.png) 2. From displayed the entension list , select the chatGPT-Bridge, the popup will be displayed ![popup._2.png](./src/assets/Usage/popup_2.png) here is how to display the ChatGPT-Bridge popup : ## 🚀 Getting Started ### Prerequisites - Microsoft Edge or Google Chrome browser - Basic understanding of browser extensions ### Installation 1. Clone the repository: git clone https://github.com/improveTheWorld/ChatGPT-Bridge.git 2. Open your browser and navigate to extensions ( `edge://extensions` or `chrome://extensions` depending on your browser). 3. Enable "Developer Mode" in the top-right corner. 4. Click on "Load Unpacked" and select the `ChatGPT-Bridge/src` folder. 5. The ChatGPT-Bridge plugin should now be visible in the extensions list and ready for use! ## 🛠️ Usage 1. After installing the plugin, go to [ChatGPT](https://chat.openai.com/chat) website. 2. The bridge popup will be displayed at the top right corner of the webpage. You may move it using your mouse if needed. * If the displayed popup is as below: ![Connecting.GIF](./src/assets/Usage/Connecting.GIF) `You forgot to launch the Executor or your third-party server, if applicable. Please start the Executor and wait. The Bridge will continuously poll for a connection until it is established.` * When the connection is established, the displayed popup should be as below: ![Start.GIF](./src/assets/Usage/Start.GIF) Start a new chat and then click the start button to begin bridging between your ChatGPT AI and the third-party software (the Executor). When you click start with a new chat page, the Bridge plugin will empty the first prompt and send it. The first prompt is intended to teach CHATGPT the communication protocol to use with the Executor. Once ChatGPT gets all the initial instructions, it will ask you for its first task. Assign one and watch the magic work. `As an example of use, we asked ChatGPT to troubleshoot our WiFi card. We had an issue that the Windows network diagnostic tools were unable to detect. ChatGPT, after trying different approaches using our ChatGPT-Bridge system, was able to fix it for us.`[Video](https://youtu.be/9fCtMJQxQ4c) --- * When you are done and want to stop using the bridge, just click the stop button: ![Stop.GIF](./src/assets/Usage/Stop.GIF) 3. The default WebSocket communication between the Bridge and the third-party software is done over port 8181. You can change the port in the config.json file if needed. 4. You can find the initial prompt text in the file firstPrompt.txt. You may customize it for your personal needs if you want. 5. Two modes of communication are available: * Wait for a complete GPT message before sending it to the third-party software (default mode). * Stream the message while it's being received from GPT (enable this by setting "streamingMode": true in the config.json file). 6. If you want to use only the Bridge plugin with your third-party software, your software should act as a server and listen on the correct port for a connection. Once the plugin is installed and launched, it will automatically request a connection. **FROM VERSION 1.1.0 AND LATER** If you are using a ChatGPT Plus account, a countdown of available message credits will be displayed once you start using GPT-4 (as only 25 messages per 3 hours are allowed). ![Stop.GIF](./src/assets/Usage/CountDown.GIF) The countdown will also display a timer counting down until the message credits are refilled <!-- Documentation ------------- For more detailed information on how to use ChatGPT-Bridge, please refer to the [Wiki](https://github.com/improveTheWorld/ChatGPT-Bridge/wiki). --> ## 📧 Contributing We welcome contributions! If you'd like to contribute, please follow these steps: 1. Fork the repository. 2. Create your feature branch (`git checkout -b feature/your-feature`). 3. Commit your changes (`git commit -am 'Add some feature'`). 4. Push to the branch (`git push origin feature/your-feature`). 5. Open a Pull Request. Please read our [Contributing Guidelines](./CONTRIBUTING.md) for more details. ## ⚙️ Possible improvements * See the [IMPROVEMENTS](./IMPROVEMENTS.md) file. ## 🔐 License * This project is licensed under the Apache V2.0 for free software use - see the [LICENSE](./LICENSE-APACHE.txt) file for details. * For commercial software use, see the [LICENSE\_NOTICE](./LICENSE_NOTICE.md) file. ## 📬 Contact If you have any questions or suggestions, please feel free to reach out to us: * [Tec-Net](mailto:tecnet.paris@gmail.com) <!-- * [Project Link](https://github.com/improveTheWorld/ChatGPT-Bridge) --> ## 🎉 Acknowledgments * [OpenAI](https://www.openai.com/) for the [ChatGPT](https://chat.openai.com/chat) website * [Google](https://www.google.com/chrome/) and [Microsoft](https://www.microsoft.com/en-us/edge) for providing the browser platform * All contributors who have helped improve ChatGPT-Bridge * The amazing open-source community for their invaluable resources and inspiration * Our users and testers for providing essential feedback that helps us improve ChatGPT-Bridge **Join us on this exciting journey to unlock the unlimited power and potential of ChatGPT! Stay tuned for future updates and the upcoming release of the other part of the project, which will bring even more groundbreaking features and possibilities. Together, we can revolutionize the way we interact with AI-powered language models!**
No need anymore to wait for the GPT-4 API access. Unlock the full potential of ChatGPT with "ChatGPT-Bridge", a plugin for your web browser (Microsoft Edge or Google chrome) that bypasses the API for seamless integration with third-party software and instant access to GPT-3.5 and GPT-4.
chatgpt-gpt3-gpt4-edge-plugin-api-websocket-ai,chrome,javascript
2023-04-11T11:48:46Z
2023-06-30T15:08:23Z
2023-06-30T15:08:23Z
1
0
78
1
5
34
null
Apache-2.0
JavaScript
natalia-fs/checkbox-toggle-css
main
# Checkbox Sun/Moon <div align="center"> <img src="preview.gif" alt="Preview"> <a target="_blank" href="https://natalia-fs.github.io/checkbox-toggle-css/">Deploy</a> </div>
Projeto criado totalmente influenciado por um meme do tiktok/twitter
css,html,javascript
2023-04-15T00:56:26Z
2023-04-23T04:16:27Z
null
1
0
6
0
1
34
null
null
CSS
Hugo-COLLIN/SaveMyPhind-conversation-exporter
main
# <img alt="SaveMyPhind logo" src="./src/assets/icons/icon-128.png" style="width:40px"> Save my Chatbot - AI Conversation Exporter ### 🚀 Download your Phind, Perplexity and MaxAI-Google search threads into markdown files! ## 🗺️ Quick start <h3> <a href="https://save.hugocollin.com/get">⏩ Install Save my Chatbot on Firefox and Chromium browsers</a> </h3> &#x2A20; It's **available for Chrome, Firefox, Edge, Opera, Brave, and many more...** 😉 ### ❓ How to use? Simple! 1. **Go to a chat page**: Phind, Perplexity or Google (with MaxAI integration). 2. **Click on the extension icon.** 👉 It will **automatically download a structured markdown file** containing the conversation. ### 😎 Why Save my Chatbot? - To **keep AI generated information offline**, - To **read and process** in a knowledge base / note-taking app (like Obsidian), - To **share threads with others**. ✅ Enjoy! ✏️ Please note that this project is not affiliated with Phind, Perplexity nor MaxAI. <br> ## 🗺️ Roadmap ### 🚀 In the pipeline... Check the [Issues](https://github.com/Hugo-COLLIN/SaveMyPhind-conversation-exporter/issues) and [Pull requests](https://github.com/Hugo-COLLIN/SaveMyPhind-conversation-exporter/pulls) to see what's going on! ### 🎯 Main features: - [x] Export chats from Phind, Perplexity and MaxAI-Google - [x] Clean markdown formatting and structuring - [x] Keep numbered sources in the exported file - [x] Informative file header and filename (date, url...) - [x] Indicates the chatbot response mode used (Phind-Search and Perplexity) - [x] Informative modals (updates...) ### 🤯 The most important things I keep improving / fixing: - Because chatbots are constantly changing their interfaces: Fix broken export, wrong formatting and content extracted. - Improve code maintainability <br> ## ⬇️ How to install? (detailed) ### Quick install (automatic updates) Simply go to the store and click on the installation button: #### [⏩ Install Save my Chatbot on Chrome, Edge, Opera, Brave and other Chromium browsers...](https://chrome.google.com/webstore/detail/agklnagmfeooogcppjccdnoallkhgkod) #### [⏩ Install Save my Chatbot on Firefox](https://addons.mozilla.org/fr/firefox/addon/save-my-phind) ### Manual install and updates You can also install it manually following these steps: - Chromium browsers: 1. On GitHub, click on Releases (in the right side menu), go on the latest version and download the `save-my-phind_x.y.z.crx` file. 2. Go on `chrome://extensions` (or `[yourChromiumBasedBrowser]://extensions`), then enable "Developer mode" (toggle on the top right) and reload the page. 3. Drag and drop the .crx file on the page, then click on "Add extension" in the appearing popup window. - Firefox: 1. On GitHub, click on Releases (in the right side menu), go on the latest version and download the `save-my-phind_x.y.z.xpi` file. 2. Go on `about:addons`, then click on the gear icon on the top right and select "Install Add-on From File...". 3. Select the .xpi file you just downloaded and click on "Add" in the appearing popup window. 4. Right-click on the extension icon and select "Always allow for www.phind.com / www.perplexity.ai". ✅ You're done! <br> ## 🪶 Contribution and licenses ### The project Feel free to contribute to this project by forking it and making pull requests. You can also open an issue if you find a bug or have any suggestion. This project is licensed under the [RMD-C v1.0 License](LICENSE.txt). Please check for more details. ### Libraries licenses This project uses third-party libraries. See the [license list](licenses.txt) for more details about libraries' licenses. <br> ## 💌 If you appreciate my work, help me by donating: <div align="center"> <a href="https://save.hugocollin.com/support" target="_blank"><img src="https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white" height="50px"/></a> </div>
🚀 Save my Chatbot: Download your Phind, Perplexity and MaxAI-Google search threads into markdown files (unofficial). ⏩ Now available in the Chrome Web Store and the Firefox Add-ons Store! (formerly Save my Phind)
chrome-extension,javascript,phind,firefox-addon,perplexity,max-ai,oop-in-javascript,perplexity-ai
2023-04-15T10:28:27Z
2024-05-19T15:53:10Z
2024-05-02T21:36:44Z
2
45
548
10
8
30
null
NOASSERTION
JavaScript
kishor-23/food-waste-management-system
main
# Food waste management system <!-- <img src="img/coverimage.jpeg"> --> <p> The basic concept of this project Food Waste Management is to collect theexcess/leftover food from donors such as hotels, restaurants, marriage halls, etc and distribute to the needy people .</p> <h2>Tools and Technologies</h2> <ul> <li>Frontend : HTML, CSS, JavaScript</li> <li>Backend : php</li> <li>webserver: xampp server</li> <li>Database: MySQL </li> </ul> <h2>The system has three modules. </h2> <ul><li>User</li> <li>Admin</li> <li>Delivery</li></ul> <br> <p>The User module is designed for people who wish to donate their excess or leftover food to help reduce food wastage.The User module is responsible for accepting food donations from users who have excess food, such as marriage halls, restaurants, or individuals.The module provides users with the ability to register, login, and donate food. Users can select the type and quantity of food they want to donate, and the system will match their donation with the nearest needy people or organizations.The module also allows users to view their donations.The User module provides the information to the Admin module for further processing. </p><br> <p> The Administrator module is for trusts, NGOs, and charities that are registered on the platform. The Admin module is designed for system administrators who manage the food distribution process. The Admin module receives information about the food donation from the User module and lists it for NGOs and charities to choose from.Admins can view and manage the list of donations received, including the type and quantity of food donated. NGOs and charities can select the food donation they need from the Admin module and request a pickup to the Delivery module.The Admin module is responsible for tracking the requests and keeping track of which organizations have taken which donations </p><br> <p>The Delivery Person module is for individuals who wish to participate in the food donation process by providing pickup and delivery services. Delivery personnel can register themselves on the platform .The Delivery Person module provides pickup and drop-off services for NGOs and charities who have requested a food donation.The Delivery Person module shows the pickup location and drop location of the food donation. </p><br> <p>Overall, the Food Waste Management System is designed to efficiently manage excess food and ensure that it is distributed to those in need. The User module accepts food donations, the Admin module lists them for NGOs and charities to choose from, and the Delivery Person module provides pickup and drop-off services. This system benefits the community by reducing food waste and helping those in need </p> <h3>User </h3> <!-- <img src="img/User-module.jpg"> --> <img src="img/mobile.jpg"> <h3>Admin </h3> <img src="img/Admin.jpg"> <h3>Delivery </h3> <img src="img/Delivery_module.jpg"> <h3>features:</h3> <ul><li>Mobile Screen friendly website.</li> <li>chatbot support</li> <li>Secure Login</li> </ul> <h2>Mobile Screen friendly website.</h2> <img src="img/responsive.gif"> <h2>chatbot support</h2> <img src="img/chatbotsupport.jpg"> <h2>Secure Login</h2> <img src="img/hash-flow.png"> <h2>How to run</h2> <ol> <li>Download the project zip file</li> <li> Extract the file and copy the folder</li> <li>Paste inside root directory(for xampp xampp/htdocs, for wamp wamp/www, for lamp var/www/Html)</li> <li> Open PHPMyAdmin (http://localhost/phpmyadmin)</li> <li> Create a database</li> <li>Import demo.sql file(inside database folder)</li> <li> Run the script http://localhost/folderName </li> </ol> <h2>view project :</h2> <a href="https://kishor-23.github.io/food-donate/index.html" > view demo</a>
Food Donate is a web application
css,food-donation,food-donation-application,html,javascript,mysql,php
2023-04-18T15:23:38Z
2024-04-08T14:42:31Z
null
1
0
2
0
10
29
null
MIT
PHP