Giter Site home page Giter Site logo

srobinson / unicode-wiki Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 0.0 132.02 MB

A fully indexed, browsable and searchable unicode explorer with wikipedia integration

License: MIT License

JavaScript 0.68% TypeScript 82.82% HTML 12.65% CSS 1.36% Shell 2.49%
react redux react-router-v4 styled-components mongodb mongoose elasticsearch elk gcloud kubernetes

unicode-wiki's Introduction

Build Status

Unicode browser with wikipedia integration

Motivation

unicode.wiki is a fully indexed, browsable and searchable dictionary of unicode characters spanning the basic and supplementary unicode planes. The project attempts to render all codepoints using sourced fonts, however in some cases you will see either a blank rendering or the missing glyph character ๐žธ. Integration with wikipedia.org is implemented though the https://en.wikipedia.org/api/rest_v1 page api and https://en.wikipedia.org/w/api.php search api. Not all codepoints have a wiki page.

The idea behind the project has been lurking inside me for some years now, and was born out of an interest in unicode, World travel and the origin or languages.

I also wanted to experiment with a monorepo and decided to use this as a means of testing out Lerna and yarn workspaces. The exercise has taught me a great deal and I will be sharing my discoveries an upcoming blog.

References:

Project features

  • Indexed and searchable dictionary of unicode characters spanning the basic and supplementary planes sourced from http://www.unicode.org/Public/UCD/latest/
  • Browsable codepoints categorized following the unicode charts spec http://www.unicode.org/charts
  • Integration with wikipedia.org via api's
  • Responsive, mobile first design allowing easy browsing from any device

Core technology used

Disclaimer

This project is very early beta stage and serves as a proof of concept/exploration of Lerna monorepos and continuous integration with Travis and GKE. Should you discover any bugs please do create an issue/pr.

Deployment Description

The project consists of a web app, 3 core services and an apollo graphql server:

  • uw-app: React/Redux/Typescript web app
  • uw-api: Node/Express/Mongo REST API serving unicode meta data
  • uw-search-service: Node/Express/Elasticsearch REST API serving typeahead functionality
  • uw-wiki-service: Node/Express/Wikipedia API integration serving wiki pages and search results
  • uw-api-graph: Apollo Server/GraphQL client - act as an API gateway between client/service service/service

Other packages include:

  • uw-components: React component lib
  • uw-containers: Connected redux containers
  • uw-domain: Typescript object model
  • uw-hoc: React higher order component lib
  • uw-logging: Common logging lib
  • uw-seed: Parses UCD docs and populates Mongo/Elasticsearch
  • uw-store: Redux store/actions/reducers
  • uw-utils: Common utils lib

Commits are linted pre commit using husky to ensure a consistent messaging. commitizen is used to facilitate generating semantic-versioning commit messages.

PR branches are built/tested on Travis. Merges to master kicks off a versioning process and rolling deployments to GKE.

Local dev installation

If you already have mongo and elasticsearch running locally, skip ahead..

To quickly get a mongo/elasticsearch environment up and running

./compose.sh up

compose.sh up will install and make available the following containers:

  • mongo on localhost:27017
  • elasticsearch on localhost:9200
  • kibana on localhost:5601
  • logstash on localhost:5000

Edit compose.sh if you do not want/require kibana/logstash

  docker-compose \
    -f ./.docker-compose/mongo.yml \
    -f ./.docker-compose/elastic-search.yml \
    -f ./.docker-compose/kibana.yml \
    -f ./.docker-compose/logstash.yml \

To cleanup when you are done:

# shut down composed services
./compose.sh down

Starting the services

If you are not running mongo/elasticsearch on the following ports, update the config in .env

  • mongo: 27017
  • elasticsearch: 9200
# compile the source
yarn bootstrap

# run the web app/api server
yarn dev

# if you want to make edits with live reload
yarn watch

# alternatively run the production server
yarn start

# seed the dbs
# one time operation - seed data is persisted to disk
yarn seed

That's all for now... Comments/questions welcome. Thank you for reading.

unicode-wiki's People

Contributors

paulmillr avatar srobinson avatar travis-alphab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

unicode-wiki's Issues

prepare deploy script for CI

  • determine version numbers from oao
  • re-build packages image if different from local
  • separate build/push/deploy stages
  • only deploy services that have changed or whose deps have changed

Create a CI pipeline with Travis

  • configure travis.yml
  • standardize commit messages following cz-conventional-changelog guidelines
  • lint messages pre commit
  • determine what service(s) require deploying to stage
  • deploy to stage

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.