Verdinjoshua26 / client

WorksHub's frontend application

Home Page:https://www.works-hub.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WorksHub

This repo contains the WorksHub frontend code. This is the same code that powers the https://www.works-hub.com/ website.

The WorksHub technical stack

WorksHub frontend is written in ClojureScript, using re-frame. It communicates with the server using GraphQL.

The open API server

Our server code remains proprietary, and you’re not supposed to be running an instance of it on your machine. Instead, we have set up an open-access API server for your locally running code to use: it is available at https://works-hub-api.herokuapp.com.

Please note that this server only handles API requests and is not by itself a fully-fledged WorksHub instance. If you try to visit it with your browser, you’ll see the message informing you of this.

Please also note that the WorksHub API server is an isolated environment, shared by everyone. It does not and should not store any data about real people, companies and other entities. As a developer, you are responsible for the data you submit to the API server. WorksHub disclaims any responsibility for the data stored therein, to the fullest extent of applicable law.

There are three predefined users, identified by emails:

  • admin@example.com - an administrator,
  • candidate@example.com - a candidate user,
  • company@example.com - a company user.

Anyone can log in as any of these users (there’s no need to check emails in dev mode). Everything is editable. If you need to reset these accounts (or the predefined jobs or blogs), hit the /api/reset-fixtures endpoint of the API server.

Getting started

It is very easy to start hacking on WorksHub frontend. You only need NPM and Leiningen.

The first time you prepare to run the app, you need to run

npm install

From then on, any time you want to run the app itself, run

lein repl
> (do (require 'wh.server) (wh.server/start-server))

to start simple Ring server. Next start watching ClojureScript files with:

npm run dev

Now point your browser to: http://localhost:3449 and you should see the WorksHub UI.

(If you're curious, we're using shadow-cljs to watch and compile our frontend. Fell free to run shadow server by yourself and access shadow-cljs Inspect. We have globally available tap> in our code. It also means that you can freely install any npm packages with npm install and require these in code. Go crazy!)

Now, after a refresh, you should see the landing page.

Click Login → Send Magic Link and enter candidate@example.com. You will be logged in immediately.

Please refer to CONTRIBUTING.md for information about how to submit pull requests.

FAQ

What good is the source code of just the frontend if I don’t have the backend?

Perhaps:

  • You’re new to ClojureScript or re-frame and want to play around with the code of a real app deployed in production.
  • You are registered with WorksHub and have some problem with our app that you’re willing to try fixing.
  • You are registered with WorksHub and interested in working for us. It is definitely a good idea to take a look at our code in this case!
  • You are Richard Stallman and refuse to run non-free JavaScript in your browser.

How does versioning work? Or building Maven artifacts?

We don’t put version numbers on the client code. The way we’re building it for the real WorksHub instance is we have a master repo (containing server code and a master project.clj) which is automatically kept in sync with this repo. This is also why we don’t directly merge the PRs made against this repo: instead, the corresponding commits are made against the master repo and synced back to this one.

Any tests?

None yet. We do have integration tests, but they run in a dedicated environment and there’s no easy way for us to open-source them. We do have that on our roadmap, though.

I’ve reloaded my browser and I need to log in again!

That’s expected for now. It may change in the future.

Logging in via GitHub does not work!

That’s expected too. Use logging in by emails.

I have another question...

File an issue on GitHub. We also tend to hang out on Clojurians Slack in the #workshub channel.

Attributions

This list is incomplete:

License

Copyright © WorksHub

Distributed under the Eclipse Public License, the same as Clojure.

About

WorksHub's frontend application

https://www.works-hub.com

License:Eclipse Public License 2.0


Languages

Language:Clojure 78.1%Language:Sass 13.6%Language:JavaScript 7.4%Language:CSS 0.7%Language:HTML 0.2%Language:SCSS 0.1%