Skip to content

Latest commit

 

History

History
271 lines (172 loc) · 10.3 KB

README.md

File metadata and controls

271 lines (172 loc) · 10.3 KB

Antilope

build style phpstan

Antilope is the name of this Sharable Network Tracker.

Alternatives names could be Argali or Urial as it refers to Gazelle, the main inspiration dor this project.

This isn't an app, but a tool allowing people to create their own networks and setting them up for each use case. Checkout the requirements to set up your own instance on a server.

It's built using PHP 7 and MySQL with Symfony 5 framework and Bootstrap 4 toolkit.


  1. Concept what is this strange network ?
  2. Setup how to install
  3. Development usefull tools for develpment thanks to n-peugnet

Concept

The whole idea behind Antilope, is to transpose the private tracker system to anything else but torrents. Sharables are the key concept of Antilope : they are a the unit of what you can share.

The classic question is : What can be shared through this system ?

And the classic answer is : what would you share ?

In fact, there are no categories defining what should or should not be a sharable. The only limitation of what can be shared or not is your imagination! Sharables are only defined by a set of parameters (place, date, consumability...) that are all optionals. Sharables are "managed" by at least one user. Those managers can precisely define how they relate to the sharable and how they want to manage it.

Antilope is designed to encourage the creation of small scale networks instead of massive ones. The main goals are :

  • to increase trust between users instead of violents rating system.
  • have the possibility to gamify life interactions.
  • have an half self-managed, half moderated user management.

References

How it works

Create a sharable

When you create a sharable you can setup a lot of meta infos :

  • name
  • description
  • details (markdown)
  • begin date (optional)
  • end date (optional)
  • place* (optional)
  • consumability* (if the sharable is something that can only be shared a certain amount of times)
  • visibility (optional : above which user class does users can access the sharable)
  • contact method (see Managing and contact method)

*: todo

Managing and contact method

There can be any number of users managing the same sharable, that way they will all receive the same amount of share points during validation process.

A contact method must be chosen for every sharable between this four strategies :

  1. no contact : no contact infos are given with the sharable.
  2. automatic : when an user is interested by a sharable, contact infos are exchanged.
  3. manual : when an user is interested by a sharable, contact infos are exchanged after interested users have been manually reviewed by a manager.
  4. never : Only interested user contact infos are send to managers.

The methods go from less protection to maximum managers protection. As you are sharing, you are always able to be more protected.

Search and Discover

Depending on how user classes have been set up, users can search through the database of sharable using differents views :

  • list search
  • map*
  • calendar*

*: todo

Interest

First step to benefit from a sharable is to indicate that you're interested. After that depending on the sharable contact method, contact infos are exchanged.

Validation

The validation system is there to avoid violent rating system. As you can only validate a sharable and add a message like in a guestbook, you can only express criticism using words. You can't just put a 1/5 stars without explaining why.

Validation can only occur after the being interested in a sharable and that contact infos have been exchanged.

But if there is a real problem with a sharable, user could report it. Depending on the report subject, this will be handled by the managers or moderators.*

*: todo

User Class system

One of the most efficient way to increase gamification in a network is to implement an user class system. They allow or disallow users to share or access sharables, invite users... And the user classes can be triggered by many parameters such as the share score, account age, number of validations the user gave...

Share Score

The share score is the system that try to give an indication of how much an user has participate in the network. Unlike private trackers, that can precisely mesure torrents ratio, it's impossible and absurd to have a correct quantification of how much have been shared between users. But still, share score is there as the only indicator possible, and can be used for user class promotions, this is how it works :

Every time an user validate a Sharable, every user managing it win an amount of points, based on :

  • validating user class (higher user rank give more points)
  • the amount of validation already given for this sharable (first validations give more points)
  • divided by the number of managers

Interface

interface

Setup

Requirements

For now, the only way to install Antilope is using git and composer.

  • Apache
  • PHP 7.4
  • MySQL
    • MariaDB 10.2+
    • MySQL 8.0.1+
    • PostgreSQL 8.4+
    • SQLite 3.8.3+

Install

Install via git clone.

git clone https://github.com/vincent-peugnet/antilope <APP_DIRECTORY>

Go into your app_directory folder.

Setup database connexion using .env files. see symfony documentation.

By default SQLite 3 will be used in DEV environment but incremental migration mode won't work.

Then run composer

composer install

Some questions will be asked to set your app parameters. You can press enter many times to set those as default and change them later in the paramaters.yaml file.

Create the database

bin/console doctrine:database:create

Migrate the migrations

bin/console doctrine:migration:migrate

Create the first user Class

bin/console app:userclass

Then you will have to create your first user. Verify that app.openegistration is set to true, and access sign up at /signup to register.

To toogle admin privilege on a user, you'll need it's user ID. Navigate to an user profile page and get the number like this /user/<USER_ID>/show. Then, use the following command:

bin/console app:admin

Email

Edit your .env file as defined in symfony's DSN protocol.

Then you can use the following command to send a test mail, just to be sure you've set everything up alright.

bin/console app:mail <your-email-adress>

Global parameters

Default global parameters are generated interactively during composer install command.

  • app.open_registration (bool) Allow free sign up, disable the invite code system
  • app.user_limit (int) Max user limit. If this number is reached, registrations are closed
  • app.invitation_duration (int) Duration of invite code before it expired (in hours)
  • app.last_activity_delay (int) Time of user lastActivity refresh (in minutes)
  • app.contact_forget_delay (int) Time before a contact is not visible anymore (in hours)
  • app.contact_edit_delay (int) Time before a contact is not editable anymore (in minutes)
  • app.min_tag (int) Minimum number of tag per sharable (0 is none)
  • app.max_tag (int) Maximum number of tag per sharable (0 is none)
  • app.bootswatch_theme (string) Name of the Bootswatch theme to load (in lowercase)

Administration

Inactivity pruning

Users are automatically disabled if they login after too much time according to their user class, but you can also manually trigger a full check using this command:

bin/console app:inactivity [--dry]

Pass the --dry option to launch a dry run, this will tell you how many users need to be disabled because of inactivity.

Deployment

It is possible to automatically deploy the application on a remote server using the command bin/console deploy. For this to work correctly you will have to set the following environment variables correctly on your local machine:

[email protected]
DEPLOY_DIR=/absolute/path/to/antilope
[email protected]:vincent-peugnet/antilope.git
DEPLOY_REPOSITORY_BRANCH=main   # optional
DEPLOY_WEBSERVER=apache         # optional
DEPLOY_COMPOSER_PATH            # optional

The directory DEPLOY_DIR will have to be created on the remote and a .env.local file must be created inside with the correct variables.

In order to fix a symlink bug with Liip Imagine Bundle, you need to specify:

LIIP_PUBLIC_PATH="../../shared/public"

Development

Run checks

composer check

Fix basic check errors

composer fix

Run the dev server

bin/console server:start

Generate migrations for sqlite

bin/console doctrine:migrations:diff --db-configuration sqlite

Translation

Translation checking tools CLI.

bin/console translation:missing       # check missing strings for fallback locale (en)
bin/console translation:missing --all # check missing strings for all locales
bin/console translation:extract       # extract missing string for fallback locale (en)
bin/console translation:extract --all # extract missing string for all locales