{"id":20332069,"url":"https://github.com/ruokokoski/stock-app","last_synced_at":"2026-04-07T07:42:48.856Z","repository":{"id":253123834,"uuid":"842483855","full_name":"ruokokoski/stock-app","owner":"ruokokoski","description":"Stock App is a web application for monitoring stock markets. Developed using Node.js, React, and Vite.","archived":false,"fork":false,"pushed_at":"2025-04-17T09:23:07.000Z","size":2618,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T14:32:31.393Z","etag":null,"topics":["back-end","front-end","fullstack-development","node-js","postgresql","react","stocks","vite"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruokokoski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-14T12:53:06.000Z","updated_at":"2025-11-18T14:46:44.000Z","dependencies_parsed_at":"2024-12-21T13:24:46.707Z","dependency_job_id":"8916f9a8-2259-4c96-87dd-82b97415688c","html_url":"https://github.com/ruokokoski/stock-app","commit_stats":null,"previous_names":["ethervortex/stock-app","ruokokoski/stock-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ruokokoski/stock-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruokokoski%2Fstock-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruokokoski%2Fstock-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruokokoski%2Fstock-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruokokoski%2Fstock-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruokokoski","download_url":"https://codeload.github.com/ruokokoski/stock-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruokokoski%2Fstock-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31504897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["back-end","front-end","fullstack-development","node-js","postgresql","react","stocks","vite"],"created_at":"2024-11-14T20:24:51.990Z","updated_at":"2026-04-07T07:42:48.831Z","avatar_url":"https://github.com/ruokokoski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stock-app\n\n[![CI](https://github.com/ruokokoski/stock-app/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/ruokokoski/stock-app/actions/workflows/main.yml)\n\nThis stock market app is a 10-credit project developed for the Fullstack Open course at the University of Helsinki.\n\nThe application is a web application designed for monitoring U.S. stock markets. It fetches real-time stock data from stock APIs, allowing users to track historical data for both indices and individual stocks. Detailed information and fundamental metrics for individual stocks can also be displayed. Users can create their own watchlists within the application, which are saved in a database. Historical price and key metrics information for individual stocks can be saved as csv-files. Users can also filter and analyze stocks based on selected metrics.\n\n## Tech Stack\n- **Backend:** The backend of the application is built using **Node.js**, which is used to handle server-side logic, manage API requests, and interact with the database. Node.js provides an efficient environment for processing real-time data and handling asynchronous operations.\n- **Frontend:** The frontend of the application is developed using **React**, a JavaScript library for building user interfaces, and **Vite**, a modern build tool that offers fast development server start-up and optimized build performance.\n- **Database:** The application uses **PostgreSQL** as its database management system. PostgreSQL is a powerful, open-source relational database that provides robust performance, reliability, and support for complex queries.\n\n## Documents\n- [User Manual](./documents/user_manual.md)\n- [Requirement specs](./documents/requirement_specs.md)\n- [Comparison of stock APIs](./documents/stock_apis.md)\n- [Hours tracking](./documents/timetracking.md)\n\n## Installation\n### Prerequisites\n\n1. **Node.js**: Ensure you have Node.js (version 20 or higher) installed. You can download it from [nodejs.org](https://nodejs.org/).\n2. **npm**: Node.js comes with npm (Node Package Manager) installed. Alternatively, you can use **yarn** if preferred.\n3. **Fly.io Signup**: Create an account on [Fly.io](https://fly.io) for deploying and hosting the application.\n4. **API Registrations**:\n   - **Finnhub API**: Sign up for a free Finnhub API key from [Finnhub](https://www.finnhub.io).\n   - **Tiingo API**: Sign up for a free Tiingo API key from [Tiingo](https://www.tiingo.com).\n   - **TwelveData API**: Register for a free TwelveData API key at [TwelveData](https://twelvedata.com).\n   - **Polygon API**: Free Polygon API key from [Polygon](https://www.polygon.io).\n   - **Coincap API**: Free Coincap API key from [Coincap](https://www.coincap.io).\n\n### Setup\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/ruokokoski/stock-app.git\n   cd stock-app\n   ```\n2. **Install backend dependencies**:\n   ```bash\n   npm install\n   ```\n3. **Create Fly.io app**:\n   \n   Create new fly.io app in the main directory of the cloned repository. Setup also Postgres database during creation as it is needed already in development phase. When creating the app, the password of the database is revealed. Remember to save it somewhere.\n   ```bash\n   fly launch\n   ```\n4. **Set Up Environment Variables**:\n   \n   Create a .env file in the main directory and add the necessary environment variables\n   ```bash\n   DATABASE_URL=postgres://postgres:\u003cthepasswordishere\u003e@127.0.0.1:5432/postgres\n   PORT=3000\n   SECRET=\u003cyour own secret\u003e\n   TIINGO_API_KEY=\u003cyour own API key\u003e\n   TWELVEDATA_API_KEY=\u003cyour own API key\u003e\n   FINNHUB_API_KEY=\u003cyour own API key\u003e\n   POLYGON_API_KEY=\u003cyour own API key\u003e\n   COINCAP_API_KEY=\u003cyour own API key\u003e\n   ```\n5. **Install frontend dependencies**:\n   ```bash\n   cd frontend\n   npm install\n   ```\n\n## Running the app in development mode\n\n1. **Set up the local connection to the database**:\n\n   You need to create a tunnel to connect your local machine to the Fly.io database. This allows the local app to use the remote Fly.io PostgreSQL database.\n   \n   Run the following command and leave it running while database is being used:\n   ```bash\n   flyctl proxy 5432 -a \u003cfly.io-app-name\u003e-db\n   ```\n\n   Alternatively, use available script:\n   ```bash\n   npm run proxy\n   ```\n  \n2. **Start the development server**:\n\n   In the root of your project, start the backend server by running:\n   ```bash\n   npm run dev\n   ```\n\n3. **Start the frontend**:\n\n   Navigate to the frontend directory and start the frontend development server:\n   ```bash\n   cd frontend\n   npm run dev\n   ```\n\n4. **Access the application**:\n\n   The app should now be accessible at http://localhost:5173. You can open this URL in your browser to view and interact with the app.\n\n## Deploying the app to Fly.io\n\nTo deploy the stock market app to Fly.io, follow these steps:\n\n1. **Build the frontend**:\n\n   Before deploying, ensure that the frontend is built and ready for production. Run the following command in the frontend directory:\n   ```bash\n   cd frontend\n   npm run build\n   ```\n   This command compiles the frontend and optimizes it for production, creating a dist folder that contains the static files to be served.\n\n2. **Deploy the app to Fly.io**:\n\n   Once the frontend is built, you're ready to deploy the app to Fly.io. Run the following command:\n   ```bash\n   fly deploy\n   ```\n\n3. **Post-Deployment Tasks**:\n\n   After deploying, Fly.io will provide a public URL where your app is hosted. Visit this URL to check if everything is working as expected.\n\n\n## Testing\n\nTo run tests for the application, use the following command:\n```bash\n   npm test\n```\n\n## Eslint\n\nRun ESLint to check for code quality and style issues. To run ESLint, use:\n```bash\n   npm run lint\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruokokoski%2Fstock-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruokokoski%2Fstock-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruokokoski%2Fstock-app/lists"}