All Projects → pclubiitk → puppy-love

pclubiitk / puppy-love

Licence: MIT license
A cryptographically secure couple matching platform with strong guarantees

Programming Languages

TeX
3793 projects
typescript
32286 projects
go
31211 projects - #10 most used programming language
HTML
75241 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to puppy-love

tech1-temple-javascript
JavaScript Proofs of Concepts repository. No Longer Supported
Stars: ✭ 61 (+0%)
Mutual labels:  angular2
Convenience
.NET Core 5/Angular11/NG-ZORRO 权限管理系统 工作流系统
Stars: ✭ 74 (+21.31%)
Mutual labels:  angular2
ng2-gridstack
A gridstack component for Angular2+
Stars: ✭ 12 (-80.33%)
Mutual labels:  angular2
Love-Calculator
Let's Calculate love with real data. Love Calculator by Mohammed Cha
Stars: ✭ 54 (-11.48%)
Mutual labels:  love
ng2-right-click-menu
Right click context menu for Angular 2+
Stars: ✭ 51 (-16.39%)
Mutual labels:  angular2
ng2-stompjs-demo
Angular 2 demo using stomp.js in Typescript
Stars: ✭ 42 (-31.15%)
Mutual labels:  angular2
ngx-tabset
A very simple library to let you create some tabs
Stars: ✭ 19 (-68.85%)
Mutual labels:  angular2
angular-preloading-strategies
A demo of custom preloading strategies with Angular
Stars: ✭ 13 (-78.69%)
Mutual labels:  angular2
ngx-signalr-hubservice
Makes using SignalR in Angular 2/4 easy
Stars: ✭ 24 (-60.66%)
Mutual labels:  angular2
angular2-node-fb-login
Demo application that shows how to enable Facebook login with Angular 2 on frontend and Node.js/Express on backend
Stars: ✭ 55 (-9.84%)
Mutual labels:  angular2
book-monkey2
🐵 Demo-Projekt zum Buch (1. Auflage)
Stars: ✭ 36 (-40.98%)
Mutual labels:  angular2
nativescript-ng-shadow
Angular directive to apply shadows to native elements according to the elevation level guidelines of material design specification
Stars: ✭ 54 (-11.48%)
Mutual labels:  angular2
ngx-redux-core
The modern redux integration for Angular 6+
Stars: ✭ 32 (-47.54%)
Mutual labels:  angular2
nativescript-ng2-drawer-seed
Nativescript template project with drawer support
Stars: ✭ 17 (-72.13%)
Mutual labels:  angular2
NG2-Admin-Asp-Core-Boilerplate
Multi API Admin panel developed on ASP.NET Boilerplate, Bootstrap 4, and Angular2 (typescript). For frond-end theme is used ng2 admin theme.
Stars: ✭ 31 (-49.18%)
Mutual labels:  angular2
ng-observe
Angular reactivity streamlined...
Stars: ✭ 65 (+6.56%)
Mutual labels:  angular2
love-repl
Magic-free in-game REPL for the Love game engine
Stars: ✭ 37 (-39.34%)
Mutual labels:  love
material-todo
Angular Material Design Todo App
Stars: ✭ 27 (-55.74%)
Mutual labels:  angular2
typesafe-i18n
A fully type-safe and lightweight internationalization library for all your TypeScript and JavaScript projects.
Stars: ✭ 1,227 (+1911.48%)
Mutual labels:  angular2
YOP
Year Of Programmers: 개발자 회고록 아카이브
Stars: ✭ 42 (-31.15%)
Mutual labels:  angular2

Puppy Love

The modern and better avatar of Programming Club's puppy-love.

Puppy Love is a platform for shy people to reach out anonymously to their crush. They can sign up and mark up to 4 of their crushes. On Valentine's day, the platform will match them anonymously, and will inform them if both of them like each other.

Used in IIT Kanpur from 7th to 14th February, 2017, witnessing 1800+ registrants.

alt tag

