A ready to use boilerplate solution for user registration, authentication, profile editing and reserved area using Netuno, JWT, ReactJS and Ant Design.
Clone this project to (Netuno Root directory)/apps/react_auth/
.
Then install the NPM dependencies by running
npm install
in the react_auth/website/
directory.
The following process is oriented to Linux development environments with a few notes also destined to Microsoft Windows development environments.
-
Copy the app sample configuration file by running (in the app root directory):
-
cp config/sample.json config/_development.json
(for a development environment) -
cp config/sample.json config/_production.json
(for a production environment)
and adjust the
_development.json
and/or_production_.json
file accordingly to your environment. -
-
You'll need to configure an SMTP connection for the password recovery feature to function properly, learn how to do it here.
-
You'll need to configure a PostgreSQL database type connection for this app to work properly, learn how to do it here.
-
Locate and replace the word
JWTRandomSecureSecret
by a secret code, as random as possible, since this is what ensures the security of users' credentials. For example:#J&Az+7(8d+k/9q]
. Recommended Secure Code Generation tool. -
You'll also need to configure the website sample config file located in
website/src/config/
:-
Change the configurations inside
_development_config.json
and_production_config.json
for development and production environments respectively. -
Inside the same folder run
cp _development_config.json config.json
to create the configuration file based on the development configuration.
To create a production ready build just run
bash build.sh
in(app root directory)/website/
which will momentarily create aconfig.json
based on the production configuration file and when it's finished it should revert back to the development configuration.There's also a
build.bat
present in(app root directory)/website/
for Microsoft Windows development environments. -
In the Netuno root directory run
./netuno server app=react_auth
and it should start both the backend and the frontend server.
Some screenshots below.
Login | Registration |
---|---|
![]() |
![]() |
Reserved Area | Edit Profile |
---|---|
![]() |
![]() |