{"id":28429086,"url":"https://github.com/mindsdb/js-example","last_synced_at":"2025-07-28T00:09:19.550Z","repository":{"id":239669219,"uuid":"617210617","full_name":"mindsdb/js-example","owner":"mindsdb","description":"Example of building a ML web application using the JavaScript SDK","archived":false,"fork":false,"pushed_at":"2023-04-28T15:41:45.000Z","size":259,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-07-18T10:48:41.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mindsdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-21T23:05:33.000Z","updated_at":"2024-03-06T12:13:16.000Z","dependencies_parsed_at":"2024-05-14T00:16:20.962Z","dependency_job_id":"29defa66-508f-4093-9a4d-e21a5192c5e1","html_url":"https://github.com/mindsdb/js-example","commit_stats":null,"previous_names":["mindsdb/js-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mindsdb/js-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindsdb%2Fjs-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindsdb%2Fjs-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindsdb%2Fjs-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindsdb%2Fjs-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mindsdb","download_url":"https://codeload.github.com/mindsdb/js-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindsdb%2Fjs-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267442460,"owners_count":24087803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-05T13:08:32.267Z","updated_at":"2025-07-28T00:09:19.526Z","avatar_url":"https://github.com/mindsdb.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example MindsDB Web Application: Crypto ML Forecasting\nThis is an example of the power of MindsDB and how it can simplify applying machine learning to your applications. We will train our own ML models and use them to predict the price of several cryptocurrencies against [USDT](https://tether.to/) a minute into the future. Anyone can replicate this example, and train their own models to predict the future prices of cryptocurrencies.\n\nThis example uses the [Express](https://expressjs.com/) framework for the backend and [Tailwind CSS](https://tailwindcss.com/) for the frontend, but you can apply the concepts here to any framework.\n\n| **NOTE**: This is an example project used for educational purposes. MindsDB does not recommend using these ML models to influence real trading decisions. MindsDB is not in any way affiliated with coins used in this example.\n\n\u003cbr\u003e\n\n## What it Looks Like\n\n![Crypto Dashboard Example](./public/img/dashboard_example.png)\n\n## Installation\n\nFirst, clone the repository\n\n`git clone https://github.com/mindsdb/js-example.git`\n\nNext, you need to install dependencies.\n\n`cd js-example \u0026\u0026 npm install`\n\n## Training Models\n\nBefore you can run the application locally, you need to train your own models to use. We provided a handy script `trainCoinModel.js` for this. This example uses the following coins:\n\n* Bitcoin (BTC)\n* Etherium (ETH)\n* Binance Coin (BNB)\n* Dogecoin (DOGE)\n* Solana (SOL)\n\nYou can run `node ./scripts/trainCoinModel.js --help` to see how to customize your models more. Here's the simplest way to train all the models you need:\n\n`node ./scripts/trainCoinModel.js --pair btcusdt`\n\n`node ./scripts/trainCoinModel.js --pair ethusdt`\n\n`node ./scripts/trainCoinModel.js --pair bnbusdt`\n\n`node ./scripts/trainCoinModel.js --pair dogeusdt`\n\n`node ./scripts/trainCoinModel.js --pair solusdt`\n\n## Configuration\n\nFirst, make sure you enter your MindsDB Cloud username and password into `./config/mindsdb-config.json`. Without this, you won't be able to connect and authenticate properly.\n```\n{\n  \"host\": \"https://cloud.mindsdb.com\",\n  \"user\": \"YOUR USERNAME HERE\",\n  \"password\": \"YOUR PASSWORD HERE\"\n}\n```\n\nOr if running locally\n\n```\n{\n  \"host\": \"http://127.0.0.1:47334\"\n}\n```\n\nFinally, make sure `./config/model-config.json` has the right names of the models you trained. You only need to change this if you provided custom names to your models when training, using the `--name` option.\n\n```\n{\n  \"btcusdt\": \"btcusdt_model\",\n  \"ethusdt\": \"ethusdt_model\",\n  \"bnbusdt\": \"bnbusdt_model\",\n  \"dogeusdt\": \"dogeusdt_model\",\n  \"solusdt\": \"solusdt_model\"\n}\n```\n\n## Running Locally\n\nAfter you've done everything above, you're ready to run the example locally!\n\nFirst, watch for local changes so you automatically rebuild the CSS styles:\n\n`npm run watch`\n\nNext, open up a new terminal to spin up the Express server:\n\n`npm run dev`\n\nYou should be able to navigate to [localhost:3000](http://localhost:3000) to see the example running with real data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindsdb%2Fjs-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmindsdb%2Fjs-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindsdb%2Fjs-example/lists"}