This app is a simple investment portfolio management system that allows users to track their investments and view performance metrics. first of all the user should create an account, loggin in trougth the token and create a portfolio. the app has services to calculate the profit and lost, it has filter such as year and it can download the csv file. This API is made these models:
- User Model
- Portfolio
- Investment
- Rails
- Ruby
- Postgresql
- Devise
- JWT
- Alpha Vantage
- ActiveRecord Serializer
- Sidekiq
- Redis
- Rspec
allow user to authenticate and return a token
POST /api/users/login
allows user to create an account
POST /users/
create a portfolio
POST /api/portfolios/
get a portfolio with investements
GET /api/portfolios/:id
crreate an investement
POST /api/portfolios/:id/investments
all the calculations includes comments for formula are in the daily_report_service.
Here are the steps to follow in order to get this project on your local computer.
rails v7.0.2 +
ruby v3.1.2 +
clone this repo by typing git clone https://github.com/vic778/stock_app
install the dependencies by typing bundle install
start the local server by running rails s
run the tests by typing rspec
User Registration and Login:
Users can create an account by providing their details and registering.
- Once registered, users can log in to the application using their credentials.
- The login process generates a token that will be used for subsequent API calls.
Portfolio Creation:
- After logging in, users can create a new portfolio.
- They can provide a name and an optional description for the portfolio.
- Upon creation, the portfolio is associated with the logged-in user.
Investment Creation:
- Users can add investments to their portfolios.
- They need to provide details such as the security symbol or ticker, purchase price, number of shares, and purchase date.
- When creating an investment, the user selects the portfolio to which it belongs.
Profit and Loss Calculation:
- The application provides services to calculate the profit and loss of investments.
- It takes into account the purchase price, current market data, and the number of shares.
- The calculated profit and loss are displayed to the user.
Filtering and Historical Data:
- Users can filter their investments based on various criteria such as a specific year.
- The application fetches and displays the historical performance data for the selected investments.
- CSV File Download:
👤 Victor Barh
- GitHub: @Vvic778
- Twitter: @victoirBarh
- LinkedIn: LinkedIn
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
N/A
This project is MIT licensed.