A web application where users can register, log in, and submit secrets anonymously. The app uses PostgreSQL, bcrypt for password encryption, Passport.js for authentication (local and Google OAuth), and is built using Express.js.
- User authentication (local and Google OAuth)
- Submit secrets anonymously
- Store user secrets securely in a PostgreSQL database
- Use bcrypt to hash passwords
- Responsive frontend with EJS templates
- Clone the repository:
git clone https://github.com/yourusername/secrets-app.git cd secrets-app
- Install dependencies:
npm install
- Set up PostgreSQL and create a database.
- Create a .env file in the root directory and set the required environment variables (check Environment Variables).
- Run the application:
npm start
The app should now be running on http://localhost:3000/.
Make sure to set up the following environment variables in your .env file:
SESSION_SECRET=your-session-secret
PG_USER=your-pg-username
PG_HOST=localhost
PG_DATABASE=your-database-name
PG_PASSWORD=your-password
PG_PORT=5432
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
- Register using your email or log in using Google OAuth.
- Submit a secret anonymously after logging in.
- View your submitted secret on the Secrets page.
- Node.js & Express.js for backend
- PostgreSQL for the database
- Passport.js for authentication (Local and Google OAuth2)
- bcrypt for password encryption
- EJS for templating