Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
eba74fc
Update rate-limiter usage
onur-ozkan Sep 14, 2020
2573f1c
Get rid of Category logic
onur-ozkan Sep 14, 2020
49e52e6
Create tags entity and repository
onur-ozkan Sep 15, 2020
6bb5047
Update createTitle func of Title module
onur-ozkan Sep 15, 2020
7dd8e69
Update nestjs-rate-limiter version to 2.5.0
onur-ozkan Sep 20, 2020
82e2b4e
Create basic infrastructure of Tag module
onur-ozkan Sep 20, 2020
b2fa0f4
[server] Update nestjs-rate-limiter version
onur-ozkan Sep 20, 2020
395c1d1
[server] Upgrade nestjs-rate-limiter version
onur-ozkan Sep 23, 2020
38b332e
[server] Add new field 'popularity_ratio' to TagsEntity
onur-ozkan Sep 23, 2020
5671019
[server] Code optimization on Title-Tag modules
onur-ozkan Sep 23, 2020
7670513
Implement popularity calculation logic of tags
onur-ozkan Sep 27, 2020
05f52e5
Add 'Read one by id' logic to Tag module
onur-ozkan Sep 27, 2020
184fb8b
Add Delete operation to Tag module
onur-ozkan Sep 27, 2020
ced2fe4
[server] Finalize getTrendingTags()
onur-ozkan Sep 28, 2020
1eb772b
[server] some optimizations
onur-ozkan Sep 28, 2020
bc54a9c
[client] Add new package 'string-to-color'
onur-ozkan Sep 28, 2020
b1e2b8e
[server] Update tags on titleUpdate
onur-ozkan Sep 30, 2020
8a83ee0
Update tag style and fetch trendingTags
onur-ozkan Oct 1, 2020
c74bb8b
Add new block for Tag searching
onur-ozkan Oct 2, 2020
593856d
[server] Create tag/search endpoint
onur-ozkan Oct 3, 2020
0d7fac0
Create new component TagSearchingBlock
onur-ozkan Oct 3, 2020
a80683a
[client] version upgrade to 0.4-alpha
onur-ozkan Oct 3, 2020
2d25c1a
[client] Optimize TagSearchingBlock
onur-ozkan Oct 3, 2020
5af975b
[client] Upgrade antd version to 4.6
onur-ozkan Oct 4, 2020
82438f2
[client] Delete filter modal on feed flow
onur-ozkan Oct 4, 2020
fe182e9
[server] Update dependency versions
onur-ozkan Oct 4, 2020
c49de6a
[client] Update dependency versions
onur-ozkan Oct 4, 2020
fd75a9e
[client] update feed creating screens
onur-ozkan Oct 5, 2020
d42c9d0
[client] optimize validatio on feed creation
onur-ozkan Oct 7, 2020
6cf2e3c
[client] style & type optimizations
onur-ozkan Oct 8, 2020
e65fc2b
[client] Update tag & category types
onur-ozkan Oct 10, 2020
bc080c2
[client] replace whole category feature with tags
onur-ozkan Oct 10, 2020
50b4590
[server] Upgrade nestjs-rate-limiter version to v2.5.6
onur-ozkan Oct 10, 2020
356c46f
[client] Update structure of less files
onur-ozkan Oct 11, 2020
b7240ec
[client] create environment variables & update constants
onur-ozkan Oct 11, 2020
d5b3615
[client] create enum for Roles
onur-ozkan Oct 11, 2020
23e307d
[client] update component folders
onur-ozkan Oct 11, 2020
2c24338
[client] add new package 'next-i18next'
onur-ozkan Oct 11, 2020
a7fb176
[client] update stringToColor importing sectence
onur-ozkan Oct 11, 2020
492b43e
[client] implement i18n to login page
onur-ozkan Oct 12, 2020
ed60cee
[client] Add localization on sign-up page
onur-ozkan Oct 13, 2020
4c8ec5b
[client] Add localization on auth layout
onur-ozkan Oct 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
API_URL=http://localhost:3000/api
SOCKET_URL=http://localhost:3000
2 changes: 2 additions & 0 deletions client/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
API_URL=https://server.feednext.io/api
SOCKET_URL=https://server.feednext.io
14 changes: 2 additions & 12 deletions client/config/constants.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
// APP
export const API_URL = process.env.NODE_ENV === 'production' ? 'https://server.feednext.io/api' : 'http://localhost/api'
export const SOCKET_URL = process.env.NODE_ENV === 'production' ? 'https://server.feednext.io' : 'http://localhost'

