Giter Site home page Giter Site logo

muhelen / crosshare Goto Github PK

View Code? Open in Web Editor NEW

This project forked from crosshare-org/crosshare

0.0 0.0 0.0 10.48 MB

Crosshare is a free and ad-free community for crossword constructors and solvers

Home Page: https://crosshare.org

License: GNU Affero General Public License v3.0

TypeScript 98.56% Python 0.50% JavaScript 0.36% CSS 0.48% Dockerfile 0.09%

crosshare's Introduction

Twitter

Crosshare is a free community for crossword constructors and solvers. Crosshare is written in TypeScript using Next.js, React, and firebase.

Use GitHub issues for bug reports and feature requests.

Contributing

Contributions are very much encouraged! It's recommended that you comment on (or create) the relevant issue before starting work so that we don't have multiple folks duplicating efforts simultaneously. Once you're happy with your changes please submit a pull request describing the change, any concerns, etc. PRs that include tests for the changed behavior are much more likely to be swiftly merged.

If you're looking for good issues to start out on check the good first issue tag.

Developing Locally

Windows

Most of these instructions are written for unix-like OSes - folks have had success using Windows Subsystem for Linux to follow them on Windows, though.

Set up a new firebase project

Visit http://console.firebase.google.com/, click "add project" or "create a project". Use whatever name you'd like. You don't need to enable google analytics.

Set up authentication

Click "Build" in the side bar, then "Authentication". Click "Get started". Click on the "Google" sign-in provider and toggle to "Enabled". Use anything you like for public facing name and enter your email as the project support email. Click "Save".

Set up the database

Click "Firestore Database" in the side bar. Click "Create database". Choose "start in production mode" and any storage location.

Download credentials

Click the little gear icon in the side bar and select "Project settings". Scroll to the "Your apps" section and click "</>" to create a web app. Register an app using whatever name you'd like. You don't need to set up hosting.

Copy the const firebaseConfig = {...} lines from the Add Firebase SDK dialog that pops up and paste them into a new file at app/firebaseConfig.ts. Change const firebaseConfig to export const firebaseConfig. These are the credentials used by the Crosshare frontend.

Now click "Continue to console" and click "Service accounts" at the top of the Project Settings page. Under "Firebase Admin SDK" click "Generate new private key". Save the resultant file as serviceAccountKey.json in the root of this repository. This is the credential file for the Crosshare server.

Install dependencies

Crosshare is currently deployed on node 14 - on Fedora it's:

$ sudo dnf module install nodejs:14

We use yarn for package management:

$ sudo npm install --global yarn

Install dependencies:

$ cd app
$ yarn

Now you can run crosshare locally

While still in the app/ directory, connect to your firebase project:

$ npx firebase login
$ npx firebase use --add

Now deploy the firestore rules and indexes:

$ npx firebase deploy --only firestore

Compile the i18n definitions:

$ yarn compileI18n

Then start the server:

$ yarn dev

You should now be able to view Crosshare locally at http://localhost:3000

Note: The indexes you created with firebase deploy --only firestore can take a while to finish building. You might get related errors when viewing the site until they are done.

Wordlists

When running the constructor locally you'll get an error trying to download the word database. You can follow the instructions in the deployment guide to build and upload a version to your firebase app. (TODO - we should probably provide the wordlist (maybe not the clue db) pregenerated for developers, this is a lot of work)

Once the wordlist has been updated you need to update your cloud storage CORS settings so it can be downloaded in the browser. This stackoverflow post gives a step-by-step run down.

Running Tests

You'll need Java installed to run the firebase emulators. Once you've done the steps above to set up local development do:

$ yarn test

Credits

See the contributors on this repository and crosshare.org/donate.

License

Crosshare is licensed under the GNU Affero General Public License 3.

crosshare's People

Contributors

mdirolf avatar 1computer1 avatar glasser avatar ckolderup avatar dependabot[bot] avatar vadskye avatar technocrepe avatar

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.