|
1 | | -<p align="center"> |
2 | | - <a href="https://www.gatsbyjs.com/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts"> |
3 | | - <img alt="Gatsby" src="https://www.gatsbyjs.com/Gatsby-Monogram.svg" width="60" /> |
4 | | - </a> |
5 | | -</p> |
6 | | -<h1 align="center"> |
7 | | - Gatsby Minimal TypeScript Starter |
8 | | -</h1> |
| 1 | +# Portfolio Template |
9 | 2 |
|
10 | | -## 🚀 Quick start |
| 3 | +This is a portfolio landing page builder. Users can register, create a profile, and get a public link to share. I personally use this web app to build my own portfolio landing page. |
11 | 4 |
|
12 | | -1. **Create a Gatsby site.** |
| 5 | +--- |
13 | 6 |
|
14 | | - Use the Gatsby CLI to create a new site, specifying the minimal TypeScript starter. |
| 7 | +## 🔧 Tech Stack |
15 | 8 |
|
16 | | - ```shell |
17 | | - # create a new Gatsby site using the minimal TypeScript starter |
18 | | - npm init gatsby -- -ts |
19 | | - ``` |
| 9 | +- **Backend:** Flask (Python) |
| 10 | +- **Frontend:** Bootstrap, HTML, CSS, JS |
| 11 | +- **Database:** PostgreSQL |
| 12 | +- **Templating:** Jinja2 (default with Flask) |
| 13 | +- **Deployment:** GitHub Actions + Render (suggested) |
20 | 14 |
|
21 | | -2. **Start developing.** |
| 15 | +--- |
22 | 16 |
|
23 | | - Navigate into your new site’s directory and start it up. |
| 17 | +## 🚀 Getting Started (Local Setup) |
24 | 18 |
|
25 | | - ```shell |
26 | | - cd my-gatsby-site/ |
27 | | - npm run develop |
28 | | - ``` |
| 19 | +### 1. Clone this repository |
29 | 20 |
|
30 | | -3. **Open the code and start customizing!** |
| 21 | +```bash |
| 22 | +git clone https://github.com/YOUR_USERNAME/portfolio-template.git |
| 23 | +cd portfolio-template |
| 24 | +``` |
31 | 25 |
|
32 | | - Your site is now running at http://localhost:8000! |
| 26 | +### 2. Set up virtual environment |
33 | 27 |
|
34 | | - Edit `src/pages/index.tsx` to see your site update in real-time! |
| 28 | +```bash |
| 29 | +python -m venv venv |
| 30 | +source venv/bin/activate # Windows: venv\Scripts\activate |
| 31 | +``` |
35 | 32 |
|
36 | | -4. **Learn more** |
| 33 | +### 3. Install dependencies |
37 | 34 |
|
38 | | - - [Documentation](https://www.gatsbyjs.com/docs/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts) |
39 | | - - [Tutorials](https://www.gatsbyjs.com/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts) |
40 | | - - [Guides](https://www.gatsbyjs.com/tutorial/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts) |
41 | | - - [API Reference](https://www.gatsbyjs.com/docs/api-reference/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts) |
42 | | - - [Plugin Library](https://www.gatsbyjs.com/plugins?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts) |
43 | | - - [Cheat Sheet](https://www.gatsbyjs.com/docs/cheat-sheet/?utm_source=starter&utm_medium=readme&utm_campaign=minimal-starter-ts) |
| 35 | +```bash |
| 36 | +pip install -r requirements.txt |
| 37 | +``` |
44 | 38 |
|
45 | | -## 🚀 Quick start (Netlify) |
| 39 | +### 4. Environment variables |
46 | 40 |
|
47 | | -Deploy this starter with one click on [Netlify](https://app.netlify.com/signup): |
| 41 | +Create a `.env` file in the root directory: |
48 | 42 |
|
49 | | -[<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-minimal-ts) |
| 43 | +```env |
| 44 | +FLASK_APP=run.py |
| 45 | +FLASK_ENV=development |
| 46 | +SECRET_KEY=your_secret_key |
| 47 | +SQLALCHEMY_DATABASE_URI=postgresql://username:password@localhost:5432/dbname |
| 48 | +``` |
| 49 | + |
| 50 | +> Replace `username`, `password`, `localhost`, `5432`, and `dbname` with your PostgreSQL credentials. |
| 51 | +
|
| 52 | +--- |
| 53 | + |
| 54 | +### 5. Initialize database |
| 55 | + |
| 56 | +Ensure PostgreSQL is running and the database exists, then run: |
| 57 | + |
| 58 | +```bash |
| 59 | +flask db init # Only the first time |
| 60 | +flask db migrate -m "Initial migration" |
| 61 | +flask db upgrade |
| 62 | +``` |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +### 6. Run the application |
| 67 | + |
| 68 | +```bash |
| 69 | +flask run |
| 70 | +``` |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +## 📦 Deployment |
| 75 | + |
| 76 | +### Hosting Options: |
| 77 | + |
| 78 | +- ✅ **Render** – great for Flask apps with PostgreSQL support and simple CI/CD. |
| 79 | +- [ ] Railway |
| 80 | +- [ ] Fly.io |
| 81 | + |
| 82 | +### Render Deployment Steps: |
| 83 | + |
| 84 | +1. Push code to GitHub. |
| 85 | +2. Go to [Render](https://render.com/). |
| 86 | +3. Create a new **Web Service**: |
| 87 | + - Connect to your GitHub repo. |
| 88 | + - Use build command: `pip install -r requirements.txt` |
| 89 | + - Use start command: `gunicorn run:app` |
| 90 | +4. Add environment variables via Render dashboard: |
| 91 | + - `FLASK_ENV=production` |
| 92 | + - `SECRET_KEY=your_secret` |
| 93 | + - `SQLALCHEMY_DATABASE_URI=postgresql://...` *(your Render PostgreSQL connection string)* |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +## 📄 Project Overview |
| 98 | + |
| 99 | +> I am going to develop a web application. It is more like a practice project, but I will also use it as a personal portfolio builder. |
| 100 | +
|
| 101 | +This is a portfolio landing page builder: |
| 102 | +- Users can register and login. |
| 103 | +- They get their own dashboard to update profile info. |
| 104 | +- A public shareable link is generated for each profile. |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +## 👨💻 Author |
| 109 | + |
| 110 | +Built by Md Abdullah. This is part of my personal portfolio and learning path as a developer. |
0 commit comments