Skip to content

Latest commit

Β 

History

History
132 lines (95 loc) Β· 2.6 KB

File metadata and controls

132 lines (95 loc) Β· 2.6 KB

πŸ’° InvestAPI

An interactive API that provides information about key Brazilian economic rates (Selic, CDI, IPCA) and also offers smart investment advice with an AI assistant called InvestAI.


πŸ” Preview β€’ πŸš€ Features β€’ πŸ› οΈ Tech Stack β€’ πŸ“¦ Installation β€’ πŸ“– How It Works β€’ βš–οΈ License β€’ 🚧 Building


git clone https://github.com/MouraGabriel53/InvestAPI.git
npm run dev

πŸ” Preview

==================== Welcome | InvestAPI ====================

πŸ’° Select a rate to view the value πŸ’°

[0] - Selic
[1] - CDI
[2] - IPCA
[3] - Ask to InvestAI
[4] - Exit

πŸ” Type the number:
-> Answer: 3

😁 Let's get started! What's your name?:
-> Answer: Gabriel

πŸ€“ Type what you want ask to InvestAI:
-> Answer: Where should I invest safely in 2025?

InvestAI thinking... πŸ€”

πŸ€– InvestAI answer: Hello Gabriel! I'm InvestAI. For safe investments in 2025, consider...

πŸš€ Features

βœ… Real-time queries for major Brazilian economic rates:

  • SELIC
  • CDI
  • IPCA

πŸ€– Ask InvestAI (powered by Gemini API):

  • Responds to investment-related questions
  • Provides friendly and smart advice
  • Uses artificial intelligence to guide beginner investors

πŸŽ›οΈ CLI interface with interactive terminal menus


πŸ› οΈ Technologies Used

  • Node.js
  • JavaScript (ESModules)
  • Google GenAI SDK
  • dotenv
  • readline-sync
  • node-fetch
  • Express (backend API)
  • Git & GitHub

πŸ“¦ Installation

Install all required dependencies manually:

npm install dotenv
npm install readline-sync
npm install @google/genai
npm install node-fetch
npm install express

πŸ“– How It Works

Make sure your package.json is configured like this:

{
  "name": "server",
  "version": "1.0.0",
  "description": "Server Backend",
  "main": "server.js",
  "type": "module",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node server.js",
    "dev": "node --watch server.js"
  },
  "author": "Your Name",
  "license": "ISC"
}

Then, create a .env file in the root directory and add your Gemini API key:

GEMINI_API_KEY=your_real_api_key_here

βš–οΈ License

MIT LICENSE

🚧 Building

Currently, the project is under development and may receive frequent updates.

Made with πŸ’š by Gabriel Moura