// ROLES
export const Guest = -1
export const User = 0
export const JuniorAuthor = 1
export const MidLevelAuthor = 2
export const SeniorAuthor = 3
export const Admin = 4
export const SuperAdmin = 5
export const API_URL = process.env.API_URL
export const SOCKET_URL = process.env.SOCKET_URL
File renamed without changes.
12 changes: 12 additions & 0 deletions client/i18n.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import NextI18Next from "next-i18next";

const NextI18NextInstance = new NextI18Next({
defaultLanguage: "en",
defaultNS: "loginPage",
otherLanguages: ["tr"],
localePath: typeof window === "undefined" ? "public/locales" : "locales"
})

export const { appWithTranslation, withTranslation } = NextI18NextInstance

export default NextI18NextInstance;
11 changes: 10 additions & 1 deletion client/next.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
const webpack = require('webpack')

const withCSS = require('@zeit/next-css')
const withLess = require('@zeit/next-less')
const lessToJS = require('less-vars-to-js')

const fs = require('fs')
const path = require('path')
const themeVariables = lessToJS(fs.readFileSync(path.resolve(__dirname, './src/styles/antd/override.less'), 'utf8'))
const themeVariables = lessToJS(fs.readFileSync(path.resolve(__dirname, './config/override.less'), 'utf8'))

const { nextI18NextRewrites } = require('next-i18next/rewrites')
const localeSubpaths = {}