Algorithm designed from the ground up, with a completely secure computation model which guarantees the following:

  • The identities of your choices are never, ever, exposed in plain text. Not even at the server.
  • The server, even while matching couples, can not know what the choices were.
  • The other person will only know whether you liked him/her or not if that person liked you as well.
  • The server will know whether you matched with some person or not, but no more.
  • The above guarantees are independent of the code running on the server, and can be verified on the browser.

Blog posts describing the algorithm:

Implementation using:

  • Golang (iris)
  • TypeScript
  • Angular2
  • Bootstrap
  • Docker
  • Docker Compose

Requirements

  • golang
  • NPM
  • Nginx
  • Docker

Installation / Setup

Server deployment

It is really easy. Like, really.

# You need docker-compose 1.10 or higher.
# Use the release script version from their website for installation.
docker-compose up

# Use the following to stop a container
docker-compose stop <container_name>

# Use the following to start a container
docker-compose start <container_name>

# Use the following to recreate and run a container
docker-compose up -d <container_name>

Development environment setup

You shall need docker, golang, nodejs, nginx and npm for the following steps.

Note: Arch users often have gccgo installed. Please use the package go from the main repositories instead.

mkdir -p $HOME/go/src

# Change .bashrc to .zshrc depending on your shell
echo "export GOPATH=$HOME/go:$GOPATH" >> $HOME/.bashrc
source $HOME/.bashrc

Get the source code.

You can later symlink the following folder into a convenient location. Just make sure that the actual folder (not symlink) is in the go directory.

git clone https://github.com/pclubiitk/puppy-love $HOME/go/src/github.com/pclubiitk/puppy-love

Install glide We use glide to maintain dependencies. go get is not recommended.

curl https://glide.sh/get | sh
cd $HOME/go/src/github.com/pclubiitk/puppy-love

Set up nginx

sudo cp puppy.nginx.conf /etc/nginx/sites_enabled/

Edit /etc/hosts file

# Map dev.puppy.pclub.in to 127.0.0.1
# It should have a line saying:
# 127.0.0.1 <something> <more> dev.puppy.pclub.in

Get the essential dockers

sudo systemctl start docker
docker run --name puppy-redis -p 6379:6379 -d redis
docker run --name puppy-mongo-db -p 27017:27017 -d mongo 

# Optional (in place of the above command):
# docker run --name puppy-mongo-db -p 27017:27017 -v $HOME/.mongodata:/data/db -d mongo 

Get dependencies for backend

glide install

Get dependencies for frontend

cd views
sudo npm install -g yarn
yarn install

Run services

sudo systemctl start nginx

# These are not required if you just finished the above steps
docker start puppy-mongo-db
docker start puppy-redis

Run puppy-love

Frontend

# Run frontend (inside folder views)
yarn start

# IFF production, use
yarn build && python -m http.serve 8091

Backend

# Build (inside puppy-love folder)
go build

# Optional: These are needed for email verification to work
export EMAIL_USER=<your_iitk_username>
export EMAIL_PASS=<your_iitk_email_password>
./puppy-love

Setting up basic services

Log in

You should first log in as admin. A simple way to do that is the following:

cd scripts
. ./login.sh admin passhash
# Use curl / http normally, but use $CADMIN cookie at the end of your command
# Example: http get 'localhost:3000/admin/...' $CADMIN

Add a user

Note: This requires you to be logged in as $CADMIN

cd scripts
./newuser.sh
# Follow the commands
# For testing, use your own IITK email address for all users

Set up compute table

Do this AFTER setting up all users. Whenever you add a new user, this has to be run.

http get 'localhost:3000/compute/prepare' $CADMIN

Using the frontend

Once you've created the users, you will need to register them. Open the UI at dev.puppy.pclub.in, and go to signup. You can only register for users which you have created. Get your auth token via email, and then fill up the remaining fields.

Notes

  • You cannot login as admin on the frontend UI.
  • You can also check mongoDB's data for the auth token for the user.
  • Doing the above will mandate marking the user as non-dirty in the MongoDb users table manually.

You can open the local website at dev.puppy.pclub.in The backend will be listening on the printed port number.

Contributors

The following people have contributed to this project in various capacities:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].