This is a full-stack website for creating and sharing your AI-powered prompts.
The project is end-to-end developed using:
- Node Package Manager as foundation;
- ReactJS Library and NextJS Framework for developing;
- NextAuth with Bcrypt for authorization;
- MongoDB with Mongoose for database;
- Tailwind CSS for styling purposes.
The stable releases of the following technologies are used:
Technology | Version | Technology | Version |
---|---|---|---|
NPM | 18.6+ | React & DOM | 18.2+ |
Next | 13.4+ | NextAuth | 4.22+ |
MongoDB | 5.6+ | Mongoose | 7.3+ |
Bcrypt | 5.1+ | Autoprefixer | 10.4+ |
PostCSS | 8.4+ | Tailwind CSS | 3.3+ |
P.S. For hosted usage, only Vercel deployment with variables is sufficient.
The environment variables to be used, are:
- Go to the Google Cloud Console, select the
Website Client
and copy the variables. - Enter them in the
GOOGLE_CLIENT_ID
andGOOGLE_CLIENT_SECRET
fields, respectively.
- Go to the Mongo Atlas Console, select the
Prompts Hub
project, select theDevCluster
deployment, clickConnect
, chooseDrivers
and copy the URI. - Replace the
<password>
phrase with the actual password and then enter them in theMONGODB_URI
field. For the local.env
file, remember to escape characters like$
.
- For the local deployment, enter the value [
http://localhost:3000
] in theNEXTAUTH_URL
andNEXTAUTH_URL_INTERNAL
fields. - For the remote deployment, enter the value [
https://prompts-hub-next.vercel.app
] in theNEXTAUTH_URL
andNEXTAUTH_URL_INTERNAL
fields. - Run the command [
openssl rand -base64 32
] in the GitBash
terminal and enter that value in theNEXTAUTH_SECRET
field. Remember that a new key will not work with the old entries in the Mongo Database.
For development purposes, follow these steps:
-
Run this command to install all the dependencies:
npm install
-
Run this command to keep watch and start the local server:
npm run dev
-
Go to this URL to use the application:
http://localhost:3000
For production purposes, follow these steps:
-
Run this command to install the required dependencies:
npm install
-
Run this command to minify and build the React project:
npm run build
-
Run this command to host the optimized React project:
npm start
-
Go to this URL to use the application:
http://localhost:3000
Thank you for using it!