- 🚀 Development
- 🏗️ Project and page structure
- 🗺️ System architecture
- 🛠️ Technical choice
- ⚡ A note on cache behavior
- 📄 License
Note: We do not plan to add external maintainer yet!
- Staging deployment: https://dev.collection.news
- Production deployment: https://collection.news
npm install
cp .env.example .env.local
- Request AWS access from team members
- Fill up the ENV marked
<required>
in your .env.local
npm run dev
- 昔日新聞 - News for that date sort by time desc
/<media_slug>/<date_slug>
/<media_slug>/<date_slug>/<category_slug>
- Pseudo SQL
SELECT * FROM
appledaily_tableWHERE date = '20190721' AND category = 'local;
- 當年今日 - News on today for past year
/<media_slug>/history/<year_slug>/
/<media_slug>/history/<year_slug>/<category_slug>
- Pseudo SQL
SELECT * FROM
appledaily_tableWHERE date = '20190721' AND category = 'local';
- Home page
/
- It will eventually be render the same as
/appledaily/20210623
, i.e. last day of appledaily
- About us
/about-us
- Search page
/search
- Not fully functional yet due to Google indexing mechanism
- NextJS & React with ISR
- AWS
- Cloudflare
- Vercel
- S3 object have
cache-control: max-age=31536000,public,immutable
- Cloudfront (asset)
min_ttl=2629743
default_ttl=31536000
max_ttl=31536000
- For more details on Cloudfront cache behavior, please refer to official documentation
- NextJS rendered HTML have
cache-control: public, max-age=0, must-revalidate
header but NextJS server side will cache SSR result depends onrevalidate
field. Currently it is indefinitely (until next deployment) for article page and 1 hour other listing page. - Article API have
cache-control: public, max-age=604800, s-maxage=604800, immutable
header, i.e. 7 days client side cache, too. - Cloudflare applied "Cache Everything" rule with
cdn.collection.news
Edge Cache TTL: a month and,collection.news
Edge Cache TTL: 2 hours
This software is released under the MIT License in GitHub. Logo the on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). Next Digital Ltd. maintain the copyright of all the content of Apply Daily. For enquiries, please contact us at info@collection.news.
本軟件在 MIT 許可證下發佈在GitHub,而本網站上的徽標根據創用CC 姓名標示-非商業性-相同方式分享 4.0 國際 (CC BY-NC-SA 4.0)分享。「壹傳媒有限公司」保留《蘋果日報》所有內容的版權。如有查詢,請聯絡我們 info@collection.news。