A modern finance dashboard application with Discord OAuth2 integration. This application provides a secure and user-friendly interface for managing financial data with Discord authentication.
- Discord OAuth2 Authentication
- Secure Session Management
- PostgreSQL Database Integration
- RESTful API Architecture (eg. Linking with Tasker to automatically add transactions to the database)
- Modern Express.js Backend
- Helmet Security Integration
- CORS Support
- Node.js (v14 or higher)
- PostgreSQL Database
- Discord Developer Application (for OAuth2)
- OpenAI API Key (for AI features)
-
Clone the repository
-
Install dependencies:
npm install
- Create a
.env
file in the root directory with the following variables:
PORT=3000
NODE_ENV=development
# Database Configuration
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_HOST=localhost
DB_PORT=5432
DB_NAME=your_db_name
# Discord OAuth2
DISCORD_CLIENT_ID=your_discord_client_id
DISCORD_CLIENT_SECRET=your_discord_client_secret
DISCORD_CALLBACK_URL=http://localhost:3000/auth/discord/callback
# Session Secret
SESSION_SECRET=your_session_secret
# OpenAI
OPENAI_API_KEY=your_openai_api_key
- Start the development server:
npm run dev
The application will be available at http://localhost:3000
(or your configured port).
- Visit the homepage
- Click "Login with Discord" to authenticate
- Access your personalized finance dashboard
GET /auth/discord
- Discord authenticationGET /auth/discord/callback
- Discord OAuth2 callbackGET /api/user
- Get user informationPOST /api/logout
- Logout user
This application implements several security measures:
- Helmet.js for HTTP headers security
- Session-based authentication
- CORS protection
- Environment variable configuration
- Secure password hashing with bcrypt
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.