module.exports = withCSS(withLess({
rewrites: async () => nextI18NextRewrites(localeSubpaths),
publicRuntimeConfig: {
localeSubpaths,
},
lessLoaderOptions: {
javascriptEnabled: true,
modifyVars: themeVariables // make your antd custom effective
Expand Down
3,141 changes: 1,816 additions & 1,325 deletions client/package-lock.json

Large diffs are not rendered by default.

34 changes: 18 additions & 16 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feednext-client",
"version": "0.3.0-alpha",
"version": "0.4.0-alpha",
"private": true,
"description": "Client side of feednext.io",
"author": "Onur Ozkan",
Expand All @@ -11,38 +11,40 @@
"start": "next start -p 8000"
},
"dependencies": {
"@ant-design/compatible": "^1.0.2",
"@ant-design/icons": "^4.2.1",
"@typescript-eslint/eslint-plugin": "^2.20.0",
"@typescript-eslint/parser": "^2.20.0",
"@ant-design/compatible": "^1.0.8",
"@ant-design/icons": "^4.2.2",
"@typescript-eslint/eslint-plugin": "^4.3.0",
"@typescript-eslint/parser": "^4.3.0",
"@zeit/next-less": "^1.0.1",
"antd": "^4.3.1",
"axios": "^0.19.2",
"antd": "4.6.6",
"axios": "^0.20.0",
"babel-plugin-import": "^1.13.0",
"classnames": "^2.2.6",
"date-fns": "^2.12.0",
"date-fns": "^2.16.1",
"esm": "3.2.25",
"keymachine": "^2.1.0",
"less": "3.11.1",
"less": "3.12.2",
"less-vars-to-js": "1.3.0",
"next": "9",
"next-i18next": "^6.0.3",
"nprogress": "^0.2.0",
"null-loader": "4.0.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-ga": "^2.7.0",
"react-image": "^4.0.1",
"react-redux": "^7.2.0",
"react-ga": "^3.1.2",
"react-image": "^4.0.3",
"react-redux": "^7.2.1",
"redux": "^4.0.5",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"socket.io-client": "^2.3.0",
"socket.io-client": "^2.3.1",
"string-to-color": "^2.2.2",
"webpack-filter-warnings-plugin": "1.2.1"
},
"devDependencies": {
"@types/node": "13.13.4",
"@types/react": "^16.9.35",
"typescript": "3.8.3",
"@types/node": "14.11.2",
"@types/react": "^16.9.50",
"typescript": "4.0.3",
"url-loader": "^4.1.0"
}
}
3 changes: 3 additions & 0 deletions client/public/locales/en/authLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"copyright": "Feednext © 2020. All rights reserved"
}
11 changes: 11 additions & 0 deletions client/public/locales/en/loginPage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"title": "Login Form",
"signIn": "Sign In",
"validationErrorEmailOrUsername": "Please input your username or email",
"validationErrorPassword": "Please input your password",
"rememberMe": "Remember Me",
"createAccount": "Create a new account",
"forgotPassword": "Forgot Password",
"usernameOrEmail": "Username or Email",
"password": "Password"
}
21 changes: 21 additions & 0 deletions client/public/locales/en/registerPage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"title": "Register Form",
"signUp": "Sign Up",
"fullName": "Full Name",
"username": "Username",
"email": "Email",
"password": "Password",
"confirmPassword": "Confirm Password",
"validationErrorFullName": "Please enter your full name",
"validationErrorUsername": "Please enter your username",
"validationErrorEmail": "Please enter your email",
"validationErrorEmail2": "Email format is not valid",
"validationErrorPassword": "Please enter your password",
"validationErrorConfirmPassword": "Please confirm your password",
"validationErrorPasswordMatch": "The two passwords that you entered do not match",
"validationErrorTermsAndPolicy": "You must accept the privacy policy and terms & conditions",
"alreadyHaveAnAccount": "Already have an account?",
"privacyPolicy": "Privacy Policy",
"termsAndConditions": "Terms & Conditions",
"readAndUnderstood": "read and understood."
}
3 changes: 3 additions & 0 deletions client/public/locales/tr/authLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"copyright": "Feednext © 2020. Tüm hakları saklıdır"
}
11 changes: 11 additions & 0 deletions client/public/locales/tr/loginPage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"title": "Giriş Formu",
"signIn": "Giriş Yap",
"validationErrorEmailOrUsername": "Lütfen kullanıcı adı ya da eposta girin",
"validationErrorPassword": "Lütfen parolanızı girin",
"rememberMe": "Beni Hatırla",
"createAccount": "Yeni bir hesap oluştur",
"forgotPassword": "Şifremi Unuttum",
"usernameOrEmail": "Kullanıcı adı ya da Eposta",
"password": "Parola"
}
21 changes: 21 additions & 0 deletions client/public/locales/tr/registerPage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"title": "Kayıt Formu",
"signUp": "Kayıt Ol",
"fullName": "Ad Soyad",
"username": "Kullanıcı Adı",
"email": "E Posta",
"password": "Parola",
"confirmPassword": "Parolayı Onayla",
"validationErrorFullName": "Lütfen ad soyad alanına değer girin",
"validationErrorUsername": "Lütfen kullanıcı adı alanına değer girin",
"validationErrorEmail": "Lütfen e posta alanına değer girin",
"validationErrorEmail2": "E posta formatı uygun değil",
"validationErrorPassword": "Lütfen parola alanına değer girin",
"validationErrorConfirmPassword": "Lütfen parolanızı onaylayın",
"validationErrorPasswordMatch": "Girilen iki parola birbiri ile eşleşmiyor",
"validationErrorTermsAndPolicy": "Gizlilik politikasını ve hüküm & koşulları kabul etmelisiniz",
"alreadyHaveAnAccount": "Zaten hesabınız var mı?",
"privacyPolicy": "Gizlilik politikası",
"termsAndConditions": "Hüküm & Koşullar",
"readAndUnderstood": "okudum ve anladım."
}
23 changes: 0 additions & 23 deletions client/src/@types/api/Category/index.d.ts

This file was deleted.

21 changes: 21 additions & 0 deletions client/src/@types/api/Tag/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export interface TagResponseData {
type: 'tag_detail',
attributes: {
_id: string,
name: string,
total_title: number,
popularity_ratio: number,
created_at: string,
updated_at: string
}
}

export interface TrendingTagsResponseData {
_id: string,
name: string,
total_title: number,
popularity_ratio: number,
created_at: string,
updated_at: string
}

