Skip to content

Set up project

Vasily Vasilyev edited this page Mar 8, 2022 · 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 is 6.0 for all projects. Version of C# is 10.0.

You can install all dependencies using NuGet package manager.

Installation guide

.NET 6

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

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

Database

ProjectV uses database to store some intermediate data during appraising. However, for now it was completely disabled. We have plans to continue on working with DB in the future thought.

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 ApiOptions class but some values can be placed in other "ApiOptions" 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

Web-services

ProjectV has three ways of communication with user:

Communication web-service is public gateway for all input request from clients. Client sends request to communication service. Then communication serivce requests pipeline config from configuration web-service. Then communication sends all the data and pipeline config to the processing web-service. Processing web-service is like the core of ProjectV solution. It creates pipelines based on config and processes all requests. When all the work is done, communication service sends back result to the client.

For users

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.