Giter Club home page Giter Club logo

tinyfaces's Introduction

TinyFaces πŸ‘¦πŸΌπŸ‘¨πŸΎπŸ‘©πŸ»

Tiny Faces is a free crowd-sourced avatar gallery to use in your personal or commercial projects

Also check out our Figma Plugin and Sketch Plugin

🦾 API

Endpoints

Query

  • quality : Filters the result(s) to lower or higher quality images by using a value from 0 to 10.
  • gender : Possible values for gender can be found in Gender.swift
  • limit : To limit how many results you get back by using a value of 50 or lower. Only works with the data endpoint. When mixed with gender this could return less than n results.

Limitations

  • Max requests per hour per IP address: 60
  • When you've reached your limit you'll receive an error response with status code 493

πŸŽ’ Before building (dependencies)

  • Install Xcode
  • Install Vapor Toolbox
  • Install Docker Desktop
  • Run docker-compose up db or ./Launch.sh
  • Run Package.swift using Xcode
  • Change your Xcode working directory to your root folder: Schemes > TinyFaces > Edit Scheme > Run > Options > Working Directory > [x]
  • Add a .env file to the local root directory this should have the values below:
STRIPE_SECRET_KEY=
STRIPE_PUBLISH_KEY=
STRIPE_PRICE=
STRIPE_WEBHOOK_SECRET=
CLOUDFLARE_ACCOUNT_IDENTIFIER=
CLOUDFLARE_ACCOUNT_HASH=
CLOUDFLARE_IMAGES_KEY=
CLOUDFLARE_BEARER_TOKEN=
URL=https://tinyfaces.ngrok.io

Sadly we can't share our Thumbor setup and therefore you need to run a instance yourself for this to work.

🚧 Building

  • Run the Run target in Xcode
  • The first time this can take a long time because it will seed the database with random first names and last names.
  • The application should now be running on http://localhost:8080

If you want to test Stripe webhooks you set the run a ngrok proxy and make sure you set the correct STRIPE_SECRET_KEY, STRIPE_PUBLISH_KEY, STRIPE_WEBHOOK_SECRET and STRIPE_PRICINGTABLE_ID in .env

ngrok http -subdomain=tinyfaces 8080 > /dev/null &

πŸ’Ÿ Heroku:

  1. In the project directory: heroku create --buildpack vapor/vapor
  2. Deploy using git push heroku master or setup continues deployment in Heroku.
  3. For logs use command heroku logs
  4. Make sure you fill in all Config Vars on Heroku, see the snippet below:
URL = https://tinyfac.es
MYSQL_URL =
PORT =
THUMBOR_URL=URL
THUMBOR_KEY=ABCDEFG
STRIPE_SECRET_KEY=
STRIPE_PUBLISH_KEY=
STRIPE_PRICINGTABLE_ID=
SWIFT_BUILD_CONFIGURATION = release

πŸ“– Documentation

Visit the Vapor web framework's documentation for instructions on how to use this package.

tinyfaces's People

Contributors

louisdh avatar maximedegreve avatar yavorpunchev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tinyfaces's Issues

Is the API supposed to be public?

I'm trying to test the example on the website but I'm getting an error regarding cross origin requests not being enabled.

XMLHttpRequest cannot load https://tinyfac.es/api/users. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.

Feature request: Allow hotlinking directly to the images via URLs?

I'm generating about 100 people to construct a fake family tree. I'll handle all the names, and other data, but I'm missing images. I don't have any javascript on the site yet, it's a pure backend app. The easiest way to integrate this would be to via a direct URL.

Would it be possible to access only the images of tinyfac.es via URL?

The URLs seem to be https://tinyfac.es/data/avatars/344CFC24-61FB-426C-B3D1-CAD5BCBD3209-200w.jpeg

But the UUID is unique for each image, and can't be created by me I guess?

Would you be open to chaning that ID to be a simple increasing number, so I can hotlink images from my app?

Is your API down?

I use Dio().get('https://tinyfac.es/api/users') and receive
Unhandled Exception: DioError [DioErrorType.DEFAULT]: SocketException: OS Error: Connection timed out, errno = 110, address = tinyfac.es, port = 46874
It means timeout.

WebSite SSL certificate just expired :(

Hi, just checked that the certificate for HTTPs requests expired 😒. Just wanted to point it out, bc I was using it for a demo and my avatars are all gone πŸ˜…

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.