Credits_Backend_Example is a web application designed to enable users to manage credit based activities through a user-friendly interface. It provides a range of features, including secure authentication, credit-based billing, a dashboard for tracking credit usage and API activity, and the ability to purchase additional credits.
- Authentication System: Secure signup, login, and password management with JWT session handling.
- Credit-Based Billing: Integration with Stripe for managing credit-based billing with multiple pricing tiers.
- User Dashboard: A comprehensive dashboard displaying API key, recent credit usage, invoice history, and auto-replenish settings.
- Billing Management: Ability to purchase credits, view past invoices, and download receipts for payments.
- Contact Support: Users can contact support via email for their inquiries.
- API Management: Page to view and manage the user's unique API key.
- Node.js
- Express
- JWT for authentication
- bcrypt for password hashing
- Passport for user identity verification
- EJS as the templating engine
- Bootstrap for frontend styling
- CSS3 and HTML for presentation
- Stripe API for payment processing
- MongoDB with Mongoose for data persistence
- nodemailer for sending emails
- cron for scheduling tasks
- body-parser for parsing incoming request bodies
To get started, clone this repository and follow the steps below:
- Install all required dependencies using
npm install
. - Set up your environment variables according to the
.env.example
file provided in the repository. - Use
npm start
to launch the application locally.
Navigate to http://localhost:3000
to access the application.
/models
: Data models used throughout the application./routes
: Express routes that define the app's RESTful API./views
: EJS templates for rendering server-side pages./services
: Business logic services for handling specific feature sets./config
: Configuration files for various app components./public
: Static assets such as CSS, JavaScript, and images.
Execute npm test
to run the unit tests with coverage provided within the application.
If you are interested in contributing to the project, please review the CONTRIBUTING.md file for guidelines.
Credits_Backend_Example is open-source and available under the ISC License. Check the LICENSE.md file for detailed licensing information.