Commit Graph

115 Commits

Author SHA1 Message Date
80992f89ad added AUTH_BASE_URL in .drone.yml 2025-12-13 18:38:28 +05:30
8fe75b161b disabled changing username 2025-12-13 18:11:55 +05:30
c23145f338 feat(auth): separate auth and blog API clients and integrate author auto-creation
## Summary
Refactored the authentication flow to correctly separate traffic between the
Auth service and Blog service. Added post-registration author creation and
switched all `/auth/*` calls to the dedicated `auth` Axios client.

## Changes
### AuthProvider
- Replaced `api.post('/auth/register')` with `auth.post('/register')`
- Replaced `api.post('/auth/login')` with `auth.post('/login')`
- Added automatic author creation after user registration (`POST /authors`)
- Switched user identity lookup from `api.get('/auth/me')` to `auth.get('/me')`
- Replaced `/authors/{id}` lookup with `/authors/me`
- Updated imports to use `{ api, auth }`

### Axios Client Layer
- Introduced a new `auth` Axios instance using `VITE_AUTH_BASE_URL`
- Added shared token attachment and 401 handling logic
- Applied interceptors to both `auth` and `api` clients
- Removed inline auth logic from `api.ts`

### Types
- Added `VITE_AUTH_BASE_URL` to `vite-env.d.ts`

## Impact
- Correctly routes authentication traffic to the Auth microservice
- Ensures an Author document is created automatically after registration
- Simplifies identity loading via `/authors/me`
- Improves token handling consistency across both services
2025-12-11 21:00:13 +05:30
a7987ab922 feat(core): migrate articles to ArticlesModel, add URL-synced view routing, and unify component props
All checks were successful
continuous-integration/drone/tag Build is passing
Summary

Introduced ArticlesModel abstraction with list + map store for fast lookup and clean CRUD operations.

Replaced all array-based article access with model methods (readById, create, update, refresh).

Added utils/articles.ts with pure functions for list/map operations.

Updated ArticleProvider to use the new model API and avoid mutation issues.

Added URL-synced navigation (pushState) + VIEW_URL mapping for deep-linkable routes.

Implemented route parsing on load (/articles/:id) to auto-open article view.

Standardized openArticle to pass full ArticleModel instead of index.

Updated all ArticleCard components to use article object instead of index.

Added navigationMap to view router for custom child navigation names.

Extracted shared styles to types/styles.ts and replaced old inline styled components.

Updated props definitions for Login, Register, Profile, ArticleView, MainContent, ArticleGrid.

Removed React.StrictMode wrapper to avoid double-effects during development.