3 changes: 1 addition & 2 deletions client/src/@types/api/Title/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ export interface TitleResponseData {
name: string,
slug: string,
entry_count: number,
category_id: string,
category_ancestors: string[],
tags: string[],
opened_by: string,
rate: {
username: string,
Expand Down
2 changes: 1 addition & 1 deletion client/src/@types/api/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './Title'
export * from './Category'
export * from './Tag'
export * from './Entry'
export * from './Message'
export * from './User'
17 changes: 0 additions & 17 deletions client/src/@types/components/CategorySelect/index.d.ts

This file was deleted.

6 changes: 6 additions & 0 deletions client/src/@types/components/TagSearchingBlock/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface TagSearchingBlockProps {
tagFilter: string[]
setTagFilter: (tag: string) => void
beforeTagDeSelect: () => void
updateTagFilterList: React.Dispatch<React.SetStateAction<string>>
}
1 change: 0 additions & 1 deletion client/src/@types/components/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './Aggrements'
export * from './CategorySelect'
export * from './ImageUpload'
export * from './PageHelmet'
export * from './SignModal'
1 change: 0 additions & 1 deletion client/src/@types/initializations/[entry]/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { TitleResponseData, EntryResponseData } from '@/@types/api'

export interface EntryPageInitials {
title: TitleResponseData,
categoryName: string,
averageTitleRate: number,
entryData: EntryResponseData,
}
3 changes: 1 addition & 2 deletions client/src/@types/initializations/[feed]/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// Local files
import { TitleResponseData, CategoryResponseData } from '@/@types/api'
import { TitleResponseData } from '@/@types/api'
import { EntryAttributes } from '@/@types/pages'

export interface FeedPageInitials {
titleData: TitleResponseData,
categoryData: CategoryResponseData,
featuredEntry: string,
averageTitleRate: number,
entryList: {
Expand Down
4 changes: 2 additions & 2 deletions client/src/@types/initializations/feeds/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Local files
import { TrendingCategoriesResponseData } from '@/@types/api'
import { TrendingTagsResponseData } from '@/@types/api'

export interface FeedsPageInitials {
trendingCategories: TrendingCategoriesResponseData[]
trendingTags: TrendingTagsResponseData[]
}
3 changes: 1 addition & 2 deletions client/src/@types/pages/[feed]/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Local files
import { CategoryResponseData, TitleResponseData, EntryResponseData} from '@/@types/api'
import { TitleResponseData, EntryResponseData} from '@/@types/api'

export interface EntryAttributes {
id: string,
Expand All @@ -17,7 +17,6 @@ export interface EntryAttributes {

export interface FeedHeaderProps {
accessToken: string,
categoryData: CategoryResponseData,
titleData: TitleResponseData,
averageTitleRate: number,
userRole: number,
Expand Down
4 changes: 2 additions & 2 deletions client/src/@types/pages/create-feed/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ export interface CreateTitleFormData {
name: string,
imageBase64: string,
imageFile: string,
categoryId: string,
tags: string,
}

export interface Step1Props {
stepMovementTo: (_step?: string | undefined) => void,
setCreateTitleFormData: React.Dispatch<CreateTitleFormData>,
setReadableCategoryValue: React.Dispatch<React.SetStateAction<ReactNode>>
setReadableTagValue: React.Dispatch<React.SetStateAction<ReactNode>>
}

export interface Step2Props {
Expand Down
6 changes: 3 additions & 3 deletions client/src/@types/pages/feeds/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export interface FeedList {
name: string,
slug: string,
href: string,
categoryName: string,
tags: string[],
entryCount: number,
featuredEntry: {
id: string,
Expand All @@ -21,6 +21,6 @@ export interface FeedList {
export interface FlowHeaderProps {
sortBy: "top" | "hot" | undefined,
setSortBy: (val: "top" | "hot" | undefined) => void,
resetCategoryFilter: () => void,
openFilterModal: () => void
resetTagFilter: () => void,
beforeFilterReset: () => void
}
4 changes: 2 additions & 2 deletions client/src/components/global/Aggrements/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Modal } from 'antd'
import React from 'react'

// Local files
import { PrivacyPolicy } from './components/PrivacyPolicy'
import { TermsAndConditions } from './components/TermsAndConditions'
import { PrivacyPolicy } from './PrivacyPolicy'
import { TermsAndConditions } from './TermsAndConditions'
import { AggrementsProps } from '@/@types/components'

export const Aggrements: React.FC<AggrementsProps> = (props): JSX.Element => (
Expand Down
Loading