├── heroku.yml ├── BasicRedisLeaderboardDemoDotNetCore ├── ClientApp │ ├── .browserslistrc │ ├── vue.config.js │ ├── babel.config.js │ ├── dist │ │ ├── favicon.ico │ │ ├── css │ │ │ └── app.f4626b73.css │ │ ├── index.html │ │ └── js │ │ │ ├── app.fadedebf.js │ │ │ └── app.fadedebf.js.map │ ├── public │ │ ├── favicon.ico │ │ └── index.html │ ├── src │ │ ├── plugins │ │ │ └── vuetify.js │ │ ├── assets │ │ │ └── logo.png │ │ ├── main.js │ │ ├── App.vue │ │ └── components │ │ │ ├── RankSelectionModal.vue │ │ │ └── Example.vue │ ├── .gitignore │ ├── README.md │ ├── .eslintrc.js │ └── package.json ├── appsettings.Development.json ├── appsettings.json ├── Controllers │ ├── ApiController.cs │ ├── RankController.cs │ └── ListController.cs ├── BasicRedisLeaderboardDemoDotNetCore.csproj ├── Properties │ └── launchSettings.json ├── Program.cs ├── Configs │ └── ServiceAutoConfig.cs ├── Startup.cs └── .gitignore ├── docs ├── YTThumbnail.png └── screenshot001.png ├── images └── app_preview_image.png ├── 03 - redis-leaderboard dot net.jpg ├── BasicRedisLeaderboardDemoDotNetCore.BLL ├── DbContexts │ ├── AppDbContext.cs │ └── AppDbInitializer.cs ├── Components │ └── RankComponent │ │ ├── Models │ │ ├── RankModel.cs │ │ └── RankResponseModel.cs │ │ └── Services │ │ ├── Interfaces │ │ └── IRankService.cs │ │ └── RankService.cs └── BasicRedisLeaderboardDemoDotNetCore.BLL.csproj ├── BasicRedisLeaderboardDemoDotNetCore.Base ├── BasicRedisLeaderboardDemoDotNetCore.Base.csproj └── Interfaces │ ├── IService.cs │ └── ISingletonService.cs ├── app.json ├── .gitignore ├── Dockerfile ├── LICENSE ├── marketplace.json ├── BasicRedisLeaderboardDemoDotNetCore.sln └── README.md /heroku.yml: -------------------------------------------------------------------------------- 1 | build: 2 | docker: 3 | web: Dockerfile 4 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /docs/YTThumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-dotnet/master/docs/YTThumbnail.png -------------------------------------------------------------------------------- /docs/screenshot001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-dotnet/master/docs/screenshot001.png -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "transpileDependencies": [ 3 | "vuetify" 4 | ] 5 | } -------------------------------------------------------------------------------- /images/app_preview_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-dotnet/master/images/app_preview_image.png -------------------------------------------------------------------------------- /03 - redis-leaderboard dot net.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-dotnet/master/03 - redis-leaderboard dot net.jpg -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.BLL/DbContexts/AppDbContext.cs: -------------------------------------------------------------------------------- 1 | namespace BasicRedisLeaderboardDemoDotNetCore.BLL.DbContexts 2 | { 3 | public class AppDbContext 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/dist/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-dotnet/master/BasicRedisLeaderboardDemoDotNetCore/ClientApp/dist/favicon.ico -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-dotnet/master/BasicRedisLeaderboardDemoDotNetCore/ClientApp/public/favicon.ico -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/src/plugins/vuetify.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuetify from 'vuetify/lib/framework'; 3 | 4 | Vue.use(Vuetify); 5 | 6 | export default new Vuetify({ 7 | }); 8 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-dotnet/master/BasicRedisLeaderboardDemoDotNetCore/ClientApp/src/assets/logo.png -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.Base/BasicRedisLeaderboardDemoDotNetCore.Base.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.Base/Interfaces/IService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BasicRedisLeaderboardDemoDotNetCore.Base.Interfaces 6 | { 7 | public interface IService 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import vuetify from './plugins/vuetify'; 4 | 5 | Vue.config.productionTip = false 6 | 7 | new Vue({ 8 | vuetify, 9 | render: h => h(App) 10 | }).$mount('#app') 11 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/Controllers/ApiController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | namespace BasicRedisLeaderboardDemoDotNetCore.Controllers 4 | { 5 | [ApiController] 6 | [Route("api/[controller]")] 7 | public class ApiController : ControllerBase 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.Base/Interfaces/ISingletonService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BasicRedisLeaderboardDemoDotNetCore.Base.Interfaces 6 | { 7 | public interface ISingletonService : IService 8 | { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/dist/css/app.f4626b73.css: -------------------------------------------------------------------------------- 1 | [data-v-6d7466c0] .v-data-table>.v-data-table__wrapper>table>thead>tr>th{color:#444}[data-v-6d7466c0] .v-data-table{color:#212529;font-weight:500}#app{font-family:Noto Sans JP,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50;margin-top:60px;background:#f4f4f4}pre{background:#f6f8fa;padding:3px 5px;display:inline} -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.BLL/Components/RankComponent/Models/RankModel.cs: -------------------------------------------------------------------------------- 1 | namespace BasicRedisLeaderboardDemoDotNetCore.BLL.Components.RankComponent.Models 2 | { 3 | public class RankModel 4 | { 5 | public string Company { get; set; } 6 | public string Symbol { get; set; } 7 | public long MarketCap { get; set; } 8 | public string Country { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/README.md: -------------------------------------------------------------------------------- 1 | # client 2 | 3 | ## Project setup 4 | ``` 5 | yarn install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | yarn serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | yarn build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | yarn lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.BLL/Components/RankComponent/Models/RankResponseModel.cs: -------------------------------------------------------------------------------- 1 | namespace BasicRedisLeaderboardDemoDotNetCore.BLL.Components.RankComponent.Models 2 | { 3 | public class RankResponseModel 4 | { 5 | public string Company { get; set; } 6 | public string Country { get; set; } 7 | public int Rank { get; set; } 8 | public string Symbol { get; set; } 9 | public double MarketCap { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | 'eslint:recommended' 9 | ], 10 | parserOptions: { 11 | parser: 'babel-eslint' 12 | }, 13 | rules: { 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Basic Redis Leaderboard Demo .Net Core 5", 3 | "repository": "https://github.com/redis-developer/basic-redis-leaderboard-demo-dotnet", 4 | "stack": "container", 5 | "addons": ["rediscloud:30"], 6 | "env": { 7 | "REDIS_ENDPOINT_URL": { 8 | "description": "Redis server host:port, ex: 127.0.0.1:6379", 9 | "required": true 10 | }, 11 | "REDIS_PASSWORD": { 12 | "description": "Redis server password", 13 | "required": true 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio. 3 | ################################################################################ 4 | 5 | /.vs/BasicRedisLeaderboardDemoDotNetCore 6 | /BasicRedisLeaderboardDemoDotNetCore.Base/bin/Debug/netcoreapp3.1 7 | /BasicRedisLeaderboardDemoDotNetCore.Base/obj 8 | /BasicRedisLeaderboardDemoDotNetCore.BLL/bin/Debug/netcoreapp3.1 9 | /BasicRedisLeaderboardDemoDotNetCore.BLL/obj 10 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/BasicRedisLeaderboardDemoDotNetCore.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | true 17 | $(NoWarn);1591 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.BLL/BasicRedisLeaderboardDemoDotNetCore.BLL.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.BLL/Components/RankComponent/Services/Interfaces/IRankService.cs: -------------------------------------------------------------------------------- 1 | using BasicRedisLeaderboardDemoDotNetCore.Base.Interfaces; 2 | using BasicRedisLeaderboardDemoDotNetCore.BLL.Components.RankComponent.Models; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | 6 | namespace BasicRedisLeaderboardDemoDotNetCore.BLL.Components.RankComponent.Services.Interfaces 7 | { 8 | public interface IRankService : IService 9 | { 10 | Task> Range(int start, int ent, bool isDesc); 11 | Task<(string, string)> GetCompanyBySymbol(string symbol); 12 | Task> GetBySymbols(List symbols); 13 | 14 | Task Update(string symbol, double amount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:5000", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "BasicRedisLeaderboardDemoDotNetCore": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/Controllers/RankController.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using BasicRedisLeaderboardDemoDotNetCore.BLL.Components.RankComponent.Services.Interfaces; 3 | using Microsoft.AspNetCore.Mvc; 4 | 5 | namespace BasicRedisLeaderboardDemoDotNetCore.Controllers 6 | { 7 | public class RankController : ApiController 8 | { 9 | public readonly IRankService _rankService; 10 | public RankController(IRankService rankService) 11 | { 12 | _rankService = rankService; 13 | } 14 | 15 | [HttpGet("update")] 16 | public async Task Update([FromQuery(Name = "symbol")] string symbol, [FromQuery(Name = "amount")] double amount) 17 | { 18 | var res = await _rankService.Update(symbol, amount); 19 | return Ok(new { success = res }); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base 2 | WORKDIR /app 3 | EXPOSE 80 4 | 5 | ENV PORT = 80 6 | ENV REDIS_ENDPOINT_URL "Redis server URI" 7 | ENV REDIS_PASSWORD "Password to the server" 8 | 9 | FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build 10 | WORKDIR /src 11 | COPY . . 12 | RUN dotnet restore "BasicRedisLeaderboardDemoDotNetCore/BasicRedisLeaderboardDemoDotNetCore.csproj" 13 | 14 | WORKDIR "/src/BasicRedisLeaderboardDemoDotNetCore" 15 | RUN dotnet build "BasicRedisLeaderboardDemoDotNetCore.csproj" -c Release -o /app 16 | 17 | FROM build AS publish 18 | RUN dotnet publish "BasicRedisLeaderboardDemoDotNetCore.csproj" -c Release -o /app 19 | 20 | FROM base AS final 21 | WORKDIR /app 22 | COPY --from=publish /app . 23 | COPY --from=build /src/BasicRedisLeaderboardDemoDotNetCore/ClientApp/dist ./ClientApp/dist 24 | 25 | ENTRYPOINT ["dotnet", "BasicRedisLeaderboardDemoDotNetCore.dll"] -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.21.0", 12 | "core-js": "^3.6.5", 13 | "country-flags-svg": "^1.1.0", 14 | "vue": "^2.6.11", 15 | "vuetify": "^2.2.11" 16 | }, 17 | "devDependencies": { 18 | "@vue/cli-plugin-babel": "~4.5.0", 19 | "@vue/cli-plugin-eslint": "~4.5.0", 20 | "@vue/cli-service": "~4.5.0", 21 | "babel-eslint": "^10.1.0", 22 | "eslint": "^6.7.2", 23 | "eslint-plugin-vue": "^6.2.2", 24 | "sass": "^1.19.0", 25 | "sass-loader": "^8.0.0", 26 | "vue-cli-plugin-vuetify": "~2.0.9", 27 | "vue-template-compiler": "^2.6.11", 28 | "vuetify-loader": "^1.3.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/src/App.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 27 | 28 | 45 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Redis Developer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Hosting; 3 | using System; 4 | 5 | namespace BasicRedisLeaderboardDemoDotNetCore 6 | { 7 | public class Program 8 | { 9 | public static void Main(string[] args) 10 | { 11 | CreateHostBuilder(args).Build().Run(); 12 | } 13 | 14 | public static IHostBuilder CreateHostBuilder(string[] args) 15 | { 16 | // Accept the PORT environment variable to enable Cloud Run/Heroku support. 17 | var customPort = Environment.GetEnvironmentVariable("PORT"); 18 | if (customPort != null) 19 | { 20 | string url = String.Concat("http://0.0.0.0:", customPort); 21 | 22 | return Host.CreateDefaultBuilder(args) 23 | .ConfigureWebHostDefaults(webBuilder => 24 | { 25 | webBuilder.UseStartup().UseUrls(url); 26 | }); 27 | } 28 | else 29 | { 30 | 31 | return Host.CreateDefaultBuilder(args) 32 | .ConfigureWebHostDefaults(webBuilder => 33 | { 34 | webBuilder.UseStartup(); 35 | }); 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/dist/index.html: -------------------------------------------------------------------------------- 1 | client
-------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/Controllers/ListController.cs: -------------------------------------------------------------------------------- 1 | using BasicRedisLeaderboardDemoDotNetCore.BLL.Components.RankComponent.Services.Interfaces; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | 6 | namespace BasicRedisLeaderboardDemoDotNetCore.Controllers 7 | { 8 | public class ListController : ApiController 9 | { 10 | public readonly IRankService _rankService; 11 | public ListController(IRankService rankService) 12 | { 13 | _rankService = rankService; 14 | } 15 | 16 | [HttpGet("top10")] 17 | public async Task GetTop10() 18 | { 19 | return Ok(await _rankService.Range(0, 9, true)); 20 | } 21 | 22 | [HttpGet("all")] 23 | public async Task GetAll() 24 | { 25 | return Ok(await _rankService.Range(0, -1, true)); 26 | } 27 | 28 | [HttpGet("bottom10")] 29 | public async Task GetBottom10() 30 | { 31 | return Ok(await _rankService.Range(0, 9, false)); 32 | } 33 | 34 | [HttpGet("inRank")] 35 | public async Task GetInRank([FromQuery(Name = "start")]int start, [FromQuery(Name = "end")] int end) 36 | { 37 | return Ok(await _rankService.Range(start, end, true)); 38 | } 39 | 40 | [HttpGet("getBySymbol")] 41 | public async Task GetBySymbol([FromQuery(Name = "symbols[]")] List symbols) 42 | { 43 | return Ok(await _rankService.GetBySymbols(symbols)); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /marketplace.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_name": "Basic Redis Leaderboard App", 3 | "description": "Showcases how to impliment leaderboard appliation in .NetCore 5", 4 | "type": "Building Block", 5 | "contributed_by": "Redis", 6 | "repo_url": "https://github.com/redis-developer/basic-redis-leaderboard-demo-dotnet", 7 | "preview_image_url": "https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-dotnet/master/images/app_preview_image.png", 8 | "download_url": "https://github.com/redis-developer/basic-redis-leaderboard-demo-dotnet/archive/master.zip", 9 | "hosted_url": "", 10 | "quick_deploy": "true", 11 | "deploy_buttons": [ 12 | { 13 | "heroku": "https://heroku.com/deploy?template=https://github.com/redis-developer/basic-redis-leaderboard-demo-dotnet" 14 | }, 15 | { 16 | "Google": "https://deploy.cloud.run/?git_repo=https://github.com/redis-developer/basic-redis-leaderboard-demo-dotnet.git" 17 | } 18 | ], 19 | "language": [ 20 | "C#" 21 | ], 22 | "redis_commands": [ 23 | "HSET", 24 | "ZADD", 25 | "ZREVRANGE", 26 | "ZRANGE", 27 | "ZREVRANGE", 28 | "ZSCORE", 29 | "ZINCRBY", 30 | "ZCOUNT" 31 | ], 32 | "redis_use_cases": [ 33 | "Leaderboard" 34 | ], 35 | "redis_features": [], 36 | "app_image_urls": [ 37 | "https://github.com/redis-developer/basic-redis-leaderboard-demo-dotnet/blob/master/docs/screenshot001.png?raw=true" 38 | ], 39 | "youtube_url": "https://www.youtube.com/watch?v=zzinHxdZ34I", 40 | "special_tags": [], 41 | "verticals": [ 42 | "Others" 43 | ], 44 | "markdown": "https://github.com/redis-developer/basic-redis-leaderboard-demo-dotnet/raw/master/README.md" 45 | } -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/Configs/ServiceAutoConfig.cs: -------------------------------------------------------------------------------- 1 | using BasicRedisLeaderboardDemoDotNetCore.Base.Interfaces; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | 9 | namespace BasicRedisLeaderboardDemoDotNetCore.Configs 10 | { 11 | public class ServiceAutoConfig 12 | { 13 | public static void Configure(IServiceCollection services) 14 | { 15 | var service = typeof(IService); 16 | var singletonService = typeof(ISingletonService); 17 | var types = AppDomain.CurrentDomain.GetAssemblies().SelectMany(s => s.GetTypes()).Where(p => (service.IsAssignableFrom(p) || singletonService.IsAssignableFrom(p)) && p.IsClass && !p.IsAbstract).ToList(); 18 | types.ForEach(c => 19 | { 20 | var originInterfaces = c.GetInterfaces(); 21 | var isSingleton = originInterfaces.Any(i => singletonService.IsAssignableFrom(i)); 22 | var interfaces = originInterfaces.Where(x => 23 | x.Name != service.Name || 24 | x.Name != singletonService.Name 25 | ).ToList(); 26 | 27 | interfaces.ForEach(i => 28 | { 29 | if (!isSingleton) 30 | { 31 | services.AddTransient(i, c); 32 | } 33 | else 34 | { 35 | services.AddSingleton(i, c); 36 | } 37 | }); 38 | }); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30804.86 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicRedisLeaderboardDemoDotNetCore", "BasicRedisLeaderboardDemoDotNetCore\BasicRedisLeaderboardDemoDotNetCore.csproj", "{5E58D7D0-E34B-4072-83E0-DF7C73CC6C7D}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicRedisLeaderboardDemoDotNetCore.BLL", "BasicRedisLeaderboardDemoDotNetCore.BLL\BasicRedisLeaderboardDemoDotNetCore.BLL.csproj", "{D54BCFD0-B0DD-461F-BD82-02D8FCE265AF}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicRedisLeaderboardDemoDotNetCore.Base", "BasicRedisLeaderboardDemoDotNetCore.Base\BasicRedisLeaderboardDemoDotNetCore.Base.csproj", "{7D0C03B9-CA39-4CE7-9531-F4C9F078ADA2}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {5E58D7D0-E34B-4072-83E0-DF7C73CC6C7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {5E58D7D0-E34B-4072-83E0-DF7C73CC6C7D}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {5E58D7D0-E34B-4072-83E0-DF7C73CC6C7D}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {5E58D7D0-E34B-4072-83E0-DF7C73CC6C7D}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {D54BCFD0-B0DD-461F-BD82-02D8FCE265AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {D54BCFD0-B0DD-461F-BD82-02D8FCE265AF}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {D54BCFD0-B0DD-461F-BD82-02D8FCE265AF}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {D54BCFD0-B0DD-461F-BD82-02D8FCE265AF}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {7D0C03B9-CA39-4CE7-9531-F4C9F078ADA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {7D0C03B9-CA39-4CE7-9531-F4C9F078ADA2}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {7D0C03B9-CA39-4CE7-9531-F4C9F078ADA2}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {7D0C03B9-CA39-4CE7-9531-F4C9F078ADA2}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {6CF7A22B-65D5-42C7-88B8-20B1EA99710B} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.BLL/Components/RankComponent/Services/RankService.cs: -------------------------------------------------------------------------------- 1 | using BasicRedisLeaderboardDemoDotNetCore.BLL.Components.RankComponent.Models; 2 | using BasicRedisLeaderboardDemoDotNetCore.BLL.Components.RankComponent.Services.Interfaces; 3 | using StackExchange.Redis; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | 8 | namespace BasicRedisLeaderboardDemoDotNetCore.BLL.Components.RankComponent.Services 9 | { 10 | public class RankService : IRankService 11 | { 12 | private readonly IDatabase _redisClient; 13 | public RankService(IConnectionMultiplexer redis) 14 | { 15 | _redisClient = redis.GetDatabase(); 16 | } 17 | 18 | public async Task> Range(int start, int ent, bool isDesc) 19 | { 20 | var data = new List(); 21 | var results = await _redisClient.SortedSetRangeByRankWithScoresAsync("REDIS_LEADERBOARD",start,ent, isDesc? Order.Descending:Order.Ascending); 22 | var startRank = isDesc ? start + 1 : (results.Count() / 2 - start); 23 | var increaseFactor = isDesc ? 1 : -1; 24 | var items = results.ToList(); 25 | for (var i = 0; i < items.Count; i++) 26 | { 27 | var company = await GetCompanyBySymbol(items[i].Element); 28 | data.Add( 29 | new RankResponseModel 30 | { 31 | Company = company.Item1, 32 | Country = company.Item2, 33 | Rank = startRank, 34 | Symbol = items[i].Element, 35 | MarketCap = items[i].Score, 36 | }); 37 | startRank += increaseFactor; 38 | } 39 | 40 | return data; 41 | } 42 | 43 | public async Task<(string, string)> GetCompanyBySymbol(string symbol) 44 | { 45 | var item = await _redisClient.HashGetAllAsync(symbol); 46 | return (item[0].ToString(), item[1].ToString()); 47 | } 48 | 49 | public async Task> GetBySymbols(List symbols) 50 | { 51 | var results = new List(); 52 | for (var i = 0;i< symbols.Count; i++) 53 | { 54 | var score = await _redisClient.SortedSetScoreAsync("REDIS_LEADERBOARD", symbols[i]); 55 | var company = await GetCompanyBySymbol(symbols[i]); 56 | results.Add( 57 | new RankResponseModel 58 | { 59 | Company = company.Item1, 60 | Country = company.Item2, 61 | Rank = i+1, 62 | Symbol = symbols[i], 63 | MarketCap = (double)score 64 | }); 65 | } 66 | 67 | return results; 68 | } 69 | 70 | public async Task Update(string symbol, double amount) 71 | { 72 | return await _redisClient.SortedSetAddAsync("REDIS_LEADERBOARD", symbol, amount); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/src/components/RankSelectionModal.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | 131 | 132 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/Startup.cs: -------------------------------------------------------------------------------- 1 | using BasicRedisLeaderboardDemoDotNetCore.BLL.DbContexts; 2 | using BasicRedisLeaderboardDemoDotNetCore.Configs; 3 | using Microsoft.AspNetCore.Builder; 4 | using Microsoft.AspNetCore.Hosting; 5 | using Microsoft.AspNetCore.Http; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.DependencyInjection; 8 | using Microsoft.Extensions.FileProviders; 9 | using Microsoft.Extensions.Hosting; 10 | using StackExchange.Redis; 11 | using System; 12 | using System.IO; 13 | using System.Reflection; 14 | 15 | namespace BasicRedisLeaderboardDemoDotNetCore 16 | { 17 | public class Startup 18 | { 19 | public Startup(IConfiguration configuration) 20 | { 21 | Configuration = configuration; 22 | } 23 | 24 | public IConfiguration Configuration { get; } 25 | 26 | public void ConfigureServices(IServiceCollection services) 27 | { 28 | var redisEndpointUrl = (Environment.GetEnvironmentVariable("REDIS_ENDPOINT_URL") ?? "127.0.0.1:6379").Split(':'); 29 | var redisHost = redisEndpointUrl[0]; 30 | var redisPort = redisEndpointUrl[1]; 31 | 32 | string redisConnectionUrl = string.Empty; 33 | var redisPassword = Environment.GetEnvironmentVariable("REDIS_PASSWORD"); 34 | if (redisPassword != null) 35 | { 36 | redisConnectionUrl = $"{redisPassword}@{redisHost}:{redisPort}"; 37 | } 38 | else 39 | { 40 | redisConnectionUrl = $"{redisHost}:{redisPort}"; 41 | } 42 | 43 | var redis = ConnectionMultiplexer.Connect(redisConnectionUrl); 44 | 45 | services.AddSingleton(redis); 46 | 47 | Assembly.Load("BasicRedisLeaderboardDemoDotNetCore.BLL"); 48 | ServiceAutoConfig.Configure(services); 49 | 50 | services.AddControllers(); 51 | 52 | services.AddSpaStaticFiles(configuration => 53 | { 54 | configuration.RootPath = "ClientApp/dist"; 55 | }); 56 | } 57 | 58 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 59 | { 60 | if (env.IsDevelopment()) 61 | { 62 | app.UseDeveloperExceptionPage(); 63 | } 64 | else 65 | { 66 | app.UseExceptionHandler("/Error"); 67 | app.UseHsts(); 68 | } 69 | 70 | app.UseHttpsRedirection(); 71 | app.UseStaticFiles(); 72 | app.UseSpaStaticFiles(); 73 | 74 | app.UseRouting(); 75 | 76 | app.Map(new PathString(""), client => 77 | { 78 | var clientPath = Path.Combine(Directory.GetCurrentDirectory(), "./ClientApp/dist"); 79 | StaticFileOptions clientAppDist = new StaticFileOptions() 80 | { 81 | FileProvider = new PhysicalFileProvider(clientPath) 82 | }; 83 | client.UseSpaStaticFiles(clientAppDist); 84 | client.UseSpa(spa => { spa.Options.DefaultPageStaticFileOptions = clientAppDist; }); 85 | 86 | app.UseEndpoints(endpoints => 87 | { 88 | endpoints.MapControllerRoute(name: "default", pattern: "{controller}/{action=Index}/{id?}"); 89 | }); 90 | }); 91 | 92 | using (var serviceScope = app.ApplicationServices.GetRequiredService().CreateScope()) 93 | { 94 | //Seed method 95 | AppDbInitializer.Seed(serviceScope); 96 | 97 | } 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Basic Redis Leaderboard Demo .NET 5 2 | 3 | Show how the redis works with .NET 5. 4 | 5 | ![How it works](https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-dotnet/master/docs/screenshot001.png) 6 | 7 | # Overview video 8 | 9 | Here's a short video that explains the project and how it uses Redis: 10 | 11 | [![Watch the video on YouTube](https://github.com/redis-developer/basic-redis-leaderboard-demo-dotnet/raw/master/docs/YTThumbnail.png)](https://www.youtube.com/watch?v=zzinHxdZ34I) 12 | 13 | # How it works? 14 | 15 | ## How the data is stored: 16 | 17 | - The AAPL's details - market cap of 2,6 trillions and USA origin - are stored in a hash like below: 18 | - E.g `HSET "company:AAPL" symbol "AAPL" market_cap "2600000000000" country USA` 19 | - The Ranks of AAPL of 2,6 trillions are stored in a ZSET. 20 | - E.g `ZADD companyLeaderboard 2600000000000 company:AAPL` 21 | 22 | ## How the data is accessed: 23 | 24 | - Top 10 companies: 25 | - E.g `ZREVRANGE companyLeaderboard 0 9 WITHSCORES` 26 | - All companies: 27 | - E.g `ZREVRANGE companyLeaderboard 0 -1 WITHSCORES` 28 | - Bottom 10 companies: 29 | - E.g `ZRANGE companyLeaderboard 0 9 WITHSCORES` 30 | - Between rank 10 and 15: 31 | - E.g `ZREVRANGE companyLeaderboard 9 14 WITHSCORES` 32 | - Show ranks of AAPL, FB and TSLA: 33 | - E.g `ZSCORE companyLeaderBoard company:AAPL company:FB company:TSLA` 34 | - Adding market cap to companies: 35 | - E.g `ZINCRBY companyLeaderBoard 1000000000 "company:FB"` 36 | - Reducing market cap to companies: 37 | - E.g `ZINCRBY companyLeaderBoard -1000000000 "company:FB"` 38 | - Companies over a Trillion: 39 | - E.g `ZCOUNT companyLeaderBoard 1000000000000 +inf` 40 | - Companies between 500 billion and 1 trillion: 41 | - E.g `ZCOUNT companyLeaderBoard 500000000000 1000000000000` 42 | 43 | ### Code Example: Get top 10 companies 44 | 45 | ```C# 46 | [HttpGet("top10")] 47 | public async Task GetTop10() 48 | { 49 | return Ok(await _rankService.Range(0, 9, true)); 50 | } 51 | ``` 52 | 53 | ```csharp 54 | public async Task> Range(int start, int ent, bool isDesc) 55 | { 56 | var data = new List(); 57 | var results = await _redisClient.SortedSetRangeByRankWithScoresAsync("REDIS_LEADERBOARD",start,ent, isDesc? Order.Descending:Order.Ascending); 58 | var startRank = isDesc ? start + 1 : (results.Count() / 2 - start); 59 | var increaseFactor = isDesc ? 1 : -1; 60 | var items = results.ToList(); 61 | for (var i = 0; i < items.Count; i++) 62 | { 63 | var company = await GetCompanyBySymbol(items[i].Element); 64 | data.Add( 65 | new RankResponseModel 66 | { 67 | Company = company.Item1, 68 | Country = company.Item2, 69 | Rank = startRank, 70 | Symbol = items[i].Element, 71 | MarketCap = items[i].Score, 72 | }); 73 | startRank += increaseFactor; 74 | } 75 | 76 | return data; 77 | } 78 | ``` 79 | 80 | ## How to run it locally? 81 | 82 | ### Development 83 | 84 | ``` 85 | git clone https://github.com/redis-developer/basic-redis-leaderboard-demo-dotnet.git 86 | ``` 87 | 88 | #### Write in environment variable or Dockerfile actual connection to Redis: 89 | 90 | ``` 91 | REDIS_ENDPOINT_URL = "Redis server URI:PORT_NUMBER" 92 | REDIS_PASSWORD = "Password to the server" 93 | ``` 94 | 95 | #### Run backend 96 | 97 | ```sh 98 | dotnet run 99 | ``` 100 | 101 | Static content runs automatically with the backend part. In case you need to run it separately, please see README in the [client](client) folder. 102 | 103 | ## Try it out 104 | 105 | #### Deploy to Heroku 106 | 107 |

108 | 109 | Deploy to Heorku 110 | 111 |

112 | 113 | #### Deploy to Google Cloud 114 | 115 |

116 | 117 | Run on Google Cloud 118 | 119 |

120 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | bin/ 23 | Bin/ 24 | obj/ 25 | Obj/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | /wwwroot/dist/ 30 | 31 | # MSTest test Results 32 | [Tt]est[Rr]esult*/ 33 | [Bb]uild[Ll]og.* 34 | 35 | # NUNIT 36 | *.VisualState.xml 37 | TestResult.xml 38 | 39 | # Build Results of an ATL Project 40 | [Dd]ebugPS/ 41 | [Rr]eleasePS/ 42 | dlldata.c 43 | 44 | *_i.c 45 | *_p.c 46 | *_i.h 47 | *.ilk 48 | *.meta 49 | *.obj 50 | *.pch 51 | *.pdb 52 | *.pgc 53 | *.pgd 54 | *.rsp 55 | *.sbr 56 | *.tlb 57 | *.tli 58 | *.tlh 59 | *.tmp 60 | *.tmp_proj 61 | *.log 62 | *.vspscc 63 | *.vssscc 64 | .builds 65 | *.pidb 66 | *.svclog 67 | *.scc 68 | 69 | # Chutzpah Test files 70 | _Chutzpah* 71 | 72 | # Visual C++ cache files 73 | ipch/ 74 | *.aps 75 | *.ncb 76 | *.opendb 77 | *.opensdf 78 | *.sdf 79 | *.cachefile 80 | 81 | # Visual Studio profiler 82 | *.psess 83 | *.vsp 84 | *.vspx 85 | *.sap 86 | 87 | # TFS 2012 Local Workspace 88 | $tf/ 89 | 90 | # Guidance Automation Toolkit 91 | *.gpState 92 | 93 | # ReSharper is a .NET coding add-in 94 | _ReSharper*/ 95 | *.[Rr]e[Ss]harper 96 | *.DotSettings.user 97 | 98 | # JustCode is a .NET coding add-in 99 | .JustCode 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | _NCrunch_* 109 | .*crunch*.local.xml 110 | nCrunchTemp_* 111 | 112 | # MightyMoose 113 | *.mm.* 114 | AutoTest.Net/ 115 | 116 | # Web workbench (sass) 117 | .sass-cache/ 118 | 119 | # Installshield output folder 120 | [Ee]xpress/ 121 | 122 | # DocProject is a documentation generator add-in 123 | DocProject/buildhelp/ 124 | DocProject/Help/*.HxT 125 | DocProject/Help/*.HxC 126 | DocProject/Help/*.hhc 127 | DocProject/Help/*.hhk 128 | DocProject/Help/*.hhp 129 | DocProject/Help/Html2 130 | DocProject/Help/html 131 | 132 | # Click-Once directory 133 | publish/ 134 | 135 | # Publish Web Output 136 | *.[Pp]ublish.xml 137 | *.azurePubxml 138 | # TODO: Comment the next line if you want to checkin your web deploy settings 139 | # but database connection strings (with potential passwords) will be unencrypted 140 | *.pubxml 141 | *.publishproj 142 | 143 | # NuGet Packages 144 | *.nupkg 145 | # The packages folder can be ignored because of Package Restore 146 | **/packages/* 147 | # except build/, which is used as an MSBuild target. 148 | !**/packages/build/ 149 | # Uncomment if necessary however generally it will be regenerated when needed 150 | #!**/packages/repositories.config 151 | 152 | # Microsoft Azure Build Output 153 | csx/ 154 | *.build.csdef 155 | 156 | # Microsoft Azure Emulator 157 | ecf/ 158 | rcf/ 159 | 160 | # Microsoft Azure ApplicationInsights config file 161 | ApplicationInsights.config 162 | 163 | # Windows Store app package directory 164 | AppPackages/ 165 | BundleArtifacts/ 166 | 167 | # Visual Studio cache files 168 | # files ending in .cache can be ignored 169 | *.[Cc]ache 170 | # but keep track of directories ending in .cache 171 | !*.[Cc]ache/ 172 | 173 | # Others 174 | ClientBin/ 175 | ~$* 176 | *~ 177 | *.dbmdl 178 | *.dbproj.schemaview 179 | *.pfx 180 | *.publishsettings 181 | orleans.codegen.cs 182 | 183 | /node_modules 184 | 185 | # RIA/Silverlight projects 186 | Generated_Code/ 187 | 188 | # Backup & report files from converting an old project file 189 | # to a newer Visual Studio version. Backup files are not needed, 190 | # because we have git ;-) 191 | _UpgradeReport_Files/ 192 | Backup*/ 193 | UpgradeLog*.XML 194 | UpgradeLog*.htm 195 | 196 | # SQL Server files 197 | *.mdf 198 | *.ldf 199 | 200 | # Business Intelligence projects 201 | *.rdl.data 202 | *.bim.layout 203 | *.bim_*.settings 204 | 205 | # Microsoft Fakes 206 | FakesAssemblies/ 207 | 208 | # GhostDoc plugin setting file 209 | *.GhostDoc.xml 210 | 211 | # Node.js Tools for Visual Studio 212 | .ntvs_analysis.dat 213 | 214 | # Visual Studio 6 build log 215 | *.plg 216 | 217 | # Visual Studio 6 workspace options file 218 | *.opt 219 | 220 | # Visual Studio LightSwitch build output 221 | **/*.HTMLClient/GeneratedArtifacts 222 | **/*.DesktopClient/GeneratedArtifacts 223 | **/*.DesktopClient/ModelManifest.xml 224 | **/*.Server/GeneratedArtifacts 225 | **/*.Server/ModelManifest.xml 226 | _Pvt_Extensions 227 | 228 | # Paket dependency manager 229 | .paket/paket.exe 230 | 231 | # FAKE - F# Make 232 | .fake/ 233 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/src/components/Example.vue: -------------------------------------------------------------------------------- 1 | 136 | 137 | 266 | 267 | 268 | 277 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/dist/js/app.fadedebf.js: -------------------------------------------------------------------------------- 1 | (function(e){function t(t){for(var n,i,l=t[0],c=t[1],s=t[2],u=0,d=[];uO?"$".concat((e/O).toFixed(3)," T"):e>L?"$".concat((e/L).toFixed(2)," B"):e>F?"$".concat((e/F).toFixed(1)," M"):"$ ".concat(e)},getCountryFlag:function(e){var t={"S. Arabia":"Saudi Arabia","S. Korea":"South Korea"},a=Object(u["findFlagUrlByCountryName"])(t[e]||e);return a}}},E=B,U=(a("1e58"),a("62ad")),j=a("a523"),N=a("8fea"),I=a("cd55"),$=a("49e2"),D=a("c865"),H=a("0393"),Z=a("0fd9"),M=Object(h["a"])(E,i,l,!1,null,"6d7466c0",null),G=M.exports;x()(M,{VBtn:_["a"],VCard:k["a"],VCol:U["a"],VContainer:j["a"],VDataTable:N["a"],VExpansionPanel:I["a"],VExpansionPanelContent:$["a"],VExpansionPanelHeader:D["a"],VExpansionPanels:H["a"],VIcon:w["a"],VRow:Z["a"],VSelect:R["a"]});var K={name:"App",components:{Example:G}},W=K,z=(a("034f"),a("7496")),J=Object(h["a"])(W,o,r,!1,null,null,null),Y=J.exports;x()(J,{VApp:z["a"]});var q=a("f309");n["a"].use(q["a"]);var Q=new q["a"]({});n["a"].config.productionTip=!1,new n["a"]({vuetify:Q,render:function(e){return e(Y)}}).$mount("#app")},"85ec":function(e,t,a){}}); 2 | //# sourceMappingURL=app.fadedebf.js.map -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore.BLL/DbContexts/AppDbInitializer.cs: -------------------------------------------------------------------------------- 1 | using BasicRedisLeaderboardDemoDotNetCore.BLL.Components.RankComponent.Models; 2 | using Microsoft.Extensions.DependencyInjection; 3 | using StackExchange.Redis; 4 | using System.Collections.Generic; 5 | using System.Threading.Tasks; 6 | 7 | namespace BasicRedisLeaderboardDemoDotNetCore.BLL.DbContexts 8 | { 9 | public class AppDbInitializer 10 | { 11 | public static async Task Seed(IServiceScope serviceScope) 12 | { 13 | 14 | var ranks = new List() 15 | { 16 | new RankModel { 17 | Company= "Apple", 18 | Symbol= "AAPL", 19 | MarketCap= 2222000000, 20 | Country= "USA", 21 | }, 22 | new RankModel { 23 | Company= "Saudi Aramco", 24 | Symbol= "2222.SR", 25 | MarketCap= 2046000000, 26 | Country= "S. Arabia", 27 | }, 28 | new RankModel { 29 | Company= "Microsoft", 30 | Symbol= "MSFT", 31 | MarketCap= 1660000000, 32 | Country= "USA", 33 | }, 34 | new RankModel { 35 | Company= "Amazon", 36 | Symbol= "AMZN", 37 | MarketCap= 1597000000, 38 | Country= "USA", 39 | }, 40 | new RankModel { 41 | Company= "Alphabet (Google)", 42 | Symbol= "GOOG", 43 | MarketCap= 1218000000, 44 | Country= "USA", 45 | }, 46 | new RankModel { 47 | Company= "Tesla", 48 | Symbol= "TSLA", 49 | MarketCap= 834170000, 50 | Country= "USA", 51 | }, 52 | new RankModel { 53 | Company= "Facebook", 54 | Symbol= "FB", 55 | MarketCap= 762110000, 56 | Country= "USA", 57 | }, 58 | new RankModel { 59 | Company= "Tencent", 60 | Symbol= "TCEHY", 61 | MarketCap= 742230000, 62 | Country= "China", 63 | }, 64 | new RankModel { 65 | Company= "Alibaba", 66 | Symbol= "BABA", 67 | MarketCap= 642220000, 68 | Country= "China", 69 | }, 70 | new RankModel { 71 | Company= "Berkshire Hathaway", 72 | Symbol= "BRK-A", 73 | MarketCap= 549580000, 74 | Country= "USA", 75 | }, 76 | new RankModel { 77 | Company= "Samsung", 78 | Symbol= "005930.KS", 79 | MarketCap= 526630000, 80 | Country= "S. Korea", 81 | }, 82 | new RankModel { 83 | Company= "TSMC", 84 | Symbol= "TSM", 85 | MarketCap= 511700000, 86 | Country= "Taiwan", 87 | }, 88 | new RankModel { 89 | Company= "Visa", 90 | Symbol= "V", 91 | MarketCap= 474940000, 92 | Country= "USA", 93 | }, 94 | new RankModel { 95 | Company= "Johnson & Johnson", 96 | Symbol= "JNJ", 97 | MarketCap= 421310000, 98 | Country= "USA", 99 | }, 100 | new RankModel { 101 | Company= "Walmart", 102 | Symbol= "WMT", 103 | MarketCap= 414850000, 104 | Country= "USA", 105 | }, 106 | new RankModel { 107 | Company= "JPMorgan Chase", 108 | Symbol= "JPM", 109 | MarketCap= 414610000, 110 | Country= "USA", 111 | }, 112 | new RankModel { 113 | Company= "Kweichow Moutai", 114 | Symbol= "600519.SS", 115 | MarketCap= 392630000, 116 | Country= "China", 117 | }, 118 | new RankModel { 119 | Company= "Mastercard", 120 | Symbol= "MA", 121 | MarketCap= 352760000, 122 | Country= "USA", 123 | }, 124 | new RankModel { 125 | Company= "UnitedHealth", 126 | Symbol= "UNH", 127 | MarketCap= 344790000, 128 | Country= "USA", 129 | }, 130 | new RankModel { 131 | Company= "Procter & Gamble", 132 | Symbol= "PG", 133 | MarketCap= 344140000, 134 | Country= "USA", 135 | }, 136 | new RankModel { 137 | Company= "Nestlé", 138 | Symbol= "NSRGY", 139 | MarketCap= 333610000, 140 | Country= "Switzerland", 141 | }, 142 | new RankModel { 143 | Company= "NVIDIA", 144 | Symbol= "NVDA", 145 | MarketCap= 328730000, 146 | Country= "USA", 147 | }, 148 | new RankModel { 149 | Company= "LVMH", 150 | Symbol= "LVMUY", 151 | MarketCap= 327040000, 152 | Country= "France", 153 | }, 154 | new RankModel { 155 | Company= "Walt Disney", 156 | Symbol= "DIS", 157 | MarketCap= 322900000, 158 | Country= "USA", 159 | }, 160 | new RankModel { 161 | Company= "Roche", 162 | Symbol= "RHHBY", 163 | MarketCap= 293520000, 164 | Country= "Switzerland", 165 | }, 166 | new RankModel { 167 | Company= "Home Depot", 168 | Symbol= "HD", 169 | MarketCap= 289700000, 170 | Country= "USA", 171 | }, 172 | new RankModel { 173 | Company= "PayPal", 174 | Symbol= "PYPL", 175 | MarketCap= 284080000, 176 | Country= "USA", 177 | }, 178 | new RankModel { 179 | Company= "Bank of America", 180 | Symbol= "BAC", 181 | MarketCap= 281410000, 182 | Country= "USA", 183 | }, 184 | new RankModel { 185 | Company= "ICBC", 186 | Symbol= "1398.HK", 187 | MarketCap= 266230000, 188 | Country= "China", 189 | }, 190 | new RankModel { 191 | Company= "Meituan-Dianping", 192 | Symbol= "MPNGF", 193 | MarketCap= 246210000, 194 | Country= "China", 195 | }, 196 | new RankModel { 197 | Company= "Verizon", 198 | Symbol= "VZ", 199 | MarketCap= 239180000, 200 | Country= "USA", 201 | }, 202 | new RankModel { 203 | Company= "Ping An Insurance", 204 | Symbol= "PNGAY", 205 | MarketCap= 237140000, 206 | Country= "China", 207 | }, 208 | new RankModel { 209 | Company= "Comcast", 210 | Symbol= "CMCSA", 211 | MarketCap= 235810000, 212 | Country= "USA", 213 | }, 214 | new RankModel { 215 | Company= "Adobe", 216 | Symbol= "ADBE", 217 | MarketCap= 232710000, 218 | Country= "USA", 219 | }, 220 | new RankModel { 221 | Company= "Nike", 222 | Symbol= "NKE", 223 | MarketCap= 230710000, 224 | Country= "USA", 225 | }, 226 | new RankModel { 227 | Company= "Netflix", 228 | Symbol= "NFLX", 229 | MarketCap= 225490000, 230 | Country= "USA", 231 | }, 232 | new RankModel { 233 | Company= "Pinduoduo", 234 | Symbol= "PDD", 235 | MarketCap= 221680000, 236 | Country= "China", 237 | }, 238 | new RankModel { 239 | Company= "Coca-Cola", 240 | Symbol= "KO", 241 | MarketCap= 219510000, 242 | Country= "USA", 243 | }, 244 | new RankModel { 245 | Company= "Novartis", 246 | Symbol= "NVS", 247 | MarketCap= 214590000, 248 | Country= "Switzerland", 249 | }, 250 | new RankModel { 251 | Company= "Toyota", 252 | Symbol= "TM", 253 | MarketCap= 212390000, 254 | Country= "Japan", 255 | }, 256 | new RankModel { 257 | Company= "ASML", 258 | Symbol= "ASML", 259 | MarketCap= 212100000, 260 | Country= "Netherlands", 261 | }, 262 | new RankModel { 263 | Company= "Intel", 264 | Symbol= "INTC", 265 | MarketCap= 211660000, 266 | Country= "USA", 267 | }, 268 | new RankModel { 269 | Company= "L\" Oréal", 270 | Symbol= "OR.PA", 271 | MarketCap= 210160000, 272 | Country= "France", 273 | }, 274 | new RankModel { 275 | Company= "Merck", 276 | Symbol= "MRK", 277 | MarketCap= 210060000, 278 | Country= "USA", 279 | }, 280 | new RankModel { 281 | Company= "AT&T", 282 | Symbol= "T", 283 | MarketCap= 206790000, 284 | Country= "USA", 285 | }, 286 | new RankModel { 287 | Company= "Pfizer", 288 | Symbol= "PFE", 289 | MarketCap= 206380000, 290 | Country= "USA", 291 | }, 292 | new RankModel { 293 | Company= "Salesforce", 294 | Symbol= "CRM", 295 | MarketCap= 203770000, 296 | Country= "USA", 297 | }, 298 | new RankModel { 299 | Company= "Thermo Fisher Scientific", 300 | Symbol= "TMO", 301 | MarketCap= 203040000, 302 | Country= "USA", 303 | }, 304 | new RankModel { 305 | Company= "Pepsico", 306 | Symbol= "PEP", 307 | MarketCap= 199250000, 308 | Country= "USA", 309 | }, 310 | new RankModel { 311 | Company= "Abbott Laboratories", 312 | Symbol= "ABT", 313 | MarketCap= 197810000, 314 | Country= "USA", 315 | }, 316 | new RankModel { 317 | Company= "China Construction Bank", 318 | Symbol= "CICHY", 319 | MarketCap= 193710000, 320 | Country= "China", 321 | }, 322 | new RankModel { 323 | Company= "Exxon Mobil", 324 | Symbol= "XOM", 325 | MarketCap= 192210000, 326 | Country= "USA", 327 | }, 328 | new RankModel { 329 | Company= "Oracle", 330 | Symbol= "ORCL", 331 | MarketCap= 190830000, 332 | Country= "USA", 333 | }, 334 | new RankModel { 335 | Company= "Cisco", 336 | Symbol= "CSCO", 337 | MarketCap= 190400000, 338 | Country= "USA", 339 | }, 340 | new RankModel { 341 | Company= "AbbVie", 342 | Symbol= "ABBV", 343 | MarketCap= 189380000, 344 | Country= "USA", 345 | }, 346 | new RankModel { 347 | Company= "BHP Group", 348 | Symbol= "BHP", 349 | MarketCap= 186040000, 350 | Country= "Australia", 351 | }, 352 | new RankModel { 353 | Company= "Broadcom", 354 | Symbol= "AVGO", 355 | MarketCap= 181240000, 356 | Country= "USA", 357 | }, 358 | new RankModel { 359 | Company= "CM Bank", 360 | Symbol= "3968.HK", 361 | MarketCap= 180460000, 362 | Country= "China", 363 | }, 364 | new RankModel { 365 | Company= "QUALCOMM", 366 | Symbol= "QCOM", 367 | MarketCap= 177150000, 368 | Country= "USA", 369 | }, 370 | new RankModel { 371 | Company= "Reliance Industries", 372 | Symbol= "RELIANCE.NS", 373 | MarketCap= 177100000, 374 | Country= "India", 375 | }, 376 | new RankModel { 377 | Company= "Chevron", 378 | Symbol= "CVX", 379 | MarketCap= 175320000, 380 | Country= "USA", 381 | }, 382 | new RankModel { 383 | Company= "Accenture", 384 | Symbol= "ACN", 385 | MarketCap= 175020000, 386 | Country= "Ireland", 387 | }, 388 | new RankModel { 389 | Company= "Danaher", 390 | Symbol= "DHR", 391 | MarketCap= 172960000, 392 | Country= "USA", 393 | }, 394 | new RankModel { 395 | Company= "Agricultural Bank of China", 396 | Symbol= "ACGBY", 397 | MarketCap= 168730000, 398 | Country= "China", 399 | }, 400 | new RankModel { 401 | Company= "T-Mobile US", 402 | Symbol= "TMUS", 403 | MarketCap= 167630000, 404 | Country= "USA", 405 | }, 406 | new RankModel { 407 | Company= "Prosus", 408 | Symbol= "PRX.VI", 409 | MarketCap= 165690000, 410 | Country= "Netherlands", 411 | }, 412 | new RankModel { 413 | Company= "Costco", 414 | Symbol= "COST", 415 | MarketCap= 163860000, 416 | Country= "USA", 417 | }, 418 | new RankModel { 419 | Company= "Novo Nordisk", 420 | Symbol= "NVO", 421 | MarketCap= 162260000, 422 | Country= "Denmark", 423 | }, 424 | new RankModel { 425 | Company= "Medtronic", 426 | Symbol= "MDT", 427 | MarketCap= 161130000, 428 | Country= "Ireland", 429 | }, 430 | new RankModel { 431 | Company= "McDonald", 432 | Symbol= "MCD", 433 | MarketCap= 160840000, 434 | Country= "USA", 435 | }, 436 | new RankModel { 437 | Company= "Unilever", 438 | Symbol= "UL", 439 | MarketCap= 160420000, 440 | Country= "Netherlands", 441 | }, 442 | new RankModel { 443 | Company= "Eli Lilly", 444 | Symbol= "LLY", 445 | MarketCap= 159180000, 446 | Country= "USA", 447 | }, 448 | new RankModel { 449 | Company= "Nextera Energy", 450 | Symbol= "NEE", 451 | MarketCap= 158930000, 452 | Country= "USA", 453 | }, 454 | new RankModel { 455 | Company= "Texas Instruments", 456 | Symbol= "TXN", 457 | MarketCap= 157110000, 458 | Country= "USA", 459 | }, 460 | new RankModel { 461 | Company= "SAP", 462 | Symbol= "SAP", 463 | MarketCap= 156750000, 464 | Country= "Germany", 465 | }, 466 | new RankModel { 467 | Company= "Tata", 468 | Symbol= "TCS.NS", 469 | MarketCap= 156350000, 470 | Country= "India", 471 | }, 472 | new RankModel { 473 | Company= "Shell", 474 | Symbol= "RYDAF", 475 | MarketCap= 155950000, 476 | Country= "Netherlands", 477 | }, 478 | new RankModel { 479 | Company= "AIA", 480 | Symbol= "AAIGF", 481 | MarketCap= 153920000, 482 | Country= "Hong Kong", 483 | }, 484 | new RankModel { 485 | Company= "Union Pacific Corporation", 486 | Symbol= "UNP", 487 | MarketCap= 147450000, 488 | Country= "USA", 489 | }, 490 | new RankModel { 491 | Company= "Honeywell", 492 | Symbol= "HON", 493 | MarketCap= 147370000, 494 | Country= "USA", 495 | }, 496 | new RankModel { 497 | Company= "Jingdong Mall", 498 | Symbol= "JD", 499 | MarketCap= 146600000, 500 | Country= "China", 501 | }, 502 | new RankModel { 503 | Company= "Shopify", 504 | Symbol= "SHOP", 505 | MarketCap= 145120000, 506 | Country= "Canada", 507 | }, 508 | new RankModel { 509 | Company= "SoftBank", 510 | Symbol= "SFTBF", 511 | MarketCap= 143310000, 512 | Country= "Japan", 513 | }, 514 | new RankModel { 515 | Company= "China Life Insurance", 516 | Symbol= "LFC", 517 | MarketCap= 142650000, 518 | Country= "China", 519 | }, 520 | new RankModel { 521 | Company= "Linde", 522 | Symbol= "LIN", 523 | MarketCap= 141920000, 524 | Country= "UK", 525 | }, 526 | new RankModel { 527 | Company= "Anheuser-Busch Inbev", 528 | Symbol= "BUD", 529 | MarketCap= 141810000, 530 | Country= "Belgium", 531 | }, 532 | new RankModel { 533 | Company= "Bristol-Myers Squibb", 534 | Symbol= "BMY", 535 | MarketCap= 141210000, 536 | Country= "USA", 537 | }, 538 | new RankModel { 539 | Company= "Amgen", 540 | Symbol= "AMGN", 541 | MarketCap= 138840000, 542 | Country= "USA", 543 | }, 544 | new RankModel { 545 | Company= "Keyence", 546 | Symbol= "KYCCF", 547 | MarketCap= 137430000, 548 | Country= "Japan", 549 | }, 550 | new RankModel { 551 | Company= "Wells Fargo", 552 | Symbol= "WFC", 553 | MarketCap= 137220000, 554 | Country= "USA", 555 | }, 556 | new RankModel { 557 | Company= "United Parcel Service", 558 | Symbol= "UPS", 559 | MarketCap= 136910000, 560 | Country= "USA", 561 | }, 562 | new RankModel { 563 | Company= "Morgan Stanley", 564 | Symbol= "MS", 565 | MarketCap= 136140000, 566 | Country= "USA", 567 | }, 568 | new RankModel { 569 | Company= "Citigroup", 570 | Symbol= "C", 571 | MarketCap= 136090000, 572 | Country= "USA", 573 | }, 574 | new RankModel { 575 | Company= "Astrazeneca", 576 | Symbol= "AZN", 577 | MarketCap= 135460000, 578 | Country= "UK", 579 | }, 580 | new RankModel { 581 | Company= "Bank of China", 582 | Symbol= "BACHF", 583 | MarketCap= 132660000, 584 | Country= "China", 585 | }, 586 | new RankModel { 587 | Company= "Philip Morris", 588 | Symbol= "PM", 589 | MarketCap= 129390000, 590 | Country= "USA", 591 | }, 592 | new RankModel { 593 | Company= "Sony", 594 | Symbol= "SNE", 595 | MarketCap= 127620000, 596 | Country= "Japan", 597 | }, 598 | new RankModel { 599 | Company= "Charter Communications", 600 | Symbol= "CHTR", 601 | MarketCap= 126790000, 602 | Country= "USA", 603 | }, 604 | new RankModel { 605 | Company= "Starbucks", 606 | Symbol= "SBUX", 607 | MarketCap= 124020000, 608 | Country= "USA", 609 | }, 610 | new RankModel { 611 | Company= "NTT Docomo", 612 | Symbol= "NTDMF", 613 | MarketCap= 122470000, 614 | Country= "Japan", 615 | } 616 | }; 617 | var redisClient = serviceScope.ServiceProvider.GetService().GetDatabase(); 618 | 619 | await redisClient.KeyDeleteAsync("*"); 620 | 621 | for (var i = 0;i< ranks.Count; i++) 622 | { 623 | var rank = ranks[i]; 624 | await redisClient.SortedSetAddAsync("REDIS_LEADERBOARD", rank.Symbol.ToLower(), rank.MarketCap); 625 | await redisClient.HashSetAsync(rank.Symbol.ToLower(), new HashEntry[] 626 | { 627 | new HashEntry("company", rank.Company), 628 | new HashEntry("country",rank.Country) 629 | }); 630 | } 631 | 632 | } 633 | } 634 | } 635 | -------------------------------------------------------------------------------- /BasicRedisLeaderboardDemoDotNetCore/ClientApp/dist/js/app.fadedebf.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/App.vue?7e02","webpack:///./src/components/Example.vue?8001","webpack:///./src/App.vue?6bf7","webpack:///./src/components/Example.vue?6574","webpack:///./src/components/RankSelectionModal.vue?82f5","webpack:///src/components/RankSelectionModal.vue","webpack:///./src/components/RankSelectionModal.vue?b764","webpack:///./src/components/RankSelectionModal.vue","webpack:///src/components/Example.vue","webpack:///./src/components/Example.vue?e0f6","webpack:///./src/components/Example.vue?baf6","webpack:///src/App.vue","webpack:///./src/App.vue?1160","webpack:///./src/App.vue?2667","webpack:///./src/plugins/vuetify.js","webpack:///./src/main.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","staticStyle","_v","staticRenderFns","model","callback","$$v","panel","expression","ACTION_LIST","method","companies","on","onUpdateRank","scopedSlots","_u","fn","ref","_g","rankForm","headers","loading","item","_s","rank","symbol","toUpperCase","company","formatUSD","marketCap","getCountryFlag","country","proxy","loadData","_e","_t","dialog","close","internalValue","$set","RANK_OP","AMOUNT_LIST","isValid","components","props","type","Array","watch","computed","op","amount","set","$emit","val","methods","component","VBtn","VCard","VCardActions","VCardText","VCardTitle","VDialog","VIcon","VSelect","VSpacer","RankSelectionModal","handler","immediate","created","usd","MILLION","VCol","VContainer","VDataTable","VExpansionPanel","VExpansionPanelContent","VExpansionPanelHeader","VExpansionPanels","VRow","Example","VApp","Vue","use","Vuetify","config","productionTip","vuetify","render","h","App","$mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAA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a,IAAiB,QAgBhC,IAAkB,EAAW,CAACyB,OAAA,KAAKC,QAAA,KAAMc,OAAA,KAAKC,aAAA,KAAWC,aAAA,KAAWC,kBAAA,KAAgBC,yBAAA,KAAuBC,wBAAA,KAAsBC,mBAAA,KAAiBf,QAAA,KAAMgB,OAAA,KAAKf,UAAA,OChB7J,OACE/F,KAAM,MACN2E,WAAY,CACVoC,QAAJ,ICtB8T,I,wBCQ1T,EAAY,eACd,EACA,EACA5E,GACA,EACA,KACA,KACA,MAIa,IAAiB,QAKhC,IAAkB,EAAW,CAAC6E,OAAA,O,gBCrB9BC,OAAIC,IAAIC,QAEO,UAAIA,OAAQ,ICD3BF,OAAIG,OAAOC,eAAgB,EAE3B,IAAIJ,OAAI,CACNK,UACAC,OAAQ,SAAAC,GAAC,OAAIA,EAAEC,MACdC,OAAO,S","file":"js/app.fadedebf.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Example.vue?vue&type=style&index=0&id=6d7466c0&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-app',{staticClass:\"mt-0\",attrs:{\"id\":\"app\"}},[_c('div',{staticStyle:{\"position\":\"absolute\",\"top\":\"-50px\",\"right\":\"0px\",\"width\":\"300px\"}},[_c('img',{attrs:{\"src\":\"https://redislabs.com/wp-content/uploads/2020/12/RedisLabs_Illustration_HomepageHero_v4.svg\"}})]),_c('div',{staticStyle:{\"height\":\"50px\"}}),_c('h1',{staticClass:\"text-center\",staticStyle:{\"color\":\"#444444\"}},[_vm._v(\"Redis Leadboard Demo\")]),_c('div',{staticStyle:{\"height\":\"50px\"}}),_c('example')],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{staticClass:\"example\"},[_c('v-row',{staticClass:\"mb-5\"},[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-expansion-panels',{attrs:{\"multiple\":\"\"},model:{value:(_vm.panel),callback:function ($$v) {_vm.panel=$$v},expression:\"panel\"}},[_c('v-expansion-panel',[_c('v-expansion-panel-header',[_vm._v(\"How it works?\")]),_c('v-expansion-panel-content',[_c('b',[_vm._v(\"1. How the data is stored:\")]),_c('ol',[_c('li',[_vm._v(\"The company data is stored in a hash like below: \"),_c('pre',[_vm._v(\"HSET \\\"company:AAPL\\\" symbol \\\"AAPL\\\" market_cap \\\"2600000000000\\\" country USA\")])]),_c('li',[_vm._v(\"The Ranks are stored in a ZSET. \"),_c('pre',[_vm._v(\"ZADD companyLeaderboard 2600000000000 company:AAPL\")])])]),_c('br'),_c('b',[_vm._v(\"2. How the data is accessed:\")]),_c('ol',[_c('li',[_vm._v(\"Top 10 companies: \"),_c('pre',[_vm._v(\"ZREVRANGE companyLeaderboard 0 9 WITHSCORES\")])]),_c('li',[_vm._v(\"All companies: \"),_c('pre',[_vm._v(\"ZREVRANGE companyLeaderboard 0 -1 WITHSCORES\")])]),_c('li',[_vm._v(\"Bottom 10 companies: \"),_c('pre',[_vm._v(\"ZRANGE companyLeaderboard 0 9 WITHSCORES\")])]),_c('li',[_vm._v(\"Between rank 10 and 15: \"),_c('pre',[_vm._v(\"ZREVRANGE companyLeaderboard 9 14 WITHSCORES\")])]),_c('li',[_vm._v(\"Show ranks of AAPL, FB and TSLA: \"),_c('pre',[_vm._v(\"ZSCORE companyLeaderBoard company:AAPL company:FB company:TSLA\")])]),_c('li',[_vm._v(\"Adding market cap to companies: \"),_c('pre',[_vm._v(\"ZINCRBY companyLeaderBoard 1000000000 \\\"company:FB\\\"\")])]),_c('li',[_vm._v(\"Reducing market cap to companies: \"),_c('pre',[_vm._v(\"ZINCRBY companyLeaderBoard -1000000000 \\\"company:FB\\\"\")])]),_c('li',[_vm._v(\"Companies over a Trillion: \"),_c('pre',[_vm._v(\"ZCOUNT companyLeaderBoard 1000000000000 +inf\")])]),_c('li',[_vm._v(\"Companies between 500 billion and 1 trillion: \"),_c('pre',[_vm._v(\"ZCOUNT companyLeaderBoard 500000000000 1000000000000\")])])])])],1)],1)],1)],1),_c('v-row',[_c('v-col',{attrs:{\"cols\":\"4\"}},[_c('v-select',{staticStyle:{\"background\":\"#FFF\"},attrs:{\"items\":_vm.ACTION_LIST,\"dense\":\"\",\"outlined\":\"\",\"hide-details\":\"\"},model:{value:(_vm.method),callback:function ($$v) {_vm.method=$$v},expression:\"method\"}})],1),_c('v-col',{staticClass:\"text-right\",attrs:{\"cols\":\"8\"}},[_c('rank-selection-modal',{attrs:{\"companies\":_vm.companies},on:{\"onUpdateRank\":_vm.onUpdateRank},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-btn',_vm._g({attrs:{\"color\":\"grey\",\"outlined\":\"\"}},on),[_c('v-icon',{staticClass:\"mr-2\"},[_vm._v(\"mdi-cog-outline\")]),_c('span',{staticStyle:{\"color\":\"#111\",\"text-transform\":\"initial\"}},[_vm._v(\"Update Rank\")])],1)]}}]),model:{value:(_vm.rankForm),callback:function ($$v) {_vm.rankForm=$$v},expression:\"rankForm\"}})],1)],1),_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-card',{staticClass:\"px-2\",staticStyle:{\"border-right\":\"10px\"}},[_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.companies,\"loading\":_vm.loading,\"disable-pagination\":true,\"hide-default-footer\":true},scopedSlots:_vm._u([{key:\"item.rank\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.rank)+\" \")]}},{key:\"item.company\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center py-2\"},[_c('div',[_c('img',{staticClass:\"mr-3 my-2\",attrs:{\"src\":(\"https://companiesmarketcap.com//img/company-logos/80/\" + (item.symbol.toUpperCase()) + \".png\"),\"width\":\"40\",\"height\":\"40\"}})]),_c('div',[_c('div',{staticStyle:{\"font-size\":\"1.1rem\"}},[_vm._v(_vm._s(item.company))]),_c('div',{staticClass:\"grey--text\",staticStyle:{\"font-size\":\"0.7rem\"}},[_vm._v(_vm._s(item.symbol.toUpperCase()))])])])]}},{key:\"item.marketCap\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{},[_vm._v(_vm._s(_vm.formatUSD(item.marketCap)))])]}},{key:\"item.country\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center\"},[_c('div',[_c('img',{staticClass:\"mr-1\",attrs:{\"src\":_vm.getCountryFlag(item.country),\"width\":\"20\"}})]),_c('div',{},[_vm._v(_vm._s(item.country))])])]}},{key:\"no-data\",fn:function(){return [_c('span',[_vm._v(\" No Results Found. \")])]},proxy:true}])}),(_vm.method === 'paginate')?_c('v-btn',{attrs:{\"color\":\"primary\",\"block\":\"\"},on:{\"click\":_vm.loadData}},[_vm._v(\" Load next 10 \")]):_vm._e()],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"transition\":\"dialog-bottom-transition\",\"max-width\":\"400px\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_vm._t(\"activator\",null,null,{ on: on, attrs: attrs })]}}],null,true),model:{value:(_vm.dialog),callback:function ($$v) {_vm.dialog=$$v},expression:\"dialog\"}},[_c('v-card',[_c('v-card-title',[_c('v-spacer'),_c('v-icon',{attrs:{\"aria-label\":\"Close\"},on:{\"click\":_vm.close}},[_vm._v(\" mdi-close \")])],1),_c('v-card-text',[_c('div',{staticClass:\"headline text-center mb-4\"},[_vm._v(\" Select the menus below to update the rank of the companies \")]),_c('v-select',{attrs:{\"items\":_vm.companies,\"item-text\":\"company\",\"item-value\":\"symbol\",\"placeholder\":\"Select a company\",\"dense\":\"\",\"outlined\":\"\"},model:{value:(_vm.internalValue.symbol),callback:function ($$v) {_vm.$set(_vm.internalValue, \"symbol\", $$v)},expression:\"internalValue.symbol\"}}),_c('v-select',{attrs:{\"items\":_vm.RANK_OP,\"placeholder\":\"Add or Subtract\",\"dense\":\"\",\"outlined\":\"\"},model:{value:(_vm.internalValue.op),callback:function ($$v) {_vm.$set(_vm.internalValue, \"op\", $$v)},expression:\"internalValue.op\"}}),_c('v-select',{attrs:{\"items\":_vm.AMOUNT_LIST,\"placeholder\":\"Select Amount\",\"dense\":\"\",\"outlined\":\"\"},model:{value:(_vm.internalValue.amount),callback:function ($$v) {_vm.$set(_vm.internalValue, \"amount\", $$v)},expression:\"internalValue.amount\"}})],1),_c('v-card-actions',[_c('v-spacer'),_c('v-btn',{staticClass:\"mb-4\",attrs:{\"color\":\"primary\",\"disabled\":!_vm.isValid},on:{\"click\":_vm.onUpdateRank}},[_vm._v(\" Update \")])],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RankSelectionModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RankSelectionModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./RankSelectionModal.vue?vue&type=template&id=67081f4c&\"\nimport script from \"./RankSelectionModal.vue?vue&type=script&lang=js&\"\nexport * from \"./RankSelectionModal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VCardTitle,VDialog,VIcon,VSelect,VSpacer})\n","\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Example.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Example.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Example.vue?vue&type=template&id=6d7466c0&scoped=true&\"\nimport script from \"./Example.vue?vue&type=script&lang=js&\"\nexport * from \"./Example.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Example.vue?vue&type=style&index=0&id=6d7466c0&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6d7466c0\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VExpansionPanel } from 'vuetify/lib/components/VExpansionPanel';\nimport { VExpansionPanelContent } from 'vuetify/lib/components/VExpansionPanel';\nimport { VExpansionPanelHeader } from 'vuetify/lib/components/VExpansionPanel';\nimport { VExpansionPanels } from 'vuetify/lib/components/VExpansionPanel';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\ninstallComponents(component, {VBtn,VCard,VCol,VContainer,VDataTable,VExpansionPanel,VExpansionPanelContent,VExpansionPanelHeader,VExpansionPanels,VIcon,VRow,VSelect})\n","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=65c68803&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VApp } from 'vuetify/lib/components/VApp';\ninstallComponents(component, {VApp})\n","import Vue from 'vue';\r\nimport Vuetify from 'vuetify/lib/framework';\r\n\r\nVue.use(Vuetify);\r\n\r\nexport default new Vuetify({\r\n});\r\n","import Vue from 'vue'\r\nimport App from './App.vue'\r\nimport vuetify from './plugins/vuetify';\r\n\r\nVue.config.productionTip = false\r\n\r\nnew Vue({\r\n vuetify,\r\n render: h => h(App)\r\n}).$mount('#app')\r\n"],"sourceRoot":""} --------------------------------------------------------------------------------