Skip to content

Pythagora-io/credit-based-backend-gpt-pilot-example

Repository files navigation

Credits_Backend_Example

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.

Features

  • 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.

Technologies Used

  • 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

Project Setup

To get started, clone this repository and follow the steps below:

  1. Install all required dependencies using npm install.
  2. Set up your environment variables according to the .env.example file provided in the repository.
  3. Use npm start to launch the application locally.

Navigate to http://localhost:3000 to access the application.

Project Structure

  • /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.

Testing

Execute npm test to run the unit tests with coverage provided within the application.

Contributing

If you are interested in contributing to the project, please review the CONTRIBUTING.md file for guidelines.

License

Credits_Backend_Example is open-source and available under the ISC License. Check the LICENSE.md file for detailed licensing information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published