example-react-project's Issues
Use Typescript for the API
Type checking would make the API more reliable and easier to test
Proper JSDoc documentation
The documentation on the code is below what I would want to push to production, but the majority of it is hopefully straightforward enough it documents itself*.
*I know this isn't true.
Improve MongoDB connections
At the moment a new connection is opened per request, this could be improved with pooling/sharing.
Also, lots of code is duplicated.
More comprehensive front end testing, including stubbing the back end
The front end testing is very basic
MongoDB connections do not close properly
This would be a pretty serious memory leak/bug in production.
Create a GitHub issue template
These issues are a mess, they should include steps to reproduce or a brief at least.
Re-do CORS implementation
It is very insecure at the moment: it does not check whether the referrer is allowed.
Pass errors through to the front end/user
At the moment any error will fail silently and the user is not notified. The UX would be significantly improved if the user knew what the error was or which field has failed validation.
Allow users to create an external config file
Containing external ports, database port, etc.
Break form validation out into a separate file
The form validation is all in the route module at the moment. It would be useful to have it as a separate module and to remove some duplication.
Add testing via HTTP
Using chai-http - https://www.chaijs.com/plugins/chai-http/
Add a logging helper
Use a more structured API
This could be done well using Lambda, or at least a framework to generate both the skeleton and an OpenAPI/Swagger definition.
Move the front end and API to separate repositories
If this were a commercial project, there would be at least two repositories.
More comprehensive back end testing, including stubbing the database
Alter the email regex to require a '.' in the domain
The current regex is technically correct, but we don't want to allow email addresses without a .
Improve the UX for the submit button to show what is incorrect/missing
The error handling on the front end is very basic.
Split the API routes into separate files
The routes are grouped by function, but would be better if they had a separate file per route and method.
Check the shape and contents of items returned from the database
At the moment anything that comes from the database is returned directly to the client. There should be some checking here.
Use proper code guidelines
Possibly AirBnB's style guide - https://github.com/airbnb/javascript
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.