Skip to content

erral/kontrata-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kontrata-react

This project is the frontend search engine to kontrata a tool to provide an easy way to search for contracts published at the Basque Public Administration Public Contracts Platform (REVASCON).

This project has been inspired by @JaimeObregon and contratoscantabria.es screenshot

Dependencies

This project uses @appbaseio/reactivesearch a simple way to build a faceted search on data indexed in Elastic

Elastic

You need to have an Elastic server with all the required contracts already indexed there. Have a look at kontrata-docker a docker-compose based repo with the elastic installation.

While I figure how to configure CORS, you may need to use a browser extension to by-pass CORS. I use CORS Unblock for Chrome.

By default this app will try to connect to a elastic running in localhost:9200. If you want to change this, you can do it setting an environment var:

export REACT_APP_ELASTIC_HOST=10.0.0.5 && yarn start

You also have the following environment vars to customize this behavior:

  • REACT_APP_ELASTIC_HOST
  • REACT_APP_ELASTIC_PORT
  • REACT_APP_ELASTIC_SCHEME

Work In Progress

This is a Work In Progress. I am not proficient neither in React nor in JavaScript/TypeScript. This has been mainly a copy-and-paste based development.

PRs will be welcomed.

When I have something relevant, I may publish it in a website.

Available Scripts

Install the dependencies, you can run:

yarn

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn i18n

Extracts all translatable texts from code and writes the defaultMessage into en.json language, updating with empty string into the eu and es languages.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

yarn build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

License

GPLv3

About

Search engine of public contracts in the Basque Country

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •