Skip to content

Commit d88cd15

Browse files
project intial setup done
1 parent e6c2bef commit d88cd15

File tree

23 files changed

+158
-31033
lines changed

23 files changed

+158
-31033
lines changed

.github/workflows/deploy.yml

Whitespace-only changes.

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
node_modules/
2-
.cache/
3-
public
4-
src/gatsby-types.d.ts
1+
__pycache__/
2+
venv
3+
.env
4+
run_project.bat

README.md

Lines changed: 95 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,110 @@
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
92

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

12-
1. **Create a Gatsby site.**
5+
---
136

14-
Use the Gatsby CLI to create a new site, specifying the minimal TypeScript starter.
7+
## 🔧 Tech Stack
158

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)
2014

21-
2. **Start developing.**
15+
---
2216

23-
Navigate into your new site’s directory and start it up.
17+
## 🚀 Getting Started (Local Setup)
2418

25-
```shell
26-
cd my-gatsby-site/
27-
npm run develop
28-
```
19+
### 1. Clone this repository
2920

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+
```
3125

32-
Your site is now running at http://localhost:8000!
26+
### 2. Set up virtual environment
3327

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+
```
3532

36-
4. **Learn more**
33+
### 3. Install dependencies
3734

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+
```
4438

45-
## 🚀 Quick start (Netlify)
39+
### 4. Environment variables
4640

47-
Deploy this starter with one click on [Netlify](https://app.netlify.com/signup):
41+
Create a `.env` file in the root directory:
4842

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.

app/__init__.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from flask import Flask
2+
from app.routes import main
3+
from config import Config # Import your config class
4+
from flask_sqlalchemy import SQLAlchemy
5+
from flask_migrate import Migrate
6+
from dotenv import load_dotenv
7+
import os
8+
9+
# Load environment variables from .env file (in dev only)
10+
load_dotenv()
11+
12+
# Initialize extensions
13+
db = SQLAlchemy()
14+
migrate = Migrate()
15+
16+
def create_app():
17+
app = Flask(__name__)
18+
app.config.from_object(Config)
19+
20+
# Register blueprints
21+
app.register_blueprint(main)
22+
23+
# Initialize extensions with app
24+
db.init_app(app)
25+
migrate.init_app(app, db)
26+
27+
return app

app/forms.py

Whitespace-only changes.

app/models.py

Whitespace-only changes.

app/routes.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from flask import Blueprint, render_template
2+
3+
main = Blueprint('main', __name__)
4+
5+
@main.route('/')
6+
def index():
7+
return render_template('index.html')

app/templates/base.html

Whitespace-only changes.

app/templates/dashboard.html

Whitespace-only changes.

app/templates/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Test</title>
5+
</head>
6+
<body>
7+
<h1>Hello, Flask is working!</h1>
8+
</body>
9+
</html>

0 commit comments

Comments
 (0)