Skip to content

Set up project

Vasily Vasilyev edited this page Jul 18, 2020 · 35 revisions

ProjectV set up guide

Note: this page are actual only for master branch. Other branches can have own dependencies which are not covered by this guide.

Content:

Dependencies

Target .NET Standard is 2.1 for libraries, .NET Core is 3.1 for web services and for desktop app. Version of C# is 8.0.

You can install all dependencies using NuGet package manager.

Installation guide

.NET Core

Download and install .NET Core 3.1. Feel free to install any minor version of .NET Core but we recommend to use .NET Core SDK latest version that is compatible with Visual Studio 2019.

Note: also this .NET Core SDK allows you to create .NET Standard libraries.

Note 2: if you change ports and addresses of .NET Core projects, do not forget to also change same options in App.config files (Core, Configuration).

Database

ProjectV uses MS SQL database to store some intermediate data during appraising. That means you should install Microsoft SQL Server. You can install any edition that you want but we use MS SQL Server 2017 Express. All instructions can be found here.

After installation you should create database with name "ProjectV" and run SQL script from folder:

Then specify your connection string (i.e. node which key is "ConnectionString" and value is content of connection string, example you can see here) in files:

Note: we recommend to install SQL Server Management Studio because it actually makes it much easier to work with MS SQL Server.

Google Drive

One of option to load user data is Google Drive. We use OAuth 2.0 Protocol to interact with it. You should read instructions how to acquire client IDs and secrets here. Choose "Installed application client IDs" and follow the steps. When you get credentials download it as json-file and rename to "credentials.json". Put this file to:

Finally, when users (or you during debugging) connect to Google Drive at first time they should enter their account login and password and allow ProjectV app use files from Google Drive if they want to load data from Google Drive directly.

Environment variables

Depends on what services you want to use, almost always you need to get API keys/tokens for them. All keys and tokens set as environment variable value with key "ProjectV" (we are going to add other ways to configure service later). Further you can find some instructions how to get credentials for some of the services with which the ProjectV can interact.

You should set environment variable for project on your machine. Variable name (key) is "ProjectV", variable value is depend on services and should separate from each other by ";" symbol. Example of some services keys/tokens format (for Windows): "BotToken=YOUR_BOT_TOKEN;TmdbApiKey=YOUR_TMDB_API_KEY;OmdbApiKey=YOUR_OMDB_API_KEY;SteamApiKey=YOUR_STEAM_API_KEY".

Note: you also can set almost variables in Options class but some values can be placed in other "Options" classes (e.g. you can set bot token in BotConfiguration class and so on).

Settings for Telegram bot service

If you want to use Telegram bot as one of the ProjectV means of communication with the user, you should create bot and set token in environment variable values (remember that variable name (key) is "ProjectV"). Official guide how to create bot and get token. Example: "BotToken=YOUR_BOT_TOKEN".

Next step is set Webhook because it is the way in which Telegram sends notifications and other messages to ProjectV services. Full instruction you can read here.

Note: in addition, Telegram is banned in some countries. So you should configure your VPN or Proxy to get around the lockdown (now we does not support such option).

TMDB service

For movie and series processing ProjectV can use TMDB service. Official introduction guide you can read here. Also you should set your API key in environment variable values (remember that variable name (key) is "ProjectV"). Example: "TmdbApiKey=YOUR_TMDB_API_KEY".

Note: please, do not forget that such services as TMDB (or OMDB) have own limits on API calls per day or month. More information you can read in official resources of services that you use in ProjectV.

OMDB service

Other way to work with movie and series for ProjectV is OMDB. Official guide you can read here. Set your API key in environment variable values (remember that variable name (key) is "ProjectV"). Example: "OmdbApiKey=YOUR_OMDB_API_KEY".

Steam

It is important to mention that ProjectV do not use Steam API key for API calls because Steam allows some calls without specifying key. But if you want to use all opportunities of Steam API, which is not officially documented by the way, you should get API key. Instructions you can find here. Set your API key in environment variable values (remember that variable name (key) is "ProjectV"). Example: "SteamApiKey=YOUR_STEAM_API_KEY".

Launch

ProjectV has three ways of communication with user:

Desktop app and Telegram bot service cannot appraise data and used for data visualization. They send requests to ProjectV Web services and process responses. On the other hand, Console app uses ProjectV Libraries directly (at this moment). That is why you should launch desktop app and Telegram bot service with Web services but Console can be started without other services.

Clone this wiki locally