Release: 0.2.5
Type: Feature + Refactor + Routing upgrade
0.2.5
2025-11-20 17:00:26 +05:30
7bdf84b6aa URL handling both on navigation and when directly calling URL.
directly calling only works for Article ID
2025-11-20 16:58:32 +05:30
2b578fd12e full article instead of index for article and using article._id open select article using readByIndex 2025-11-20 16:33:24 +05:30
fe33dca630 cleanup 2025-11-20 16:08:33 +05:30
fa319e7450 move from ArticleModel[] to ArticlesModel 2025-11-20 15:56:35 +05:30
cb6125f3f9 articles to articlesList and slice and length functions for ArticlesModel to act like an array 2025-11-20 15:56:13 +05:30
0ed816e994 ArticlesModel as single point for storing articles and operations on them 2025-11-20 15:38:10 +05:30
2dfbdb950a utils for articles 2025-11-20 00:09:23 +05:30
fcc3ec16f9 correct name article instead of user for ArticleModel 2025-11-19 23:45:25 +05:30
cff57f0980 option to customize navigation names as per the component props 2025-11-19 23:40:36 +05:30
e90fab8c0b cleanup 2025-11-19 23:16:41 +05:30
3aaf328511 feat(router): migrate to declarative view-based navigation system
All checks were successful
continuous-integration/drone/tag Build is passing
- Introduce unified View hierarchy (VIEW_TREE) with parent/child relationships
- Add useViewRouter for navigate(), goBack(), openArticle(), and dynamic child navigation
- Replace legacy boolean-based view flags with single ui.view state
- Implement dynamic component rendering via VIEW_COMPONENTS map
- Add HomeView wrapper and integrate dynamic navigation props
- Update ArticleView to use open_editor and new ArticleViewProps
- Adjust ArticleEditor props type to accept null article
- Normalize navigation prop naming (open_* passed as onBack/onEdit via router)
- Enforce validation: prevent article updates without logged-in user
- Remove old conditional rendering/switch blocks and simplify Blog.tsx
- Version bump: 0.2.3 → 0.2.4
0.2.4
2025-11-18 17:55:01 +05:30
635e99c183 cleanup 2025-11-18 17:09:10 +05:30
b8e4decfba cleanup 2025-11-18 16:53:48 +05:30
459fa5855c abstracted navigation logic 2025-11-18 16:53:36 +05:30
f52c4a5287 added missing create 2025-11-18 16:28:53 +05:30
3a3f44c5b5 moved views logic to types 2025-11-18 16:28:41 +05:30
479ffb736c hierarchy wise view 2025-11-18 16:14:47 +05:30
87bdafb6a3 cleaner view for Blog 2025-11-18 16:05:27 +05:30
383b424bdf back and edit button spaced out properly 2025-11-18 15:23:08 +05:30
0340e17467 moved chip to between Cover Image and Article content 2025-11-18 15:20:11 +05:30
f15155d31c show edit button only if currentUser is present and don't updateArticle if currentUser is not present 2025-11-18 15:19:27 +05:30
c2e6daca13 This release adds a new large article card layout, improves image URL handling across the app, and enhances article CRUD logic to correctly insert/update items in the global provider.
All checks were successful
continuous-integration/drone/tag Build is passing
0.2.3
2025-11-15 18:20:23 +05:30
c0bcd0e3e4 local updation of articles too after article creation or modification 2025-11-15 18:18:40 +05:30
333f931cff using full URL for Cover Image in ArticleView.tsx 2025-11-15 18:18:14 +05:30
3960de3ecb making sure currentUser is in the list of authors for article 2025-11-15 17:34:01 +05:30
763629faa1 passing description 2025-11-15 17:33:39 +05:30
a7e3ed46cb 12 size card for full width in case of single article ONLY 2025-11-15 17:33:29 +05:30
4a8c59895e cleanup 2025-11-15 17:13:39 +05:30
ec9b5c905a bumping up to 0.2.2 for Implemented article editor, cover image upload, new UploadProvider, image URL normalization, and UI integration for editing and creating articles.
All checks were successful
continuous-integration/drone/tag Build is passing
0.2.2
2025-11-15 05:55:06 +05:30
d7e9827819 prefixing BASE URL for images. will break existing hardcoded outside images 2025-11-15 05:49:47 +05:30
ae0bc7dd12 update and create article provider functions 2025-11-15 05:44:18 +05:30
1e6c80f1b3 Cover Image upload 2025-11-15 05:20:02 +05:30
8ff8b9236e Upload provider 2025-11-15 05:13:52 +05:30
142b169108 Upload provider 2025-11-15 05:11:53 +05:30
80bf87529e ImageUploadField 2025-11-15 04:56:02 +05:30
5582d18a01 editor TextField fixes 2025-11-15 04:48:41 +05:30
913755d971 changes for UX of opening and closing editor from both home and through article view 2025-11-15 04:28:42 +05:30
8838ff10f4 changes for UX of opening and closing editor 2025-11-15 04:12:24 +05:30
7a28dde7d5 ArticleEditor.tsx for Editing and Creating Articles 2025-11-15 03:56:47 +05:30
d6c84abdf6 refactor View.tsx as ArticleView.tsx 2025-11-15 03:38:16 +05:30
1b755968dd refactor View.tsx as ArticleView.tsx 2025-11-15 03:35:55 +05:30
33e9d70b98 use handleShowProfile instead of inline setShowProfile 2025-11-15 03:31:19 +05:30
ce91526599 added libraries for markdown editor 2025-11-15 03:23:05 +05:30
73d64ea497 refactored Article.tsx to View.tsx 2025-11-15 03:22:51 +05:30
e16804b65d refactored Article.tsx to View.tsx 2025-11-15 03:20:28 +05:30
945912f16d bumped up version to 0.2.1 for avatar upload and update profile with uploaded avatar URL
All checks were successful
continuous-integration/drone/tag Build is passing
0.2.1
2025-11-14 23:50:05 +05:30