Code Monkey home page Code Monkey logo

showcase-guitar-chords-search-angular's Introduction

๐ŸŽธ Instant Guitar Chord Positions Search, powered by Typesense - Angular

Tech Stack

All make for a blazingly fast search experience ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ

The guitar chord dataset & chord svg generation is from tombatossals which contains 2141 chord shapes of 552 chords.

Project Structure

/
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ”œโ”€โ”€ guitar.json
โ”‚   โ”‚   โ””โ”€โ”€ schema.json
โ”‚   โ””โ”€โ”€ indexTypesense.ts # script that index data from guitar.json into typesense server
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ app/
โ”‚       โ”œโ”€โ”€ UI components...
โ”‚       โ””โ”€โ”€ app.component.ts # guitar chords search
โ””โ”€โ”€ writeEnvVariables.ts # util script to write env variables at build time

Development

To run this project locally, make sure you have docker and nodejs.

Installation

git clone https://github.com/typesense/showcase-guitar-chords-search-angular.git

cd showcase-guitar-chords-search-angular

npm i

Start typesense server

npm run start:typesense # or: docker compose up

Index data into typesense

npm run index:typesense

Generate angular env variables

ng generate environments

Then add this to your src/environments/environment.development.ts

// change them if you want to use Typesense cloud
export const environment = {
  PUBLIC_TYPESENSE_SEARCH_ONLY_API_KEY: null,
  PUBLIC_TYPESENSE_HOST: null,
  PUBLIC_TYPESENSE_PORT: "443",
  PUBLIC_TYPESENSE_PROTOCOL: "https",
};

Start the dev web app

ng serve

Open http://localhost:4200/ to see the app โœŒ๏ธ

Deployment

Set env variables to point the app to the Typesense Cluster

PUBLIC_TYPESENSE_SEARCH_ONLY_API_KEY=xxx
PUBLIC_TYPESENSE_HOST=xxx.typesense.net
PUBLIC_TYPESENSE_PORT=443
PUBLIC_TYPESENSE_PROTOCOL=https

The file writeEnvVariables.ts will automatically load them into src/environments for the angular app.

showcase-guitar-chords-search-angular's People

Contributors

jasonbosco avatar phihero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

phihero

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.